NIC alias gotcha

From V.S.V., Inc.
Jump to: navigation, search

I ran into an interesting situation yesterday setting up aliases on a bonded NIC interface.

I created the three (3) configuration files in /etc/sysconfig/network-scripts. They are ifcfg-bond0:0, ifcfg-bond0:1, ifcfg-bond0:2. I then tested the first interface by running “ifup bond0:0″ and then ifconfig. It showed up just fine and was configured the way I expected. Since this one worked and the other two were copies of this one with just the address changed, I knew they would work also and brought both of them up.

I then ran ifconfig again to check my handy work. Much to my surprise, only bond0:0 was showing. I tried to ping the interfaces from another machine and they responded just fine. ifconfig still stubbornly refused to show the new interfaces.

Those of you with a keen eye may have already realized my flub from the above description so, I’ll get on with revealing the answer to the invisible NICs.

You will remember that I said the only thing I changed in the configuration files were the addresses. Well, you also need to change the DEVICE name. otherwise you will have phantom NICs like I did.

I’m not sure why you would ever want to hide an interface and this really should result in an error but, it doesn’t. So, the next time you can’t find your interface, check the configuration file to make sure it is named correctly.