7

What is the difference between broadcast addresses ff.ff.ff.ff.ff.ff (Layer 2) and 255.255.255.255 (Layer 3)?

6

You need to understand the difference between layer-2 and layer-3 for an answer to have any real meaning for you, and I suspect you don't.

A layer-2 network is a LAN, and all hosts on it are peers. A LAN is bounded by layer-3. The layer-2 frames are delivered to the host with the destination MAC address in the frame. I one host wants to send something to all the hosts on the LAN, it will address the frame(s) with the ffff:ffff:ffff MAC address. Each host is obligated to strip the frame and inspect the packet to see if the packet is meant for it.

A layer-3 network is usually, but not always, on a layer-2 LAN. Router use layer-3 to send packets between LANs. A host on a LAN cannot send a layer-3 packet without first encapsulating it in a layer-2 frame, and that requires layer-2 MAC addresses.

You need ARP (or an equivalent, see IPv6) to resolve the layer-3 address to a layer-2 address. When a host sends a packet to another host on the same LAN, it first looks in its ARP cache to see if it has a layer-2 address for the layer-3 address. If it does not, it sends an ARP request. The ARP request is broadcast at layer-2 to all hosts on the LAN, looking for the host which owns the layer-3 address. The host owning that address will respond with an ARP reply, giving the requesting host its MAC address. In this case, a layer-2 broadcast gets the attention of all the hosts on the LAN, but only the host with the layer-3 address responds.

A layer-3 broadcast packet is meant for all hosts on the layer-3 network. When a host needs to resolve the layer-3 broadcast, it uses the layer-2 broadcast address for the frame.

There are two types of layer-3 broadcast: the limited broadcast, 255.255.255.255, as you noted, and the network broadcast, the highest IP address in a network. The limited broadcast can never cross a router, while a network broadcast may cross a router if the router has been configured that way, although that is considered a security risk, and routers do not allow this, by default, but that was not always the case.

| improve this answer | |
  • Ron, I know the difference between Layer 2 and Layer 3 but I could not visualize the difference between these two broadcsts. Example, A host which belong to a particular LAN, can broadcast with address 255.255.255.255. This message will be sent to all devices in that LAN. It can also send a layer 2 broadcast using the MAC address ff.ff.ff.ff.ff.ff. This will again be broadcasted among all devices in that LAN. So, how do I see these two same things to be different? – Rakesh Nittur Apr 4 '16 at 1:08
  • 1
    The difference is to which layer the broadcast will be delivered. If a host gets a layer-2 broadcast in which its layer-3 has no interest (e.g. an ARP request for a different host), the layer-2 broadcast will not be delivered to layer-3. – Ron Maupin Apr 4 '16 at 1:12
  • Okay, this is what I understand. If it is a Layer 2 broadcast, L3 has nothing to do with that frame. If it is a layer 3 broadcast, both L2 and L3 should process it. Which layer process these messages is the difference but the message will reach all the LAN devices. Am I correct? – Rakesh Nittur Apr 4 '16 at 1:25
  • 1
    Right, You said you understood the difference between the layers. They are independent. For example, IPv4 is not the only layer-3 protocol which ethernet can carry, and ethernet is not the only layer-2 protocol which can carry IP. The layer-2 addresses, including the broadcast address, are specific to layer-2 and its frames, which are stripped off before the layer-3 packet is delivered to layer-3. – Ron Maupin Apr 4 '16 at 1:30
0

Without over-complicating the main and simplest difference is this:

L2 broadcast will be sent to all devices in the same physical domain (Switch, LAN, Bridge). L3 broadcast will be sent to a broadcast ip address (last ip of a subnet), so it can be recieved by all ip adresses of that subnet. Example 192.168.1.0/24 (broadcast 192.168.1.255) will be sent only to ip addresses of that subnet, devices on the same physical domain that are not part of that ip subnet will drop the traffic.

| improve this answer | |
-1

Perhaps another way to look at it is this.

L2 broadcasts are generally limited to the physical device (assuming all ports of the device are in the same broadcast domain) but does not exceed the boundary of the device. L3 is device independent. So a broadcast done on a switch at L2 might only get responses from other devices connected to it, while L3 broadcasts can talk to all devices (across multiple switches/routers) within the same L3 broadcast domain.

(Someone can correct me if I'm wrong.)

| improve this answer | |
  • That is not correct. When I connect two switches together and send an Ethernet broadcast to the first switch, it also reaches clients on the second switch. Additionally, with bridged Ethernet / Wi-Fi, an Ethernet broadcast will also reach Wi-Fi clients. Also, an IP broadcast will not usually cross a router. – Zac67 Nov 8 '17 at 18:14
  • Routers drop the broadcast packets and that's how the L2 broadcasts are limited to just that LAN where it originated. – Rakesh Nittur Nov 8 '17 at 19:10
  • @Zac67 my comment was assuming there is a router between each switch. If a router is between you and the other device it generally will not traverse the router (regardless of L2 or L3). Yes, if you are connecting multiple switches together and no router is between them then both L2 and L3 will traverse because L2 and L3 will not see switches individually. (unless it is a smart switch and it is configured that way). Otherwise, my statement above is accurate. – Quilnux Nov 9 '17 at 23:49
  • @RakeshNittur not always. It depends on configuration. It "can" be done at L3, but cannot at L2. – Quilnux Nov 9 '17 at 23:51

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.