Re: Network Puzzle with 2 NICs
From: jack (not_at_all.org)
Date: 04/10/04
- Next message: Joachim Mæland: "Re: Determining IP information for eth0 failed"
- Previous message: Pierre Forest: "Determining IP information for eth0 failed"
- In reply to: circuit_breaker: "Re: Network Puzzle with 2 NICs"
- Next in thread: circuit_breaker: "Re: Network Puzzle with 2 NICs"
- Reply: circuit_breaker: "Re: Network Puzzle with 2 NICs"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 10 Apr 2004 16:47:09 +0200
circuit_breaker wrote:
> Here's my routing tables:
> -------------------------
> Destination Gateway Genmask Flags Metric Ref
> Use Iface
> 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0
> 0 eth1
> 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0
> 0 eth1
> 169.254.0.0 0.0.0.0 255.255.0.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.0.1 0.0.0.0 UG 0 0
> 0 eth1
Is that Your routing table? Did You "cut and paste"?
See that there is a duplicate entry at the top. So everything that goes
into that 192.168.0/24 subnet will be sent via eth1. If the second entry
had eth0 as device, it would not change things because only the first
matching entry will be used. From the kernels point of view: It gets a
packet that shall be sent to, say, 192.168.0.20. The kernel will look at
its routing table and find that 192.168.0/24, which .20 belongs to, can
be accessed via eth1. Good, so that packet will be shoved out via eth1,
done. All other entries in that routing table will not be used, because
in a properly configured system, there's exactly one route to any given
destination. So if one route matches the target, all other rules will
not match, so there's no need to even bother.
> This morning, it behaves differently. While both NICs are active,
> "ifdown eth1" makes both interfaces unable to communicate with PC2.
> Then I did "ifdown eth0" and of course, still no reply from any
> interface, and then "ifup eth1". Guess what, eth1 was replying... :)
Yes, have a look at the routing table after taking down eth1. Normally,
ifconfig will remove all routes from the table that refer to the inter-
face that is being taken down. In Your case, all routes to 192.168.0/24
plus the default route. Since there was no route to Your subnet via eth0
anymore, that subnet is unreachable for Your box. You still can receive
incoming packets via eth0, no problem, but You cannot send replies. Bad
thing in a two-way communication...
> Looks like there's something to add or remove in those routing tables.
Normally, when bringing up a NIC, a route will be added to the routing
table based on the information You provide to configure the card. If
You specify its IP to be 192.168.0.100, and the netmask 255.255.255.0,
this information is sufficient to know that everybody in that subnet
can be reached via that respective NIC.
Try this: After adding or removing ("up"-ing and "down"-ing) the NICs,
do a "route -n" as a first thing. Try to find how the kernel will try
to send data into that subnet of Yours. Then, generate such traffic and
see whether Your guess was right or not.
Again, if the route to Your subnet is through eth1, You cann still send
things to eth0 from that other box. In any case, the reply will come
from eth1, and hence things will fail when You pull the plug from eth1.
eth0 will not send away anything at all, except for ARP, perhaps.
Hope that clears things a bit, Jack.
-- ---------------------------------------------------------------------- My personal reading of the string "MicroSoft" expands to "NanoWeak"...
- Next message: Joachim Mæland: "Re: Determining IP information for eth0 failed"
- Previous message: Pierre Forest: "Determining IP information for eth0 failed"
- In reply to: circuit_breaker: "Re: Network Puzzle with 2 NICs"
- Next in thread: circuit_breaker: "Re: Network Puzzle with 2 NICs"
- Reply: circuit_breaker: "Re: Network Puzzle with 2 NICs"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|