Sunday, February 10, 2013

DHCP Troubleshooting

DHCP Troubleshooting

From: GNS3 Vault (1) Thanks to Rene Molenaar for taking the time to post these practice labs on his site.

  • Router DHCPClient1 needs to obtain an IP address through DHCPServer on its fa0/0 interface
  • Router DHCPClient2 needs to obtain an IP address through DHCPServer on its fa0/0 interface
  • Only Router DHCPServer can hand out IP’s
  • Notice the desired IP’s

clip_image001[4]

Topology created by Rene Molenaar from GNS3 Vault (1)

A solution (just my solution):

Enable dhcp service on DHCPServer

DHCPServer#conf t
DHCPServer(config)#service dhcp

Verify dhcp pools on DHCPServer:

clip_image002[4]

Looks good but I need to make sure Client1 gets 192.168.12.2 on its fa0/0 interface and client2 gets 192.168.23.3 on its f0/0 interface (according to the diagram). Since Server has 192.168.12.1 statically configured on its f0/0 interface, dhcp should hand out the correct next ip (being 192.168.12.2) to client1. Client1 has 192.168.23.2 statically configured on its f1/0 interface so dhcp server will probably hand out 192.168.23.1 to client2 instead of 192.168.23.3 as is called for in the diagram. Therefore we need to configure excluded addresses on Server (mainly to exclude 192.168.23.1 from being handed out).

DHCPServer#conf t
DHCPServer(config)#ip dhcp excluded-address 192.168.23.1 192.168.23.2

At this point you can enable debugging… if you want.

Verify Client1 is set up for dhcp and has received the correct IP on its f0/0 interface:

clip_image003[4]

Client1 is good.

Check Client2:

clip_image004[4]

Interface f0/0 is set for dhcp but isn’t getting an IP. Configure Client1 f1/0 interface for dhcp helper:

DHCPClient1(config)#inter f1/0
DHCPClient1(config-if)#ip helper-address 192.168.12.1

Server is now getting Client2’s request and is trying to send an offer but the offer isn’t reaching Client2:

clip_image005[4]

Configure a static route on Server so it has a path to send the offer:

DHCPServer#conf t
DHCPServer(config)#ip route 192.168.23.0 255.255.255.0 f0/0

Now go back to Client2 and check for the right address:

clip_image006[4]

And all is well, happy happy happy!

Cheers!

--------------------------------------------------------------
1) http://gns3vault.com/Troubleshooting/dhcp-troubleshooting.html

No comments:

Post a Comment