0
votes

While Layer-2 Broadcast is very simple and straightforward, have dst mac in ethernet hdr = Broadcast mac, and you are done (Eg. ARP broadcast request msg). My question is how to achieve Layer-3 Broadcast using TCP/IP stack.

What should be the content of ethernet hdr and IP hdr (in terms of src and dst mac and src and dst ip addresses)? Basically I am looking at what should be the content of packet headers to facilitate ip/layer-3 broadcast. I have a topology of L3 routers connected. I want to know how one L3 router could broadcast a frame/pkt so that it reaches every other router. How to do L3-broadcast?

Is dst ip in IP hdr should be 255.255.255.255 in addition to dst mac in erthernet hdr = FF:FF:FF:FF:FF:FF?

1

1 Answers

1
votes

you need to send the packet to the subnet broadcast address. for example, you have a network 192.168.1.0 255.255.255.0.

If you are sending a packet to 192.168.1.255 (routed), the router will generate a broadcast with destination FF:FF:FF:FF:FF:FF in the ethernet header.

But, many router are suppressing this. On Cisco Router, you can enable this with the command "ip directed-broadcast" on a interface.

try it out in your LAN.. take the broadcast address of your subnet (the very last address) and make a ping to that address... you will see an answer from many devices (not all devices will respond, depending on their implementation)

WakeOn LAN for exaple take usage of this method.. google it.

Routing directed broadcast

its not possible to reach multiple L3 Network because there is nothing like "l3 Broadcast" broadcast is Ethernet! If you want to do it, you need a bridged network (l2circuit) between the 3 Sites. Or, you can use Multicast if you want a 1 to many stream.

edit: maybe i should mention, per definition of ip, there is no broadcast! ip knows unicast and multicast. so you will not find any one router in the world that has something implemented like ip-broadcast. you have to write your application based on multicast!