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

Attachment: pgpfiAPFRsTKa.pgp
Description: PGP signature

Reply via email to