How to Remove 169.254.0.0 route from CENTOS/RHEL/Fedora

On CentOS and RHEL, both ship with zeroconf (zero configuration networking) its used primarily for DHCP environments but for server installs where you assign a static ip address, its still one extra ultra minor performance hit that you do not need

Remove ZeroConf from RHEL CENTOS

How to check if zeroconf is enabled?

at the command line type in

#route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.50     0.0.0.0        255.255.255.248 U     0      0        0 eth1
10.20.1.50     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.20.1.1       255.0.0.0       UG    0      0        0 eth0
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth1

 

Every time networking is started, either at bootup or when you restart the network service,  the zeroconf route is added to your routing table. While this is great for most, its not ideal for the rest of us.

To disable this kick ass annoying feature from making your routing table look like something a that was face rolled over  you need to edit the following file

/etc/sysconfig/network

and add the following at the bottom of the file
NOZEROCONF=yes

if you are in a hurry, hate vi or just plain lazy type in
#echo NOZEROCONF=yes >>/etc/sysconfig/network
then you can either restart networking

/etc/init.d/network restart or you can reboot, which ever makes you feel all warm and fuzzy

afterwords, check the routing table again
route -n
Like magic, the zeroconf’s routes are gone

Leave a Comment

Your email address will not be published.

Start typing and press Enter to search