Activating eth1 changes default route--avoidable problem?
Hi Folks,
I have a box that has two NICs and to complicate matters, the box is located at a colocation facility so it's awkward to lay hands on it.
There are times when I need to be able to talk via both the Internet and to a LAN (but I don't need or want both cards up all the time). At the moment the LAN NIC is inactive. (This is a RedHat 3.x box, BTW.) Here's my problem--if I activate the 2nd NIC, it changes the default route (which means my Internet connection goes dead--very unhelpful when working remotely).
Here's what I mean. When eth0 is active:
# ip route
223.90.90.128/28 dev eth0 proto kernel scope link src 223.90.91.141
169.254.0.0/16 dev eth0 scope link
default via 223.90.91.129 dev eth0
But, if I activate eth1, the last entry gets overwritten with the LAN IP:
default via 192.168.1.1 dev eth1
If I'm there at the machine, I can switch it back, but if I'm not, I'm dead in the ether, so to speak.
Now, this same thing happens when I boot up the box if I have both NICs configured to come up. (The highest numbered NIC [last init'd] is assumed to control the default route.)
Even if I reverse the order by making the LAN eth0 and the Internet eth1, I still can't shut down the LAN side and bring it back up later without messing up the default route. Is there any way to avoid this? What statement/setting should I look for in config files? (The GUI obviously is not my friend here--or if it is, it's a most obscure one!) Is this happening because I'm specifying a default gateway in the config for eth1 (and shouldn't be doing so)?
Any suggestions or wisdom gratefully accepted.
John
|