≡ Menu

CentOS / RHEL: Remove Routes 169.254.0.0 / 255.255.0.0 From the System

How do I disable the route 169.254.0.0 / 255.255.0.0 from CentOS or RHEL 6 Linux server?

zeroconf (Zero configuration networking), is a techniques that automatically creates a usable Internet Protocol (IP) network without manual operator intervention or special configuration servers. 169.254.0.0/255.255.0.0 route is part of zeroconf under RHEL 6 / CentOS 6 or older versions. To see current routing table, enter:
# route -n
Sample outputs:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
74.8x.4y.zz     0.0.0.0         255.255.255.248 U     0      0        0 eth1
10.10.29.64     0.0.0.0         255.255.255.192 U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1003   0        0 eth1
10.0.0.0        10.10.29.65     255.0.0.0       UG    0      0        0 eth0
0.0.0.0         74.8x.yy.zz     0.0.0.0         UG    0      0        0 eth1

Every time the server or Linux desktop boots, the zeroconf route 169.254.0.0 is enabled and added to the kernel routing table. To disable zeroconf route under RHEL / CentOS / Fedora Linux, enter:
# vi /etc/sysconfig/network
Append the following directive:

NOZEROCONF=yes

Save and close the file. Reboot the system / server or restart the networking service:
# /etc/init.d/network restart
Verify routing table, enter:
# route -n
OR
# ip route

Share this tutorial on:

Your support makes a big difference:
I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft, takes a lot of my time and hard work to produce. If you use nixCraft, who likes it, helps me with donations:
Become a Supporter →    Make a contribution via Paypal/Bitcoin →   

Don't Miss Any Linux and Unix Tips

Get nixCraft in your inbox. It's free:



{ 8 comments… add one }
  • Dougle November 10, 2011, 10:59 am

    What are the benefits of disabling this route?

    • Dan November 22, 2011, 2:43 pm

      Ask yourself, conversely, what are the benefits of having that route?

      • CMac October 31, 2013, 6:53 pm

        Thats not really an answer, the answer to this would be you defeat the possibility of having machines setup networks between each other in the absence of operator intervention.

        • Stefan Lasiewski January 30, 2014, 1:33 am

          I ask myself, what are the benefits of changing a default setting, especially when I have bigger fish to fry. If it ain’t broken, don’t fix it.

  • Ridd1ck November 18, 2011, 1:10 pm

    How can i set the default gateway be in the last line of routing table?

    • Dan November 22, 2011, 2:47 pm

      That is outside of the scope of this article.
      However, googling will show you that you edit /etc/sysconfig/network and add the keyword “gateway” like so:
      GATEWAY=10.0.0.1

      Replace 10.0.0.1 with the default gateway you desire. After, just restart networking. (/etc/init.d/networking restart)

    • nixCraft December 6, 2011, 8:01 am
  • Shivendra singh November 18, 2011, 1:35 pm

    yes i want to red hed software.

Security: Are you a robot or human?

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">


   Tagged with: , , , , , , , , , , , , , ,