LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 06-28-2005, 03:59 AM   #1
ilnli
Member
 
Registered: Jul 2004
Location: Pakistan
Distribution: Slackware 10.0, SUSE 9.1, RH 7, 7.3, 8, 9, FC2
Posts: 413

Rep: Reputation: 32
dual lan card not working (intel+dlink)


i was having intel lan card on my slackware 10 system. it was working fine but then i decided to make my machine a route for which i got another Dlink DFE-530TX card but after install the module of this card on one lan card is working at a time. my prvious lan card is being shown when i do ifconfig but when I directly plug my ethernet cable it does not ping another machin on the same network and not the gateway.
below is my full schenario of commands
Code:
root@wirelessFW:~# lsmod
Module                  Size  Used by    Not tainted
uhci                   24444   0  (unused)
usbcore                59308   1  [uhci]
eepro100               19252   1
mii                     2272   0  [eepro100]
rhinefet               36224   1
ide-scsi                9328   0
agpgart                43940   0  (unused)

root@wirelessFW:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:11:95:D7:94:A2
          inet addr:192.168.10.250  Bcast:192.168.10.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:341 errors:0 dropped:0 overruns:0 frame:0
          TX packets:225 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:28758 (28.0 Kb)  TX bytes:38011 (37.1 Kb)
          Interrupt:10 Base address:0xc800

eth1      Link encap:Ethernet  HWaddr 00:A0:C9:89:84:B3
          inet addr:192.168.10.251  Bcast:192.168.10.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:9 Base address:0xb000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

root@wirelessFW:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.10.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.10.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         192.168.10.15   0.0.0.0         UG    1      0        0 eth0


=====at this time i have plugged the ethernet cable in my first lan card


root@wirelessFW:~#  ping 192.168.10.14
PING 192.168.10.14 (192.168.10.14) 56(84) bytes of data.
64 bytes from 192.168.10.14: icmp_seq=1 ttl=255 time=1.02 ms
64 bytes from 192.168.10.14: icmp_seq=2 ttl=255 time=0.225 ms


=====now i have plugged the ethernet cable in my second lan card


root@wirelessFW:~# ping 192.168.10.14
PING 192.168.10.14 (192.168.10.14) 56(84) bytes of data.
From 192.168.10.250 icmp_seq=1 Destination Host Unreachable
From 192.168.10.250 icmp_seq=2 Destination Host Unreachable
From 192.168.10.250 icmp_seq=3 Destination Host Unreachable

although the machine 192.168.10.14 is online
tell me where is the problem
 
Old 06-28-2005, 12:32 PM   #2
Half_Elf
Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 45
You have to ajust your route to tell your system to use the second card of course. Usually, you shouldn't have 2 cards on the same network range in the same computer unless you want to make a bridge.

Just look at your routing :
0.0.0.0 192.168.10.15 0.0.0.0 UG 1 0 0 eth0
This is the "default" route, it says something like "if you don't know send this there". Of course, it depend on "eth0" as you can see.

192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1

About these, you might think that Linux understood it should use both interface or do some round and robin trick or to use the second one as a fallback route but it doesn't work like this, Linux takes the first one it finds and ignore others one (which is a dumb behavior about routing atmo).

Don't expect Linux to understand what you are trying to do, this is not WinXP, you have to _tell_ your system what you are trying to do. If you don't want to ajust the route each time you change cable, you could, as example, make a DNAT firewall rules with iptables to perform a round-and-robin action (1 packet on first, 1 packet on second, 1 packet on first...), this would work but this is really not standard.
This best ( read : elegant ) way would be to setup a bridge, but it's not an obligation.
 
Old 06-28-2005, 02:14 PM   #3
ilnli
Member
 
Registered: Jul 2004
Location: Pakistan
Distribution: Slackware 10.0, SUSE 9.1, RH 7, 7.3, 8, 9, FC2
Posts: 413

Original Poster
Rep: Reputation: 32
I got your point Half_Elf and thanks for your time.
The actual thing that I was wanting is to make linux work as a bridge.Can you provide me some details for making linux a bridge.
 
Old 06-28-2005, 03:21 PM   #4
Half_Elf
Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 45
Bridging HOWTO : http://bridge.sourceforge.net/howto.html
 
Old 06-29-2005, 02:32 AM   #5
mauricev
LQ Newbie
 
Registered: Jun 2005
Posts: 3

Rep: Reputation: 0
Quote:
Linux takes the first one it finds and ignore others one
I'm not exactly sure I follow this. The behavior stated appears to be the opposite. When the second NIC is installed, Linux became unable to find any routes unless I missed something and the first NIC's cable had been disconnected.

Quote:
Linux takes the first one it finds and ignore others one
I have two NICs and this is what I am seeing. The second NIC is ignored, but its IP address is not. That is, from a third computer if I ping the second NIC's IP address, the packets go through the first card! How can that be?
 
Old 06-29-2005, 10:04 AM   #6
mauricev
LQ Newbie
 
Registered: Jun 2005
Posts: 3

Rep: Reputation: 0
Another post explains the behavior I'm seeing: http://www.linuxquestions.org/questi...ight=eth0+eth1

The actual IP address assignment to a NIC is irrelevant. Linux does a lookup in the routing table and picks the first route it that will work, which happens to belong to the first NIC.

In my case, the second card once had the IP address of the first card, so there had been saved information, possibly on the switch itself to map that IP address to the first NIC's MAC address in addition to the computer, so even pinging from an external computer is going to through the first NIC.

The behavior above, however, doesn't make sense unless you had disconnected the cable of the first card or pulled it out.

I'm not sure you necessarily want a bridge if you are going to be on the same network with both NICs. Bonding seems to make more sense.
 
  


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
onboard Intel LAN Card is not being recognized by RedHat 9.0 TempleOwl1999 Linux - Hardware 11 10-15-2005 04:46 PM
Intel Lan Card not detecting AmitC Linux - Networking 1 09-18-2005 12:11 AM
8139 (dlink) card not working SCFan42 Linux - Networking 2 08-11-2005 02:04 PM
getting dlink G650+ wireless card working? snowcrash Debian 3 06-04-2005 10:11 AM
problem with intel 100 pro ve lan card arokh Linux - Hardware 1 11-05-2004 04:02 AM


All times are GMT -5. The time now is 01:20 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration