Re: Switches and ARP

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

 



On Thu, 27 Jun 2002, Patrick Schaaf wrote:

> > >From what I have seen in experiments, swtiches autolearn the various
> > (Ethernet) interfaces connected to its various ports using the ARP
> > requests and replies flowing through them. And they forget it after
> > a while of 'no use'.
> 
> That is wrong. ARP has nothing to do with it. Switches learn the MAC
> addresses by looking at the source MAC address coming in on the port,
> and nothing else.

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.

Now at the switch, I see something strange. The switch _broadcasts_
these packets to _all_ connected ports, thus behaving like a hub. This
leads to a severe drop in thruput. This happens if I have just
cold-started the switch.

But if I first send traffic between machines 1 and 2, and then try the 
above experiment, it works. Thus sending packets thru the normal 
mechanism which obviously causes ARPs leads the switch into 'learning' 
the interface addresses. This is the reason I concluded that it depended 
on ARP.

Maybe it is just a property of this particular switch.

> > My question is: Will they forget an entry even if traffic is
> > continuously flowing thru that port?
> 
> Maybe. The next packet will reestablish the mapping. The switch won't
> guarantee you that it keeps the mapping all the time. It may just have
> been rebooted between two frames.

In my case, without ARPs, the next packet is still broadcast on the 
switch. Infact all packets are broadcast on the switch till I send 
'normal' traffic through eth0 on both machines.

ciao,
Amit

-- 
I'm an angel!!! Honest!
The horns are just there to hold the halo up straight.
^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^
                  Amit Kucheria
          EECS Grad. Research Assistant
         University of Kansas @ Lawrence
   (R): +1-785-830-8521 ||| (C): +1-785-760-2871
____________________________________________________

-
: 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