Adf.ly


Thursday, November 15, 2012

Single DHCP for multiple VLANs

I recenlty came across a requirement for a client who wanted me to run a single DHCP Server for a multiple VLANs that I created for him. Apparently the last time I did that I was about to complete my Switiching module & honestly did not even think of anything that complicated. But to my surprise, it isn't all that hard to do so. A single command will let you do the magic & impress your client.
 
This tutorial will show you how to configure dynamic IP address assignment on multiple VLAN with a unique DHCP server appliance on the network.
Two VLANs are configured on Switch0 with Router0 as default gateway :
  • VLAN 10 - Nework  : 10.0.0.0/24 - Gateway : 10.0.0.1 (FA 0/0.10)
  • VLAN 20 - Network : 20.0.0.0/24 - Gateway : 20.0.0.1 (FA 0/0.20)
The unique DHCP server is with IP 192.168.1.1.
DHCP configuration
 
 
 

Configure router0 for DHCP forwarding
Router(config)# interface FastEthernet0/0.10
Router(config-subif)# encapsulation dot1Q 10
Router(config-subif)# ip address 10.0.0.1 255.0.0.0
Router(config-subif)# ip helper-address 192.168.1.2

Router(config)# interface FastEthernet0/0.20
Router(config-subif)# encapsulation dot1Q 20
Router(config-subif)# ip address 20.0.0.1 255.0.0.0
Router(config-subif)# ip helper-address 192.168.1.2

I know this was a quick tutorial, but i am sure by now not all but many of you will know how to create Vlans on the switch & subInterfaces on the router.
 

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.