Security Basics mailing list archives

RE: 2 NIC's on same network, possible?


From: "Max Harvey" <IT () smc ac nz>
Date: Wed, 30 Jul 2003 11:17:20 +1200

From: Vineet Mehta [mailto:vineet () linux com kw]
My collegue has a Linux machine which has 2 NIC's on it. What 
he did was assign the IP's 192.168.0.6/24 and 192.168.0.7/24 
to the NIC's. And he was trying to ping the network but was 
getting errors (i dont know the errors).

               -----------------
              | Switch         |
              |_________________|
                |             |
                |             |
                |             |
          -------------------------------
          |  NIC1            NIC2     |
          |192.168.0.6/24 192.168.0.7/24|
          |        Machine            |
          |-----------------------------|




From: Burton M. Strauss III [mailto:BStrauss () acm org] 
Now it gets weird if somebody is trying to reach YOU on the 
2nd NIC.  Why? Because the routing decision is address based, 
not NIC based.

So a packet TO the address of the 2nd NIC (192.168.0.7) is 
received on the 2nd NIC.  The reply, addressed say to 
192.168.0.5 again, is sent VIA the 1st NIC (1st match in the 
routing rules wins!).  Unless the sender also has this kind 
of funky routing table.

THIS is what leads to the 'rule' that you can't have two NICs 
with the same network portions, because if they're really NOT 
connected identically, you'll lose traffic, and if you're not 
really, really careful with routine rules (wait for it) (yes) 
you'll lose traffic.



Does this mean, that if both eth0 and eth1 are connected directly to the
same switch as in the original post I believe, therefore having the same
connection to the network, that it would work?

I am wondering as I had a network cable die on one of my servers
yesterday, so I am considering sticking a backup Ethernet card in the
server, and having it connected into the exactly same switch that the
current card/cable connects to. I am just trying to confirm that I have
read this right, and that since they are connected to the same
connection, that it will work.

Hopefully this means that if I lose a cable/card, it will determine that
the route isn't working, and move onto the next match?


Max.


---------------------------------------------------------------------------
----------------------------------------------------------------------------


Current thread: