Disable the zeroconf route

Today I needed to disable the so called zeroconf route. You may observed that in your routing table you have a route for the network 169.254.0.0/16.


# ip route
.......
169.254.0.0/16 dev eth2 scope link metric 1002
169.254.0.0/16 dev eth0 scope link metric 1003
169.254.0.0/16 dev eth1 scope link metric 1004
169.254.0.0/16 dev eth3 scope link metric 1005
default via ..........
..............

To disable it, in a RedHat-like system (Fedora) I just edited the file/etc/sysconfig/network and I added the line:

NOZEROCONF=yes

via http://techie.yellowgnu.net/disable-zeroconf-route/

———————————————————————————————–

Zero Configuration Network (ZEROCONF)

Most Linux distributions utilise the Zero Configuration Network (ZEROCONF) automation suite. This is an IETF workgroup that planned and coordinated a series of dynamic configuration protocols to allow many operating systems to automatically configure themselves and communicate on a network without the need of DHCP or DNS servers. ZEROCONF utilises the 169.254.0.0/16 network address to autoconfigure using a series of unanswered “ARP” queries and then assumes an address if the queries yield an empty result.

A route to the ZEROCONF network is added to the routing table by the network initscripts.

[bash]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.214.64.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth1      <– ZEROCONF default IP route
0.0.0.0         10.214.64.254   0.0.0.0         UG    0      0        0 eth0

ZEROCONF can be turned off by adding the following entry to the “/etc/sysconfig/network” configuration file.

[bash]# nano /etc/sysconfig/network
NOZEROCONF=yes
Note !! The value for the “NOZEROCONF” parameter can actually be set to any value, the initscripts only check to determine whether the parameter has zero length. So setting “NOZEROCONF=no” will have the same effect as setting it to “yes”. You will need to comment or remove the variable to reactive ZEROCONF.

The networking service will need to be restarted before the changes will take effect.

[bash]# /etc/init.d/network restart

Checking the network routing table again will identify the ZEROCONF route has been disabled and removed from the routing table.

[bash]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.214.64.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
0.0.0.0         10.214.64.254   0.0.0.0         UG    0      0        0 eth0

ZEROCONF is also commonly referred to as IPv4 Link-Local (IPv4LL) and Automatic Private IP Addressing (APIPA).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s