LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-25-2008, 01:26 PM   #1
BethR
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Rep: Reputation: 0
eth1 on second NIC stops routing on eth0


I have RedHat running in a virtual Intel box. eth0 has been working fine... we wanted to add a second NIC as eth1 to access a backup network. Both networks have internal IP addresses.

After adding eth1 on the backup LAN, eth0 stopped working and network connectivity was lost. Inactivating eth1, everything starts working okay again on eth0.

I'm sure I'm doing someting silly, but can't figure out what's wrong.

I found one entry with wire and wireless that references the order on the bus, so I tried the lspci command thinking that maybe the two were reversed, but the output from lspci for the two NIC cards is identical... can't tell which is eth0 and which is eth1. This is the first Linux box we've attempted to setup on the backup LAN, the other boxes on the backup LAN are either Solaris or Windows.

Any advice? Thanks!
 
Old 01-25-2008, 01:41 PM   #2
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Post some information about interfaces,do ifconfig in CL.
 
Old 01-25-2008, 03:02 PM   #3
BethR
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Original Poster
Rep: Reputation: 0
Here's my eth0 defintion:
>ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:50:56:A1:50:38
inet addr:152.85.77.52 Bcast:152.85.77.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fea1:5038/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1


When I configure and activate eth1 I can only get access through the console, so cannot cut&paste the eth1 defintion.
Here are the basics of eth1 definition:
IP Address: 10.80.2.13
Subnet Mask: 255.255.255.0
Default gateway: 10.80.2.13 (I've tried 2.1 here also)
MAC address: 00:50:56:A1:0F:1E

>ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:50:56:A1:0F:1E
BROADCAST MULTICAST MTU:1500 Metric:1


Current netstat info is as follows:
>netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
152.85.77.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 152.85.77.1 0.0.0.0 UG 0 0 0 eth0

When I do add of eth1 there are added lines in the routing table, but most are now pointing to eth1 instead of eth0.

Is there any other info I can get that would help?

Last edited by BethR; 01-25-2008 at 03:03 PM.
 
Old 01-25-2008, 03:41 PM   #4
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
In eth1 your ip address is the same as your getaway,it shouldn`t be like that.Do you know your router ip address,if yes enter it as your default getaway,I guess you have dynamic DHCP configuration,post me on that.
 
Old 01-28-2008, 09:44 AM   #5
BethR
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Original Poster
Rep: Reputation: 0
I've tried configuring the eth1 gateway as .13 and .1, and I get the same results either way. Here's the output when configuring the gateway for the backup LAN as .1. The symptom, to review, is that I cannot ping the box, nor can the box ping anywhere beyond the .1 addresses of the two adapters.

ifconfig output:
> more ifconfig.out
eth0 Link encap:Ethernet HWaddr 00:50:56:A1:50:38
inet addr:152.85.77.52 Bcast:152.85.77.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fea1:5038/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:717850 errors:0 dropped:0 overruns:0 frame:0
TX packets:58763 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:45674313 (43.5 MiB) TX bytes:76407866 (72.8 MiB)
Interrupt:177 Base address:0x1400

eth1 Link encap:Ethernet HWaddr 00:50:56:A1:0F:1E
inet addr:10.80.2.13 Bcast:10.80.2.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fea1:f1e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:235 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:21168 (20.6 KiB) TX bytes:829 (829.0 b)
Interrupt:185 Base address:0x1480

netstat output:
> more netstat.out
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.80.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
152.85.77.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 10.80.2.1 0.0.0.0 UG 0 0 0 eth1


I have nothing configured under the Route tab for eth1, but somehow it becomes the default route and nothing works right.

To review... here's the netstat output when eth1 is inactive. I can ping, do nslookup, get to LinuxQuestions.org, anything....:
> netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
152.85.77.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 152.85.77.1 0.0.0.0 UG 0 0 0 eth0

(Sorry.... all the formatting spaces are lost here in the post. Any way to fix? I've tried Advance, but I get same results. )

BTW.
Here's the info from another box, Solaris, that is working correctly with two NIC cards, one to the production LAN and one to the backup LAN:
> netstat -nr

Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
152.85.51.0 152.85.51.179 U 1 126823 ce0
10.80.0.0 10.80.1.133 U 1 670587 ce1
224.0.0.0 152.85.51.179 U 1 0 ce0
default 152.85.51.1 UG 1 379315
127.0.0.1 127.0.0.1 UH 376312642 lo0

> /sbin/ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
ce0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 152.85.51.179 netmask ffffff00 broadcast 152.85.51.255
ce1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 10.80.1.133 netmask fffffc00 broadcast 10.80.3.255


I'm not sure I understand TCP/IP well enough, but the other thing I tried, based on this, was a different subnet mask. Same results for me, but I'm not sure I got the right subnet mask.

The two things I am suspicous of:
1 - What should the subnet mask be for 2nd adatper, which is not the primary adadpter? (I have verified... the backup LAN is a deadend. It only goes to the backup server, not out to any other part of the network.)
2 - Linux might be using the first card it finds as the default route?

Thanks,
Beth

Last edited by BethR; 01-28-2008 at 10:43 AM. Reason: Add netstat and ifconfig from Solaris box.
 
Old 01-28-2008, 01:58 PM   #6
BethR
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Original Poster
Rep: Reputation: 0
BTW. You assumed DHCP in one of your posts, but I must use static IP addresses for this box.
 
Old 01-28-2008, 03:27 PM   #7
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Did you try to disable eth0 and just run eth1,and post your Windows box output from ipconfig here too.BTW you didn't understand my point about router,what is your router ip address?What do you tipe in the web browser when you want to configure a router?What kind of internet conection do you have?
Did you trie to enable eth1 on a Windows box.Maybe is all just about the NIC for eth1,or cable,I had that problem.

Last edited by alan_ri; 01-29-2008 at 08:03 AM.
 
Old 01-28-2008, 09:28 PM   #8
BethR
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Original Poster
Rep: Reputation: 0
I just reread your router suggestion. I'll find out in the AM what the router address is and post the results. Thanks for your patience!
 
Old 01-29-2008, 04:08 PM   #9
BethR
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Original Poster
Rep: Reputation: 0
Eureka! When I got ahold of the VM admin he explained that there is no router on the backup network. 255.255.252.0 is the correct Netmask (which I had tried) but by specifying the normal gateway (.1 address) all the routing had gone over to the eth1 adapter even though the eth0 definitions hadn't changed any. Taking the gateway off the eth1 definition and leaving the router definition blank (which I had also done originally) fixed the problem.
Here's the working config info:
> /sbin/ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:50:56:A1:50:38
inet addr:152.85.77.52 Bcast:152.85.77.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fea1:5038/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1050567 errors:1 dropped:0 overruns:0 frame:0
TX packets:69886 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:67043598 (63.9 MiB) TX bytes:86416711 (82.4 MiB)
Interrupt:177 Base address:0x1400

> /sbin/ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:50:56:A1:0F:1E
inet addr:10.80.2.13 Bcast:10.80.3.255 Mask:255.255.252.0
inet6 addr: fe80::250:56ff:fea1:f1e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1565800 errors:2 dropped:2 overruns:0 frame:0
TX packets:3159623 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:103677583 (98.8 MiB) TX bytes:273407018 (260.7 MiB)
Interrupt:185 Base address:0x1480

Thanks much for your help! Beth
 
Old 01-30-2008, 09:51 AM   #10
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Yes,I understand what you mean,that was what I was talking about.
Glad you did it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
howto acess intrnet thru eth1(wireless card)in winXP via briging in linux(eth0-eth1) labhesh_popli Linux - Wireless Networking 1 09-21-2006 02:11 AM
Internal Routing eth1 to eth0 Dataforce Linux - Networking 3 04-02-2004 10:41 AM
eth1 added, mysql connections FROM this machine are from eth1. Need bound to eth0??? kreese Linux - Networking 9 03-31-2004 01:12 PM
Kernel 2.4.22 finds eth0 and eth1 but 2.6.0 does not find eth1 coollink Linux - Networking 3 01-13-2004 08:32 PM
how to set which NIC is eth0, & which is eth1 roshko Linux - Networking 4 09-01-2003 12:08 PM

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

All times are GMT -5. The time now is 09:38 AM.

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