DHCP on Cisco Router

in cisco •  7 years ago 

Dynamic Host Configuration Protocol (DHCP) is a network protocol that enables a server to automatically assign an IP address to a computer from a defined range of numbers (i.e., a scope) configured for a given network. 

 

How DHCP assigns IP addresses

DHCP assigns an IP address when a system is started, for example:

D – D in the term DORA stands for the DHCP Discover packet. The DHCP Discover packet
is broadcasted by the DHCP client computer in order to find the available DHCP server(s) in the network. Since the DHCP client computer sends the DHCP Discover packet as a broadcast, all the
DHCP servers that are present in the network receive the packet and respond accordingly.

O – O in the term DORA stands for the DHCP Offer packet. The DHCP Offer is a unicast packet that is sent by the DHCP server who receives the DHCP Discover packet from the DHCP client computer. The DHCP Offer packet contains the available IP address that the DHCP server offers to the client computer.

R – R in the term DORA stands for the DHCP Request packet. The DHCP Request is again a unicast packet sent by the DHCP client computer to the DHCP server who had sent the DHCP Offer packet to the client computer. With the help of the DHCP Request packet, the DHCP client computer requests the DHCP server to assign the offered IP address to it.

A – A in the term DORA stands for the DHCP Acknowledge packet. The DHCP Acknowledge is a unicast packet sent by the DHCP server to the DHCP client computer acknowledging the assignment of the offered IP address for a specific lease time. 

 

Address lease times

Lease times for all Indiana University campuses are as follows:

  • Wired devices: 8 hours
  • Wireless devices: 20 minutes
  • Stand-alone VoIP phones: 1 week

To configure Cisco IOS DHCP, follow these steps

Configure an IP address on the router’s Ethernet port, and bring up the interface.

Router(config)# interface ethernet0/0
Router(config-if)#ip address 192.168.0.1 255.255.255.0
Router(config-if)# no shutdown 

Create a DHCP Pool Name

Router(config)# ip dhcp pool mypool 

Specify the network and subnet

Router(dhcp-config)# network 192.168.0.0 /24 

Specify the DNS domain name for the clients

Router(dhcp-config)#domain-name domain.com 

Specify the primary and secondary DNS servers

Router(dhcp-config)#dns-server 8.8.8.8  4.2.2.2 

Specify the default router

Router(dhcp-config)#default-router 192.168.0.1 

Specify the lease time

Router(dhcp-config)#lease 7 

Exit Pool Configuration

Router(dhcp-config)#exit 

Exclude any addresses in the pool range that you don’t want to hand out.

Router(config)#ip dhcp excluded-address 192.168.0.1 192.168.0.20 

Use show  command for check bind DHCP Addresses

Router#show ip dhcp bindings 

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Hi! I am a robot. I just upvoted you! I found similar content that readers might be interested in:
http://www.tomshardware.com/faq/id-1932036/dhcp-server-assigns-addresses-client-computers.html