It has been quite sometime since the last time I write here. In fact, the last time I posted something here, I’m still a registered student of Informatics Engineering Department in Sepuluh Nopember Institue of Technology. Well, I got a lot of things going on in my life since then, shit happens, good things come to me and long story short, I’m now a sysadmin (yeaay!). I’ll share one of my experience at work when I have to configure a DHCP service for my client which has 3 different VLANs on its network and my DHCP server must provide IP address pool for all 3 VLANs.
To help you get the picture, here is the topology of the network. I have VLAN 1 which is a network of servers, VLAN 2 which is a network of workstations and VLAN 3 which is a network for mobile devices. The devices in VLAN 3 connect to the network using an Access Point which is configured as a wireless switch. The tricky part is all of this 3 VLANs are managed by a Cisco manageable switch, so the configuration will consist of two parts, enabling DHCP service on the server and configuring ip helper-address on the Cisco.
I assume that the VLAN has been configured on the Cisco and they are working correctly because I will focus on the DHCP configuration so I will not talk about how to configure the VLAN.
To create the DHCP service on server, here are the steps:
- Enable DHCP role on the server, it is a very straightforward step using Server Manager.
- Once the DHCP role has been activated, open DHCP configuration from start menu.
- Open the DHCP tree -> (your server’s name) -> IPv4. Open IPv4 because we are going to create a DHCP service for IPv4.
- Next we will create the DHCP pool (or scope), click on More Actions menu on the Actions tab and select New Scope
- Follow the wizard, click Next, enter a name of the scope and its description, then fill in the pool.
- For example for VLAN 1 I will put 10.7.48.16 – 10.7.48.30 with 255.255.255.0 as netmask. Fill it according to your network’s condition and click next.
- Put IP exclusion if you need to and click next again.
- Put the lease duration, leave it to default value if you want.
- Then finally configure the DHCP options such as gateway, DNS, etc until you finish creating a new scope.
- Next, repeat the above steps for creating a new scope for VLAN 2 and 3.
- Good, now you have 3 DHCP scope for the 3 VLANs so that means the last thing to do is to configure the Cisco switch.
Configuration on the Cisco switch:
- Connect to your Cisco terminal, enable it and get into configuration terminal.
- Now we need to enter each VLAN interfaces and configure them one by one.
- For example for VLAN 1 I use VLAN 20, so my command is
(config)#interface vlan 20
- Then I put the DHCP server IP address as IP helper, if you have more than 1 DHCP server (which you definitely should on production network) run this command for each server. My server IP is 10.7.48.10
(config-if)#ip helper-address 10.7.48.10
- Done? good, now exit this interface and repeat the above processes to all VLAN interface. In my case my next VLAN interface is VLAN 30 for the workstations’ VLAN and VLAN 10 for smartphones’ VLAN so I use this two commands each
(config)#interface vlan 30
(config)#interface vlan 10
- I configure the same thing, the DHCP server’s IP address on each interface.
- By the way if you somewhat already have configured Cisco’s DHCP service on the switch, disable it now.
And basically that is all the things need to be done but of course our life will never go that smooth. Try to put a computer on the VLAN and see if it manage to get an IP from the server. If not, then happy debugging, you can use Wireshark on both the server and the client to find the problem. If your server recieve a DHCP request from the client, then the configuration on VLAN, switch and network point of view should be okay. In my case, the server recieve a DHCP request but it didn’t send the DHCP reply. Usually the problem is within the firewall.
Have fun debugging!
Satrio is a self-proclaimed technology geek. He is currently employed by IBM Indonesia as an IT Specialist which handles IBM xSeries servers, IBM zSeries mainframes and multi vendor network devices. He listens to various kinds of musics (he personally believes that music should not be put into boxes such as genres and everybody is free to listen to whatever kind of music whenever they feel like it).
Latest posts by Satrio G. Nugraha (see all)
Cisco, DHCP, Featured, VLAN, Windows Server