[CentOS] How to make a network interface come up automatically on link up?

Sun Mar 24 02:27:30 UTC 2013
Joakim Ziegler <joakim at terminalmx.com>

I have a recently installed Mellanox VPI interface in my server. This is 
an InfiniBand interface, which, through the use of adapters, can also do 
10GbE over fiber. I have one of the adapter's two ports configured for 
10GbE in this way, with a point to point link to a Mac workstation with 
a Myricom 10GbE card.

I've configured this interface on the Linux box (eth2) using 
/etc/sysconfig/network-scripts/ifcfg-eth2 , setting its IP address, MTU, 
subnet, etc.

Everything seems to work fine, with a single exception. If I reboot the 
Mac on the other end, causing the link state of the fiber interface to 
bounce, the network interface on the Linux box doesn't come back up when 
the link comes back up. That is, ifconfig shows it as having the link 
up, but it doesn't do the equivalent of "ifup eth2" when the link comes 
back, so it doesn't get an IP, the routing table doesn't get updated, etc.

So, my question is, how can I make CentOS automatically configure this 
interface when the link comes back up? It's a bit annoying having to log 
in and do ifup eth2 every time...

-- 
Joakim Ziegler  -  Supervisor de postproducción  -  Terminal
joakim at terminalmx.com   -   044 55 2971 8514   -   5264 0864