Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Aug 2006 06:02:25 +0200
From:      Benjamin Lutz <benlutz@datacomm.ch>
To:        questions@freebsd.org
Subject:   IP broadcasts
Message-ID:  <200608040602.29799.benlutz@datacomm.ch>

next in thread | raw e-mail | index | archive | help
--nextPart1327891.zGBWxTohYJ
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hello,

I've been playing around with IP packets tonight, and I've noticed a peculi=
ar=20
behaviour in FreeBSD that I can't explain. Can someone provide some insight?

Specifically, I've been sending IP packets to broadcast addresses, once to=
=20
10.0.0.255, which is the local subnet's broadcast address, and once to=20
255.255.255.255, which as I understand it, is a general broadcast address.=
=20
The first broadcast (to 10.0.0.255) works, the second (to 255.255.255.255)=
=20
doesn't.

Looking at it with tcpdump on the sending machine, I see this:

05:46:52.057994 00:12:17:5a:b3:b6 > ff:ff:ff:ff:ff:ff, ethertype IPv4=20
(0x0800), length 136: 10.0.0.1 > 10.0.0.255:  ip-proto-255 102

05:47:16.472315 00:12:17:5a:b3:b6 > 00:40:63:d9:a9:28, ethertype IPv4=20
(0x0800), length 136: 10.0.0.1 > 255.255.255.255:  ip-proto-255 102

In other words, the packet to 10.0.0.255 is has a destination MAC address o=
f=20
ff:ff:ff:ff:ff:ff, so all machines on the subnet receive it. The second=20
packet has the destination MAC of my gateway, so only that machine receives=
=20
it, the other machines on the net don't see it (the ethernet uses a switch).

Things work as expected when sending the packets from a Linux machine. Mayb=
e=20
there's some socket option or sysctl I need to set?

Cheers
Benjamin


--nextPart1327891.zGBWxTohYJ
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQBE0sbVgShs4qbRdeQRAlLZAJ93RW5febIlktpNMia5Y6MiqhOSiACdGT26
kIsGlsmb8I+4/qXRwFaewqc=
=RQL2
-----END PGP SIGNATURE-----

--nextPart1327891.zGBWxTohYJ--



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