let us check what address we got .. although it can be seen in the debug output ..
CODE
r3#siib
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 172.16.23.101 YES DHCP up up
Serial0/0 unassigned YES unset administratively down down
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/1 unassigned YES unset administratively down down
r3#
*Mar 1 01:07:23.191: DHCPD: checking for expired leases.
r3#
r2#show ip dhcp ?
binding DHCP address bindings
conflict DHCP address conflicts
database DHCP database agents
import Show Imported Parameters
pool DHCP pools information
relay Miscellaneous DHCP relay information
server Miscellaneous DHCP server information
r2#show ip dhcp binding
Bindings from all pools not associated with VRF:
IP address Client-ID/ Lease expiration Type
Hardware address/
User name
172.16.23.101 0063.6973.636f.2d63. Mar 02 2002 01:03 AM Automatic
3230.332e.3234.3731.
2e30.3030.302d.4661.
302f.30
r2#show ip dhcp pool
Pool rakesh_r3 :
Utilization mark (high/low) : 100 / 0
Subnet size (first/next) : 0 / 0
Total addresses : 254
Leased addresses : 1
Pending event : none
1 subnet is currently in the pool :
Current index IP address range Leased addresses
172.16.23.102 172.16.23.1 - 172.16.23.254 1
r2#
see the current index .. that is the next address which will be assigned to any one requesting .. also we can configure lease times and many other options with dhcp now lets shutdown the interface and view the debug output
CODE
r3#config t
Enter configuration commands, one per line. End with CNTL/Z.
r3(config)#int fa0/0
r3(config-if)#shut
r3(config-if)#
*Mar 1 01:12:48.207: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down
*Mar 1 01:12:49.207: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down
r3(config-if)#do siib
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES DHCP administratively down down
Serial0/0 unassigned YES unset administratively down down
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/1 unassigned YES unset administratively down down
r3(config-if)#
r2#debug ip dhcp server events
r2#debug ip dhcp server packet
r2#debug ip packet detail
IP packet debugging is on (detailed)
r2#
*Mar 1 01:12:32.291: IP: s=172.16.12.2 (local), d=224.0.0.10 (Serial0/0), len 60, sending broad/multicast, proto=88
r2#
*Mar 1 01:12:34.803: IP: s=172.16.12.1 (Serial0/0), d=224.0.0.10, len 60, rcvd 2, proto=88
*Mar 1 01:12:35.527: IP: s=172.16.2.1 (local), d=224.0.0.10 (Loopback2), len 60, sending broad/multicast, proto=88
*Mar 1 01:12:35.531: IP: s=172.16.2.1 (Loopback2), d=224.0.0.10, len 60, rcvd 2, proto=88
*Mar 1 01:12:35.787: IP: s=172.16.23.2 (local), d=224.0.0.10 (FastEthernet0/0), len 60, sending broad/multicast, proto=88
r2#
*Mar 1 01:12:36.719: IP: s=172.16.12.2 (local), d=224.0.0.10 (Serial0/0), len 60, sending broad/multicast, proto=88
r2#
*Mar 1 01:12:39.387: IP: s=172.16.12.1 (Serial0/0), d=224.0.0.10, len 60, rcvd 2, proto=88
*Mar 1 01:12:40.071: IP: s=172.16.2.1 (local), d=224.0.0.10 (Loopback2), len 60, sending broad/multicast, proto=88
*Mar 1 01:12:40.075: IP: s=172.16.2.1 (Loopback2), d=224.0.0.10, len 60, rcvd 2, proto=88
*Mar 1 01:12:40.379: IP: s=172.16.23.2 (local), d=224.0.0.10 (FastEthernet0/0), len 60, sending broad/multicast, proto=88
r2#
*Mar 1 01:12:41.127: IP: s=172.16.12.2 (local), d=224.0.0.10 (Serial0/0), len 60, sending broad/multicast, proto=88
*Mar 1 01:12:41.971: IP: tableid=0, s=172.16.23.101 (FastEthernet0/0), d=172.16.23.2 (FastEthernet0/0), routed via RIB
*Mar 1 01:12:41.971: IP: s=172.16.23.101 (FastEthernet0/0), d=172.16.23.2 (FastEthernet0/0), len 604, rcvd 3
*Mar 1 01:12:41.971: UDP src=68, dst=67
*Mar 1 01:12:41.975: DHCPD: DHCPRELEASE message received from client 0063.6973.636f.2d63.3230.332e.3234.3731.2e30.3030.302d.4661.302f.30 (172.16.23.101).
*Mar 1 01:12:41.979: DHCPD: Sending notification of TERMINATION:
*Mar 1 01:12:41.979: DHCPD: address 172.16.23.101 mask 255.255.255.0
*Mar 1 01:12:41.979: DHCPD: reason flags: RELEASE
*Mar 1 01:12:41.979: DHCPD: htype 1 chaddr c203.2471.0000
*Mar 1 01:12:41.979: DHCPD: lease time remaining (secs) = 85827
*Mar 1 01:12:41.983: DHCPD: returned 172.16.23.101 to address pool rakesh_r3.
*Mar 1 01:12:42.447: IP: tableid=0, s=172
r2#.16.23.101 (FastEthernet0/0), d=172.16.23.2 (FastEthernet0/0), routed via RIB
*Mar 1 01:12:42.447: IP: s=172.16.23.101 (FastEthernet0/0), d=172.16.23.2 (FastEthernet0/0), len 604, rcvd 3
*Mar 1 01:12:42.451: UDP src=68, dst=67
*Mar 1 01:12:42.451: DHCPD: DHCPRELEASE message received from client 0063.6973.636f.2d63.3230.332e.3234.3731.2e30.3030.302d.4661.302f.30 (172.16.23.101).
*Mar 1 01:12:42.455: DHCPD: Finding a relay for client 0063.6973.636f.2d63.3230.332e.3234.3731.2e30.3030.302d.4661.302f.30 on interface FastEthernet0/0.
*Mar 1 01:12:42.455: DHCPD: Seeing if there is an internally specified pool class:
*Mar 1 01:12:42.455: DHCPD: htype 1 chaddr c203.2471.0000
*Mar 1 01:12:42.459: DHCPD: remote id 020a0000ac10170200000000
*Mar 1 01:12:42.459: DHCPD: circuit id 00000000
r2#
*Mar 1 01:12:44.263: IP: s=172.16.12.1 (Serial0/0), d=224.0.0.10, len 60, rcvd 2, proto=88
*Mar 1 01:12:44.367: IP: s=172.16.2.1 (local), d=224.0.0.10 (Loopback2), len 60, sending broad/multicast, proto=88
*Mar 1 01:12:44.371: IP: s=172.16.2.1 (Loopback2), d=224.0.0.10, len 60, rcvd 2, proto=88
*Mar 1 01:12:44.439: IP: tableid=0, s=172.16.23.101 (FastEthernet0/0), d=172.16.23.2 (FastEthernet0/0), routed via RIB
*Mar 1 01:12:44.439: IP: s=172.16.23.101 (FastEthernet0/0), d=172.16.23.2 (FastEthernet0/0), len 604, rcvd 3
*Mar 1 01:12:44.443: UDP src=68, dst=67
r2#
*Mar 1 01:12:44.443: DHCPD: DHCPRELEASE message received from client 0063.6973.636f.2d63.3230.332e.3234.3731.2e30.3030.302d.4661.302f.30 (172.16.23.101).
*Mar 1 01:12:44.443: DHCPD: Finding a relay for client 0063.6973.636f.2d63.3230.332e.3234.3731.2e30.3030.302d.4661.302f.30 on interface FastEthernet0/0.
*Mar 1 01:12:44.443: DHCPD: Seeing if there is an internally specified pool class:
*Mar 1 01:12:44.443: DHCPD: htype 1 chaddr c203.2471.0000
*Mar 1 01:12:44.447: DHCPD: remote id 020a0000ac10170200000000
*Mar 1 01:12:44.447: DHCPD: circuit id 00000000
*Mar 1 01:12:44.907: IP: s=172.16.23.2 (local), d=224.0.0.10 (FastEthernet0/0)
r2#, len 60, sending broad/multicast, proto=88
*Mar 1 01:12:45.487: IP: s=172.16.12.2 (local), d=224.0.0.10 (Serial0/0), len 60, sending broad/multicast, proto=88
r2#
*Mar 1 01:12:48.543: IP: s=172.16.12.1 (Serial0/0), d=224.0.0.10, len 60, rcvd 2, proto=88
*Mar 1 01:12:49.223: IP: s=172.16.2.1 (local), d=224.0.0.10 (Loopback2), len 60, sending broad/multicast, proto=88
*Mar 1 01:12:49.227: IP: s=172.16.2.1 (Loopback2), d=224.0.0.10, len 60, rcvd 2, proto=88
r2#
*Mar 1 01:12:49.739: IP: s=172.16.23.2 (local), d=224.0.0.10 (FastEthernet0/0), len 60, sending broad/multicast, proto=88
*Mar 1 01:12:50.247: IP: s=172.16.12.2 (local), d=224.0.0.10 (Serial0/0), len 60, sending broad/multicast, proto=88
r2#u all
All possible debugging has been turned off
r2#
*Mar 1 01:12:52.911: IP: s=172.16.12.1 (Serial0/0), d=224.0.0.10, len 60, rcvd 2, proto=88
r2#
as you can see there has been not one but several requests from client to ensure that it no longer requires dhcp services