Re: Switches and ARP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2002-06-27 at 16:40, Amit Kucheria wrote:
> That what I would have thought too. But my NetGear FS516 100Mbit switch 
> shows some characteristics that led me to believe that it "depends" on 
> catching ARPs.
> 
> My scenario is as follows:
> 
> I have 2 virtual devices V1 & V2 (NOARP) on machines 1 and 2
> respectively. They use the physical interface eth0 on the machines as
> slave to send packets. In the virtual device code, I just hardwire the
> source and destincation MAC address in the packet and send it to the
> physical device's hard_start_xmit function, thus doing no ARP.

Do you use the same hardwire src MAC and dst MAC in V1 and V2 or is V2
the mirror of V1 ?

In case I'm not too clear:
>From V1, packets are generated with src MAC xxxxx, dst MAC yyyyy
>From V2, packets are generated with src MAC yyyyy, dst MAC xxxxx

If V2 generates identical packet as V1, this might cause broadcast flood
as the switch keeps alternatly learning MAC xxxxx from two different
ports and never learned on which port is MAC yyyyy (No packets with src
MAC yyyyy are generated so the switch cannot learned it).

Now, if you only generates packet from V1, since the switch never learns
on which port is MAC yyyyy, it will keep broadcasting the packet on all
ports.


> Infact all packets are broadcast on the switch till I send 
> 'normal' traffic through eth0 on both machines.

I think this is the real reason. 'Till you generate traffic from both
machines, the switch will never learn on which port is which machine and
thus, will keep broadcasting packets on all ports.

As it has been previously stated, the switch will create a "MAC Addr <->
Port" tuple from the src MAC addr of packets received on a given port.

If V1 keeps sending message to V2 but V2 never respond or more
generally, never generates any packets, the switch will never see
packets with V2 as src MAC addr, it will never learn on which port is V2
and thus, will keep broadcasting packet for V2 on all ports.

Since in the normal case, arp request establish a "dialog" between two
machines, the switch will see traffic originating from both machine and
thus, be able to build his "forwarding table".

Regards,

Danny


-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux