dhclient lease renewal occasionally breaks DNS resolution

-1

I have an ec2 instance (ubuntu trusty 14.04) that I have never done any special dhcp configuration with. It's on a VPC with the default dhcp options.

For some reason, roughly ever 25 minutes, I see this in my logs

(IP's and xid are scrubbed)

DHCPREQUEST of 172.16.1.111 on eth0 to 172.16.0.1 port 67 (xid=0x0000000c)
DHCPACK of 172.16.1.111 from 172.16.0.1
bound to 172.16.1.111 -- renewal in 1693 seconds.

The exact number of seconds changes between 1300 and 1700.

Occasionally, like once every 10 days, this renewal will break DNS, and my running application will start giving errors like getaddrinfo: Name or service not known. Once the renewal runs again in about 25 minutes, the problem is resolved. I have tested this by waiting for a failure and manually renewing the dhclient lease, and seeing that fix the issue.

I have 2 questions:

  1. Why is the renewal time this strange ~25 minute number? I know that I can set this through a conf file, but this seems like it's a strange default.
  2. Why does it sometimes break DNS resolution?
amazon-ec2
dhcp
dhclient
asked on Stack Overflow Feb 14, 2019 by swagrov • edited Feb 15, 2019 by swagrov

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0