Networking Forums

Networking Forums > Computer Networking > Linux Networking > One computer with two NICs in one segment = strange ARP behavior?

Reply
Thread Tools Display Modes

One computer with two NICs in one segment = strange ARP behavior?

 
 
Kamran Remin
Guest
Posts: n/a

 
      07-09-2003, 02:59 PM
Hi,

i noticed some relly strange ARP behavior on my computer. The computer runs
Debian 3.0 with a 2.4.18 kernel.
I installed two networkcards and connected them to a hub. eth0 has
192.168.40.101 and eth1 has 192.168.40.102, both with a subnet mask of
255.255.255.0 and i didn't define a default gateway.

Now i am pinging these two cards from a second computer, that is also
connected to the hub and has a IP-Address of 192.168.40.1 and a netmask of
255.255.255.0.

Now i do the following things:

tron:~# ping 192.168.40.101
PING 192.168.40.101 (192.168.40.101): 56 data bytes
64 bytes from 192.168.40.101: icmp_seq=0 ttl=255 time=0.8 ms
64 bytes from 192.168.40.101: icmp_seq=1 ttl=255 time=0.4 ms

tron:~# arp -a
? (192.168.40.101) at 00:40:05:2D:ABC [ether] on eth2

then i type:

tron:~# ping 192.168.40.102
PING 192.168.40.102 (192.168.40.102): 56 data bytes
64 bytes from 192.168.40.102: icmp_seq=0 ttl=255 time=0.8 ms
64 bytes from 192.168.40.102: icmp_seq=1 ttl=255 time=0.4 ms

hennes.humungus.lokal (192.168.5.1) at 00:01:02:09:C7:61 [ether] on eth0
? (192.168.40.101) at 00:40:05:2D:ABC [ether] on eth2
? (192.168.40.102) at 00:40:05:2D:ABC [ether] on eth2


And that is strange isn't it? Both IP-Addresses in the ARP table have the
MAC-Address of the first (eth0) network card.

Then i did it the other way:

tron:~# ping 192.168.40.102
PING 192.168.40.102 (192.168.40.102): 56 data bytes
64 bytes from 192.168.40.102: icmp_seq=0 ttl=255 time=0.9 ms
64 bytes from 192.168.40.102: icmp_seq=1 ttl=255 time=0.4 ms

tron:~# arp -a
? (192.168.40.102) at 00:40:05:2D:ABC [ether] on eth2

I stop here because as you see, i get in the ARP-Table the MAC-Address of
the first card, though i pinged the second card.

When you use a default gateway entry, then you will always get the
MAC-Address of the card where the default gateway is set on.


Is this behavior normal? I mean, both cards are in the same segment and get
pinged from a computer that is also in the same segement. Each card should
answer the ping by it's own interface. Very strange. I know that it is not
normal to put two cards on a computer in the same segment + subnet and
normally you would do IP-Aliasing, but why does the Linux Kernel behave this
way? I didn't checked this behavior on Windows-Machines yet, but i will
check it later today.

Any comments welcomed.

Greetz,
Kamran Remin



 
Reply With Quote
 
 
 
 
Kamran Remin
Guest
Posts: n/a

 
      07-11-2003, 09:33 AM

> Not strange at all. If you check /sbin/route -n, you will likely find 2
> routes for 192.168.40.0/255.255.255.0 with the first one leading to eth0,
> so that is the one used. Also note that Linux knows what IPs are local to
> it and will answer for any of them from any interface.


Well, after reading this ... sounds logical.

Thanks,
Kamran Remin


 
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple NICs in same segment server 2008 dcohn Windows Networking 14 06-10-2009 04:45 AM
Strange VPN behavior Bjarni Windows Networking 1 07-03-2006 05:09 PM
Strange VPN Behavior JamFan Windows Networking 3 02-28-2006 01:39 AM
Strange behavior Dennis P. Smith Windows Networking 5 05-18-2005 07:48 PM
Strange VPN behavior =?Utf-8?B?QnJ1Y2UgQnJvd24=?= Broadband Hardware 3 02-26-2005 03:24 AM



1 2 3 4 5 6 7 8 9 10 11