IP broadcasts
Benjamin Lutz
benlutz at datacomm.ch
Fri Aug 4 04:02:45 UTC 2006
Hello,
I've been playing around with IP packets tonight, and I've noticed a peculiar
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
10.0.0.255, which is the local subnet's broadcast address, and once to
255.255.255.255, which as I understand it, is a general broadcast address.
The first broadcast (to 10.0.0.255) works, the second (to 255.255.255.255)
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
(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
(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 of
ff:ff:ff:ff:ff:ff, so all machines on the subnet receive it. The second
packet has the destination MAC of my gateway, so only that machine receives
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. Maybe
there's some socket option or sysctl I need to set?
Cheers
Benjamin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20060804/02ad145d/attachment.pgp
More information about the freebsd-questions
mailing list