Have you ever bind a large of ip address for your CentOS?
If your answer is yes, you must have seen some informations like this:
What a anti-human decision to determining a large of ip address in use on boot.
In CentOS, /etc/init.d/network run ifup to bring up your interface, fortunately, ifup is not a binary file but a shell script, so we have a chance to remove this anti-human function.
Change dir to /etc/sysconfig/network-scripts/ and run ls, we can see several ifup script:
ifup ifup-aliases ifup-bnep ifup-eth ifup-ippp ifup-ipv6 ifup-ippp ifup-plip ifup-plusb ifup-post ifup-ppp ifup-routes ifup-sit ifup-tunnel ifup-wireles
We use grep to search key words "Determing if":
grep "Determining if" ./ -nir
Results:
./ifup-eth:244: echo $"Determining if ip address ${ipaddr[$idx]} is already in use for device ${REALDEVICE}..." ./ifup-aliases:265: echo $"Determining if ip address ${IPADDR} is already in use for device ${parent_device}..."
We need to modify both ifup-eth and ifup-aliases files so as to clean this function.
Open ifup-eth, go to 244 line, we can see some code like this:
ifup uses arping to know whether there a MAC address is using the ip address is going to bind for this host.
ARP packages are broadcast packages, aftering send a arp package to determining ip in use, arping need to wait for a reply broadcast package.
When there is a host using that ip, arping can get that reply package quickly, but if not, arping need to wait for several seconds so as to confirm no host is using the ip address.
Let's comment these code:
Do the same thing for ifup-aliases.
Now the "Determing if" does not show on boot anymore.