Building network automation solutions

9 module online course

Start now!

Expired DHCP Lease Bounces the Interface

You would think that an expired DHCP lease is not a big deal for a DHCP client. Although the interface IP address is lost, you can always try to get a new address from the DHCP server.

IOS has a different opinion: when the DHCP lease expires on a router configured with ip address dhcp interface configuration command, the interface is administratively shut down and re-enabled. Here’s a sample printout taken from a router running 15.6(1)T software:

%DHCP-5-RESTART: Interface GigabitEthernet0/1 is being restarted by DHCP
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to administratively down
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to down
%LINK-3-UPDOWN: Interface GigabitEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up
%DHCP-6-ADDRESS_ASSIGN: Interface GigabitEthernet0/1 assigned DHCP address 10.0.0.4, ↲
mask 255.255.255.0, hostname c2

You might wonder how you could ever end up with an expired lease when there’s a working DHCP server on the network. It’s simple if your DHCP server runs on IOS: when you clear the DHCP bindings on a router running a DHCP server, it stops responding to lease extension requests (DHCPREQUEST packets) from unknown clients.

4 comments:

  1. Glad to see you again!
  2. It will breach SLA.
  3. About problem of dropping connections with DHCP – its our (users) bug not IOS I found in your config line:

    All traffic is forwarded to your local server xxx.xxx.xxx.xxx including answers from DHCP server of your internet provider. DHCP server accept queries on udp port 67 and send answers to client on udp port 68. You could insert one line:

    ip nat inside source static udp xxx.xxx.xxx.xxx(your dhcp gateway) 68 interface (your Interface dhcp) 68

    example: ip nat inside source static udp 192.168.1.1 68 interface GigabitEthernet0/0 68

    and dhcp answers will go to your router. Best regards.

  4. @gexain: An end-user router connected to an ISP access network usually uses DHCP on the outside interface to get its IP address. That's the scenario I tested.

    You're probably thinking about DHCP proxying or something else along these lines. That's a different story.

Add comment
Sidebar