1

When I have one network with a switch. Within that network I have 10 PC. Halve of them are configured within the 192.168.1.0/24 range and the other halve is configured at 192.168.2.0/24.

This means I have within my network two different networks that don't see each other. Now when all the pc's within the networks are broadcasting to each other, within there own range, so to 192.168.1.255 and 192.168.2.255. My assumtion is that the switch just passes the broadcast messages to all the other pc's, but where are the broadcast messages send to the address 192.168.1.255 filtered out, seen from the point of view for a PC within the 192.168.2.0/24 range? Is that done within the hardware of the ethernet card, or does it even pass on to the kernel and gives you an huge penalty in processor performance?

0

Broadcasts are always received by every NIC and passed to the network stack, where they are either dropped or processed further.

There are different types of broadcasts:

  • IP limited broadcast (255.255.255.255) - this is propagated to all nodes inside the broadcast domain and processed by each NIC and IP stack
  • IP directed broadcast (192.168.{1|2}.255) - this is propagated to all nodes by the switches, processed by each NIC, but dropped by each IP stack on subnet address mismatch
  • Ethernet broadcast (ff-ff-ff-ff-ff-ff) - this is what IP broadcasts are encapsulated by to propagate through the broadcast domain and what the switches actually see; they can't see the encapsulated IP broadcasts themselves and can't differentiate them

If you're concerned about overhead and performance penalties (and in pretty much every other case), use multicast instead. Broadcasting is all but obsolete for IPv4 and entirely obsolete for IPv6.

| improve this answer | |
1

A broadcast must be inspected by the network stack in every host to see if the broadcast is meant for that host. The layer-2 broadcast is the same for every frame, regardless of the network, so layer-2 will pass the broadcast up to layer-3 in the network stack. The layer-3 (IP) will look at the destination address and see that it is not meant for that host, and it will drop the packet. Only if the layer-3 broadcast address is in the same network as the host address will layer-3 pass the packet payload up the network stack.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.