Bring up a virtual interface without checking if it's up elsewhere

Josh Smeaton asked:

Is there a way to bring up a virtual interface without it first sending an arping to check if that IP address is already in use elsewhere?

I’m working with a proprietary product that recommends copying the ifup script and commenting out the arping check section. But then that custom version of the ifup script needs to be stored somewhere, and it’s not the nicest thing to maintain.

Is there a better way of bringing up the interface without the arping check?

My answer:

You should be able to do this within the confines of Red Hat’s network scripts. However, you can’t due to a bug in those scripts.

This is how I would have gone about it:

First, suppress ARP completely while the interface is being brought up. Then re-enable it after the interface is up. (You must re-enable ARP or the machine will not be able to communicate at all.)

To suppress ARP during interface initialization, add to /etc/sysconfig/network-scripts/ifcfg-eth0. This actually disables ARP at the kernel level, which should make any attempts to use arping fail.


To re-enable ARP after the interface is up, create a file /sbin/ifup-local with the necessary commands:

ip link set dev $1 arp on

However, this fails, precisely because it causes arping to fail. Since the /etc/sysconfig/network-scripts/ifup-eth script doesn’t actually check the return code from arping carefully enough, if you actually set ARP=no then the initialization fails with an incorrect error message claiming the IP address is already in use.

This leaves you with your original option, that recommended by the vendor: Hack the script, and (optionally) report the bug to Red Hat.

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.