Skip site navigation (1)Skip section navigation (2)
Date:      02 Jan 2003 14:39:02 -0500
From:      Lowell Gilbert <freebsd-questions-local@be-well.no-ip.com>
To:        Yann GROSSEL <y.grossel@hexanet.fr>
Cc:        "Bill Moran" <bill_moran2@hotmail.com>, freebsd-questions@FreeBSD.ORG
Subject:   Re: promiscuous mode / strange ethernet packets duplication problem
Message-ID:  <44hecrmje1.fsf@be-well.ilk.org>
In-Reply-To: <20030102151706.459fc2fc.y.grossel@hexanet.fr>
References:  <F104YTxHwMQFLcVcvIh0001dacb@hotmail.com> <20030102151706.459fc2fc.y.grossel@hexanet.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
Yann GROSSEL <y.grossel@hexanet.fr> writes:

> On Thu, 02 Jan 2003 08:56:42 -0500
> "Bill Moran" <bill_moran2@hotmail.com> wrote:
> 
> > There's your answer.  Any machine with forwarding turned on will resend
> > a packet that isn't destin for it.  That's by design.
> > It doesn't make much sense to me that you'd have a lot of machines with
> > forwarding turned on.  Usually only gateways use this.  Honestly, I
> > can't thing of any reason to have forwarding on if your machine only
> > has 1 IP address.
> > 
> > >As several boxes have this problem, they resend packets to each others
> > >very quickly, generating a flood on the network. This flood only stop
> > >when all TTL of packets reach 0 or when the switch finally re-learn
> > >on what port is located the interface with the target MAC address.
> > >
> > >Does anybody have any clue about what this kind of problem may be ?
> > 
> > Turn forwarding of on all but your gateways.
> 
> Mhhh.
> 
> Gateways are designed to forward packets from network to network. If a
> machine wants to send a packet to a remote network, it will send that
> packet to the gateway by putting the gateway interface MAC address in the
> destination field of the ethernet packet. The gateway will know that it
> must forward the packet because of that. And it will know where to forward
> the packet by looking to the destination IP address field of the packet.

Yep.

> Here the machines are "forwarding" ethernet packets with a destination
> MAC address field set to ANOTHER machine of our network. In other words,
> these packets are NOT targetted to the "gateways", neither from their
> MAC address destination field nor from their IP address destination field.

The machines doing the forwarding don't know that.

> So why are these packets "forwarded" ?

That's what a router does; when it receives a packet that isn't for
itself, it forwards the packet towards the destination.  Your FreeBSD
machines, by running in promiscuous mode, are receiving *all* the
packets on their bit of the wire, and are correct to do so.

[A host on that net could send *all* of its packets to a gateway, even
the ones to the local net, and expect them to get to the right
places.  This "one-armed router" configuration is legitimate and
occasionally useful.]

Here's what's probably happening:  the MAC address mapping times out
on the network switch before it times out on the routing hosts
("gateways").  Then the switch sends those packets to the routing
hosts.  The routing hosts normally would be screening out those
packets on the NIC, because the destination MAC address doesn't belong
to the host, but because it's in promiscuous mode, it sends the packet
to the IP stack anyway.  The IP stack knows how to reach the
destination IP address from the packet, and does so.

The correct solution is one of two things:  make sure that the switch
doesn't time out its MAC address mappings any faster than the hosts
do, or make sure that the the forwarding machines don't get into
promiscuous mode unless they're supposed to.  Going further out on a
limb, I'll guess that the switch is not refreshing its mappings from
passing traffic like an ARP host would, and a smarter switch wouldn't
have this problem.

Good luck.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44hecrmje1.fsf>