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 |
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-28-2005, 02:59 AM
|
#1
|
|
Member
Registered: Jul 2004
Location: Pakistan
Distribution: Slackware 10.0, SUSE 9.1, RH 7, 7.3, 8, 9, FC2
Posts: 406
Rep:
|
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
|
|
|
|
06-28-2005, 11:32 AM
|
#2
|
|
Guru
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163
Rep:
|
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.
|
|
|
|
06-28-2005, 01:14 PM
|
#3
|
|
Member
Registered: Jul 2004
Location: Pakistan
Distribution: Slackware 10.0, SUSE 9.1, RH 7, 7.3, 8, 9, FC2
Posts: 406
Original Poster
Rep:
|
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.
|
|
|
|
06-28-2005, 02:21 PM
|
#4
|
|
Guru
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163
Rep:
|
|
|
|
|
06-29-2005, 01:32 AM
|
#5
|
|
LQ Newbie
Registered: Jun 2005
Posts: 3
Rep:
|
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?
|
|
|
|
06-29-2005, 09:04 AM
|
#6
|
|
LQ Newbie
Registered: Jun 2005
Posts: 3
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:12 PM.
|
|
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
|
|