Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-25-2008, 01:26 PM
|
#1
|
LQ Newbie
Registered: Mar 2007
Posts: 8
Rep:
|
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!
|
|
|
01-25-2008, 01:41 PM
|
#2
|
Senior Member
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Rep: 
|
Post some information about interfaces,do ifconfig in CL.
|
|
|
01-25-2008, 03:02 PM
|
#3
|
LQ Newbie
Registered: Mar 2007
Posts: 8
Original Poster
Rep:
|
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.
|
|
|
01-25-2008, 03:41 PM
|
#4
|
Senior Member
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Rep: 
|
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.
|
|
|
01-28-2008, 09:44 AM
|
#5
|
LQ Newbie
Registered: Mar 2007
Posts: 8
Original Poster
Rep:
|
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.
|
|
|
01-28-2008, 01:58 PM
|
#6
|
LQ Newbie
Registered: Mar 2007
Posts: 8
Original Poster
Rep:
|
BTW. You assumed DHCP in one of your posts, but I must use static IP addresses for this box.
|
|
|
01-28-2008, 03:27 PM
|
#7
|
Senior Member
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Rep: 
|
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.
|
|
|
01-28-2008, 09:28 PM
|
#8
|
LQ Newbie
Registered: Mar 2007
Posts: 8
Original Poster
Rep:
|
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!
|
|
|
01-29-2008, 04:08 PM
|
#9
|
LQ Newbie
Registered: Mar 2007
Posts: 8
Original Poster
Rep:
|
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
|
|
|
01-30-2008, 09:51 AM
|
#10
|
Senior Member
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Rep: 
|
Yes,I understand what you mean,that was what I was talking about.
Glad you did it.
|
|
|
All times are GMT -5. The time now is 09:38 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|