I wanted to update the DHCP lease of an Amazon EC2 instance, so I executed the following command:

user@host:~$ sudo dhclient

Following that, the system's DHCP lease is updated successfully updated. However, the command prints the following to the console:

RTNETLINK answers: File exists

What on earth does that mean? Is it a cause for concern?

For what it's worth, dhclient returned without any errors:

user@host:~$ echo $?
  • 1
    The user in the post you reference gets the error Failed to bring up wlan0. I don't get any output besides RTNETLINK answers: File exists.
    – AlfaZulu
    Jun 3 '14 at 13:23
  • yes and its the same reason why you get it. adding a route which is already in the table. simple test: disable your interface, enable your interface. first time dhclient run the message will not appear. just confirmed this locally on a debian system. Jun 3 '14 at 13:29
  • This machine is an Amazon EC2 instance, I can't take down the interface for obvious reasons. I guess my question basically is, what is the right way to renew my DHCP leases given that I can't up/down my interfaces?
    – AlfaZulu
    Jun 3 '14 at 13:32
  • then this might answers your "new" question: askubuntu.com/questions/151958/… if thats not "enough you can remove the old lease within /var/lib/dhcp/dhclient.leases (might be slightly different location on EC2) dhclient -r Jun 3 '14 at 13:40

Basically what happens is that dhclient adds a route to the routing table.

It tries this while the route is already in the table.


ip route

for a route which was added by the dhcp server.

For having the lease renewed do

dhclient -r

if thats not enough you can remove all leases by removing the file and getting a new lease

sudo rm /var/lib/dhcp/dhclient.leases; sudo dhclient eth0

Depending on your exact setup this might be an issue with having to type your password twice, so watch out for that.

  • 1
    Ah, I executed ip route and spotted the extra route it added. This all started because I wanted to renew DHCP client leases after having made changes to the DHCP server. The problem is I can't up/down my interfaces because the machine is an EC2 instance. Also, I want to avoid restarting the system. So how can I simply update my DHCP client leases without any unwanted side effects?
    – AlfaZulu
    Jun 3 '14 at 13:41
  • 1
    @AlfaZulu added some info which should help your issue. Basically even on a remote system you can up/down the interfaces if you "chain command" it, but its prone to fail if you cannot test it properly so do not do this :) Jun 3 '14 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.