4

As far as I know in IP networking the Broadcast address can be automatically calculated from the network and subnet mask.

Even so in Linux ethernet configuration file, we can manually set the broadcast address like:

iface eth0 inet static
 address 192.168.1.100
 netmask 255.255.255.0
 network 192.168.1.0
 **broadcast 192.168.1.255**

So why the broadcast address configurable by hand, what is the reason for it and what situations the automatically calculated address is not applicable?

1
  • 1
    You may want to use non-default address for broadcasting... for example if you want to allow your broadcasts to be routed to another subnet. What's the reason for that can be - I don't know.
    – Akina
    Aug 1, 2018 at 6:58

1 Answer 1

4

So why the broadcast address configurable by hand, what is the reason for it and what situations the automatically calculated address is not applicable?

The broadcast address is configurable by hand mostly because it is a good practice to allow the user to have more flexibility and freedom about what they want to configure.

Besides that, there are two reasons I could think of, that would need a manually configured broadcast address.

  1. IP Directed Broadcasts:
    These are broadcast packets directed to an external (remote) network. You can send a broadcast packet to that network's broadcast address and the router that is the network's gateway will transform it into a Layer 2 broadcast frame and forward it to all hosts in the network. However, these directed broadcasts are usually disabled by default, since they could be used in a malicious way, e.g., smurf attacks , DoS attacks, and more.

  2. UDP Broadcast Packet Forwarding:
    By default routers break the broadcast domain. However, since services like DHCP work by using broadcast packets, routers can be configured to forward broadcast packets to a specific address. This could be the DHCP server's address, another host on the network, or this can even be an IP Directed Broadcast address.

These are two cases where you'd need a manually configured broadcast address. The second case being for a router, though, but nonetheless, it works for a normal host depending on its configuration.
This is not applicable to all routers, example is given for Cisco routers.

You can read more about IP Directed Broadcasts and UDP Broadcast Packet Forwarding in Cisco's Broadcast Packet Handling Guide (pages 3-11).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .