This is from route -n command.

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         192.168.1.x         UG    600    0        0 <wifi>     U     1000   0        0 <wifi>   U     600    0        0 <wifi>

I have tried:

1) disabled ufw and ran from the terminal(same with ufw enabled):

sudo route del -net gw

got SIOCDELRT: Invalid argument

2) commented link-local line in the /etc/networks file and rebooted.

3) disabled avahi-deamon since it seems to be related.

Nothing works, I use static IP but always when I connect to my router and run route -n command it appears there. So. do you guys have any other ideas?


Thanks to the answer below I have looked into avahi-autoipd manpage and managed to find a solution. To remove the route:

sudo route del -net netmask dev <interface> metric 1000

where <interface> is your network interface, such as wlan0 for example. However, this would only remove it until next network association because it spawns all over again. So to make it permanent, you need to modify the /etc/network/if-up.d/avahi-autoipd file, the root of the spawning.

I commented out the final part of the code:

#if [ -x /bin/ip ]; then
    # route already present?
    #ip route show | grep -q '^[[:space:]]' && exit 0

    #/bin/ip route add dev $IFACE metric 1000 scope link
#elif [ -x /sbin/route ]; then
    # route already present?
    #/sbin/route -n | egrep -q "^[[:space:]]" && exit 0

    #/sbin/route add -net netmask dev $IFACE metric 1000
  • YES, it works! I only commented out the lines with "route add" and I can confirm: Your solution works fine! (Ubuntu 18.04) Another nice step to clean up the mess in modern Ubuntu .... Jun 1, 2018 at 8:54

4 Answers 4


There is nothing at all you need to do. The route is typically present for everyone with internet connectivity. Here is the route information from my machine:

chili@T440p:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    600    0        0 wlp3s0     U     1000   0        0 wlp3s0   U     600    0        0 wlp3s0

Please see: https://serverfault.com/questions/132657/where-route-to-169-254-0-0-comes-from

Especially see:

The network is used for Automatic Private IP Addressing, or APIPA. If a DHCP client attempts to get an address, but fails to find a DHCP server after the timeout and retries period it will randomly assume an address from this network. This allows communication with hosts that have failed to obtain a DHCP address.

In short, the entry is entirely normal.

  • 1
    I do not recall ever having such a route, unless I was having troubles. I checked two of my 16.04 Ubuntu servers just now, both with internet connectivity, and neither has such a route. However, and too my surprise, it is present on my test 16.10 Ubuntu desktop computer. Mar 14, 2017 at 22:59
  • ip route on my ubuntu 16.10 box shows: dev eth0 scope link metric 1000
    – neofug
    Mar 14, 2017 at 23:03

You're right in your assumption that this route comes from avahi.

Disabling avahi-deamon may not be enough since your DHCP client may be configured to use avahi-autoipd in order to set a Link-local IP when the DHCP request fails.

There are several things I would try:

  • add a line deny-interfaces=wifi (that's the name of your network interface, right?) in /etc/avahi/avahi-daemon.conf
  • since you're using a static IP anyway, disable your DHCP client (dhcpcd?)
  • as this answer suggests, you can simply uninstall avahi-daemon. Sure, this amounts to killing a fly with a steamroller, but it'll work
  • 1
    First two options didn't work. Third, let's just say I want to keep it as a reserve. But your answer did help me find a solution so cheers for your effort!
    – user633551
    Mar 15, 2017 at 22:28
  • 1
    @user633551 You should post your answer as an answer then. I'll be happy to vote it up. Mar 16, 2017 at 7:52
  • In 16.04 avahi-autoipd is not using /etc/avahi/avahi-daemon.conf, so the first sugestion will not prevent dhcp for calling the /etc/network/if-up.d/avahi-autoipd hook that is part of avahi-autoipd package. In my case I even do not have avahi-daemon installed. Aug 23, 2017 at 10:28
  • in my installation of Ubuntu 18.04 the solution to comment out the "route add" helped; editing /etc/network/if-up.d/avahi-autoipd Thanks a lot to user633551. Jun 1, 2018 at 8:58

I've solved like this:

iface eth1 inet static
    pre up ip r d

Simply the route gets deleted when network is starting. In Rhel distros it is easy to configure Zeroconf, but I haven't found a way in Debian/Ubuntu. Still, this should do a trick.


Just get rid of it all together, worked fine for me on Ubuntu 22:

sudo apt-get remove avahi-autoipd avahi-daemon avahi-utils

I don't like un-wanted traffic on my network, un-known routes in my ip tables nor services/daemons wasting resources on my system.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .