Multiple DHCP Server Configurations For VLANs

On this practice lab, we will configure two DHCP servers for 4 different VLANs. We will create the VLANs on the core switch, then we will assign the DHCP servers to VLANs with the command of “ip helper-address“. By this method, you will be able to use different DHCP servers for different purposes.

Cisco Core Switch Configuration

Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#hostname CORE-SWITCH
CORE-SWITCH(config)#vlan 10
CORE-SWITCH(config-vlan)#vlan 20
CORE-SWITCH(config-vlan)#vlan 30
CORE-SWITCH(config-vlan)#vlan 40
CORE-SWITCH(config-vlan)#ex

CORE-SWITCH(config)#int vlan 10
CORE-SWITCH(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up

CORE-SWITCH(config-if)#ip address 192.168.10.1 255.255.255.0
CORE-SWITCH(config-if)#ip helper-address 192.168.100.100
CORE-SWITCH(config-if)#no sh
CORE-SWITCH(config-if)#ex

CORE-SWITCH(config)#int vlan 20
CORE-SWITCH(config-if)#
%LINK-5-CHANGED: Interface Vlan20, changed state to up

CORE-SWITCH(config-if)#ip addres 192.168.20.1 255.255.255.0
CORE-SWITCH(config-if)#ip helper-address 192.168.100.100
CORE-SWITCH(config-if)#no shutdown
CORE-SWITCH(config-if)#exit

CORE-SWITCH(config)#int vlan 30
CORE-SWITCH(config-if)#
%LINK-5-CHANGED: Interface Vlan30, changed state to up

CORE-SWITCH(config-if)#ip address 192.168.30.1 255.255.255.0
CORE-SWITCH(config-if)#ip helper-address 192.168.200.100
CORE-SWITCH(config-if)#no shutdown
CORE-SWITCH(config-if)#exit

CORE-SWITCH(config)#int vlan 40
CORE-SWITCH(config-if)#
%LINK-5-CHANGED: Interface Vlan40, changed state to up
CORE-SWITCH(config-if)#ip address 192.168.40.1 255.255.255.0
CORE-SWITCH(config-if)#ip helper-address 192.168.200.100
CORE-SWITCH(config-if)#no shutdown
CORE-SWITCH(config-if)#exit
CORE-SWITCH(config)#
CORE-SWITCH(config)#
CORE-SWITCH(config)#
CORE-SWITCH(config)#vlan 100
CORE-SWITCH(config-vlan)#vlan 200
CORE-SWITCH(config-vlan)#exit

CORE-SWITCH(config)#int vlan 100
CORE-SWITCH(config-if)#
%LINK-5-CHANGED: Interface Vlan100, changed state to up

CORE-SWITCH(config-if)#ip address 192.168.100.1 255.255.255.0
CORE-SWITCH(config-if)#ip helper-address 192.168.100.100
CORE-SWITCH(config-if)#no shutdown
CORE-SWITCH(config-if)#exit

CORE-SWITCH(config)#int vlan 200
CORE-SWITCH(config-if)#
%LINK-5-CHANGED: Interface Vlan200, changed state to up

CORE-SWITCH(config-if)#ip address 192.168.200.1 255.255.255.0
CORE-SWITCH(config-if)#ip helper-address 192.168.200.100
CORE-SWITCH(config-if)#no shutdown
CORE-SWITCH(config-if)#exit

CORE-SWITCH(config)#int g1/0/5
CORE-SWITCH(config-if)#sw mode acc
CORE-SWITCH(config-if)#sw acc vlan 200
CORE-SWITCH(config-if)#description DHCP server 2
CORE-SWITCH(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan200, changed state to up

CORE-SWITCH(config-if)#no sh
CORE-SWITCH(config-if)#ex

CORE-SWITCH(config)#int g1/0/1
CORE-SWITCH(config-if)#sw mode acc
CORE-SWITCH(config-if)#sw acc vlan 100
CORE-SWITCH(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan100, changed state to up

CORE-SWITCH(config-if)#desc
CORE-SWITCH(config-if)#description DHCP server 1
CORE-SWITCH(config-if)#no sh
CORE-SWITCH(config-if)#exit

CORE-SWITCH(config)#int g1/0/2
CORE-SWITCH(config-if)#sw mode acc
CORE-SWITCH(config-if)#sw acc vlan 10
CORE-SWITCH(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up

CORE-SWITCH(config-if)#no sh
CORE-SWITCH(config-if)#exit

CORE-SWITCH(config)#int g1/0/3
CORE-SWITCH(config-if)#sw mode acc
CORE-SWITCH(config-if)#sw acc vlan 20
CORE-SWITCH(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up

CORE-SWITCH(config-if)#no sh
CORE-SWITCH(config-if)#ex

CORE-SWITCH(config)#int g1/0/4
CORE-SWITCH(config-if)#sw mode acc
CORE-SWITCH(config-if)#sw acc vlan 30
CORE-SWITCH(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up

CORE-SWITCH(config-if)#no sh
CORE-SWITCH(config-if)#ex

CORE-SWITCH(config)#int g1/0/6
CORE-SWITCH(config-if)#sw mode acc
CORE-SWITCH(config-if)#sw acc vlan 40
CORE-SWITCH(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan40, changed state to up

CORE-SWITCH(config-if)#no sh
CORE-SWITCH(config-if)#exit

CORE-SWITCH(config)#ip routing
CORE-SWITCH(config)#do copy run start
Destination filename [startup-config]? 
Building configuration...
[OK]
CORE-SWITCH(config)#
CORE-SWITCH#
%SYS-5-CONFIG_I: Configured from console by console

DHCP SERVER 1 Configuration

DHCP SERVER 2 Configuration

After completing all the configurations, you can check the end user devices. Set it to receive IP addresses from DHCP servers. So you will realize that all the necessary VLANs will receiving IP addresses from designated DHCP servers.

Happy networking 🙂

Back To Top
error: Content is protected !!