LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-27-2007, 04:42 PM   #1
JMCraig
Member
 
Registered: Feb 2003
Location: Utah, USA
Distribution: Red Hat EL/CentOS, Ubuntu/Debian
Posts: 113

Rep: Reputation: 15
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
 
Old 08-27-2007, 05:55 PM   #2
JMCraig
Member
 
Registered: Feb 2003
Location: Utah, USA
Distribution: Red Hat EL/CentOS, Ubuntu/Debian
Posts: 113

Original Poster
Rep: Reputation: 15
Solved my own problem

Yup. It is having a Default Gateway specified for NIC #2 that messes it all up.

Thanks for anyone who took the time to read the question!

John
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add a route table for eth1 and make it the default banner Linux - General 3 05-08-2005 11:14 AM
Activating eth1 w/ loaded module etc hategiants Linux - Networking 3 01-29-2005 05:14 PM
Activating eth1/wlan0 for intel 2100 wireless Atmchicago Linux - Wireless Networking 4 09-01-2004 02:50 AM
Problem with adding default route... Grim Reaper Linux - Networking 1 02-22-2003 07:29 AM
Default route problem.. (typical) unmada Linux - Networking 1 02-20-2003 06:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration