How to configure DHCP server switch

Task
This task will configure SW1 as a DHCP Server and all four routers as DHCP Clients. Use the following criteria to configure DHCP Server functionality for SW11.
Pool NameNetwork AddressSubnet MaskDefault RouterLease Timevlan210.10.10.8/2910.10.10.91-dayvlan310.10.10.32/2910.10.10.331-dayvlan430.30.30.0/2630.30.30.11-dayvlan520.20.20.96/2720.20.20.971-dayExplanation
To dynamically obtain their IP addresses via DHCP, configure all FastEthernet interfaces of the routers (connected with the switches shown in topology diagram). Verify that your routers have received the correct DHCP IP address.
Verify that all routers are capable of pinging the IP address of other routers.

Configuration
Step1: Configure VTP mode Server, VTP domain name CCNP, and verify that trunk negotiated ports are open.

Task 2: Configure the L2 Vlan for all Vlans on SW1.
SW1#conf t
Enter configuration commands, one per line. End with CNTL/Z
SW1(config)#vlan 2
SW1(config-vlan)#vlan 3
SW1(config-vlan)#vlan 4
SW1(config-vlan)#vlan 5
SW1(config-vlan)#

Task 3: Verify that all ports connected to swith have 802.1Q trunk port. Configure the L3 Vlan for all Vlans on SW1.

SW1(config.#ip routing
SW1(config)#!
SW1(config)#interface Vlan1
SW1(configif)# ip adres 1.1.1.11 255.255.255.0
SW1(config-if)#!
SW1(config-if)#interface Vlan2
SW1(configif)# ip adres 10.10.10.9 255.255.255.248
SW1(config-if)#!
SW1(config-if)#interface Vlan3
SW1(configif)# ip adres 10.10.10.33 255.255.255.248
SW1(config-if)#!
SW1(config-if)#interface Vlan4
SW1(configif)# ip adres 30.30.30.1.255.255.255.192
SW1(config-if)#!
SW1(config-if)#interface Vlan5
SW1(configif)# ip adres 20.20.20.97.255.255.255.224
SW1(config-if)#!
SW1(config-if)#
SW1#conf t
Enter configuration commands, one per line. End with CNTL/Z
SW1(config)#int vlan 2
SW1(config-if)#no shut
SW1(config-if)#int vlan 3
SW1(config-if)#no shut
SW1(config-if)#int vlan 4
SW1(config-if)#no shut
SW1(config-if)#int vlan 5
SW1(config-if)#no shut
SW1(config-if)#^Z
Task 4: Verify the L3 Vlan for all Vlans on SW1.

Task 5: Configure the Switch port for all switches connected to all four routers.
SW1(config)#int eth1/0
SW1(config-if)#switchport mode access
SW1(config-if)#switchport access vlan 2
SW1(config-if)#no shut
SW1(config)#int eth2/0
SW1(config-if)#switchport access vlan 2
SW1(configif)# Switchport Mode Access
SW1(config-if)# duplex auto
SW1(config-if)#end

SW2(config)#int eth1/0
SW2(config-if)#switchport mode access
SW2(config-if)#switchport access vlan 3
SW2(config-if)#int eth2/0
SW2(config-if)#switchport mode access
SW2(config-if)#switchport access vlan 3
SW2(config-if)#^Z
SW2(config)#int eth3/0
SW2(config-if)#switchport mode access
SW2(config-if)#switchport access vlan 5
SW2(config-if)#int eth4/0
SW2(config-if)#switchport mode access
SW2(config-if)#switchport access vlan 5
SW2(config-if)#^Z
SW3(config)#int eth3/0
SW3(config-if)#switchport mode access
SW3(config-if)#switchport access vlan 4
SW3(config-if)#int eth4/0
SW3(config-if)#switchport mode access
SW3(config-if)#switchport access vlan 4
SW3(config-if)#^Z

Task 6 – Configure SW1 to be a DHCP server
SW1(config)#ip dhcp pool vlan2 SW1(dhcp-config)# network 10.10.10.8 255.255.255.248 SW1(dhcp-config)# default-router 10.10.10.9 SW1(dhcp-config)#!
SW1(dhcp-config)#ip dhcp pool vlan3 SW1(dhcp-config)# network 10.10.10.32 255.255.255.248 SW1(dhcp-config)# default-router 10.10.10.33 SW1(dhcp-config)#!
SW1(dhcp-config)#ip dhcp pool vlan4 SW1(dhcp-config)# network 30.30.30.0 255.255.255.192 SW1(dhcp-config)# default-router 30.30.30.1 SW1(dhcp-config)#!
SW1(dhcp-config)#ip dhcp pool vlan5 SW1(dhcp-config)# network 20.20.20.96 255.255.255.224
SW1(dhcp-config)# default-router 20.20.20.97

Task 7 – Configure Routers so they can receive the DHCP server’s ip address.
R1(config)#int range eth0/0-1
R1(config-if-range)#no shut
R1(config-if-range)#ip address dhcp
R2(config)#int range eth0/0-1
R2(config-if-range)

How to configure DHCP server switch
Scroll to top