Cisco ACI and CCNA live online batches are starting from 24th June 2023. Join experts today. how to Configure cisco switch as DHCP Server Archives - UniNets Blog

Tag Archive how to Configure cisco switch as DHCP Server

How to Configure switch as DHCP Server

Task

In this task, SW1 will be configured as a DHCP Server, and all four routers will be DHCP Clients. Configure DHCP Server functionality on SW11 using the following criteria:

Pool Name Network Address Subnet Mask Default Router Lease Time
vlan2 10.10.10.8 /29 10.10.10.9 1-day
vlan3 10.10.10.32 /29 10.10.10.33 1-day
vlan4 30.30.30.0 /26 30.30.30.1 1-day
vlan5 20.20.20.96 /27 20.20.20.97 1-day

Explanation

Configure all FastEthernet interfaces on the routers (connected to the switches shown in the topology diagram) to obtain their IP address dynamically via DHCP. Verify that your routers have obtained an appropriate DHCP IP address.

Verify that any one of your routers can ping the IP address of any other router.

verify router ping

Configuration

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

Configure VTP mode Server

Task 2 : Configure the L2 vlan for all Vlan 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)#

Configure the L2 vlan

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

Verify ports connection

 

Verify ports connection 2

SW1(config)#ip routing

SW1(config)#!

SW1(config)#interface Vlan1

SW1(config-if)# ip address 1.1.1.11 255.255.255.0

SW1(config-if)#!

SW1(config-if)#interface Vlan2

SW1(config-if)# ip address 10.10.10.9 255.255.255.248

SW1(config-if)#!

SW1(config-if)#interface Vlan3

SW1(config-if)# ip address 10.10.10.33 255.255.255.248

SW1(config-if)#!

SW1(config-if)#interface Vlan4

SW1(config-if)# ip address 30.30.30.1 255.255.255.192

SW1(config-if)#!

SW1(config-if)#interface Vlan5

SW1(config-if)# ip address 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 Vlan on SW1.

Verify the L3 vlan

Task 5 : Configure the Switch port on all switch who are 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(config-if)# 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 the SW1 to make it as 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 the Routers so that it will take the ip address from DHCP server.

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)#no s

R2(config-if-range)#ip address dhcp

 

R3(config)#int range eth0/0-1

R3(config-if-range)#no shut

R3(config-if-range)#ip address dhcp

R4(config)#int range eth0/0-1

R4(config-if-range)#no shut

R4(config-if-range)#ip address dhcp

 

Task 7 : Verification that All routers are able to get the Ip address

Verification process 1

Verification process 2

Verification process 3