DHCP short notes and Configuration on Multilayer switch

When a computer connected to a Domain having DHCP server it will requests an IP address,Below steps will happen between the requested client and DHCP server

• DHCP Discover
• DHCP Offer
• DHCP Request
• DHCP Acknowledgement

The computer sends an DHCP Discover because it's looking for an IP address. This message is broadcasted within the VLAN. The DHCP server will reply with the DHCP Offer message, this contains all the information the computer needs. The computer will reply with a DHCP request because it likes what it sees. The final step is a DHCP Acknowledgement from the DHCP server.

Configuration to use multilayer switch as DHCP server

Switch(config)#interface vlan 15
Switch(config-if)#ip address 192.168.11.254 255.255.255.0
Switch(config)#interface fa0/1
Switch(config-if)#switchport access vlan 15

First create the SVI, put an IP address on it and make sure Computer  is in VLAN 15.You can also use a routed port if you like instead of SVI

Switch(config)#ip dhcp pool SYSNETNOTES
Switch(dhcp-config)#network 192.168.11.0 255.255.255.0
Switch(dhcp-config)#default-route 192.168.11.254
Switch(config)#ip dhcp excluded-address 192.168.11.254

Above is a simple example of a DHCP pool. You can pick any name you like for the pool.Type in the network and that's it. I've also added a gateway with the default-routecommand. Optionally you can exclude a number of IP addresses

Switch#show ip dhcp binding

NOTE : if the DHCP server is not on the same VLAN, We can use the "ip helper" command

0 comments:

Post a Comment