I'm confused how CIDR broadcasts work when using the all 1's address (

From my early (Classful networking days), I recall that ping from a machine on a Classful network causes every device on that subnet to respond. I also know that we can have directed broadcasts (e.g.

Now, with CIDR, device addresses need not fall into the /24 (or /16, /8) buckets, and instead may be placed into smaller or larger buckets. This means that a directed broadcast address can be different. However, what happens when a device on a CIDR subnet pings

For example:

    Hostname   Device IP      CIDR?     Directed Broadcast
    Host A   Class C
    Host B   /27
    Host C   /27
    Host D   /27

I know, for each of the above Directed Broadcast addresses, each Host (and any peers) will receive a ping from its respective broadcast address. That is, Host A runs ping it is seen by Host C and not by Hosts B or D.

If Host A pings, every device on receives that ping.

What happens if Host C runs ping Will only subnet 192.168.32/27 see the ping? Will the all 1's address hit Hosts B and D, too?

  • note that in your specific example, CIDR has no impact whatsoever on a broadcast to With CIDR, in this sense, you are not specifying a mask at all, except by the address you target, and leaving it up to the intermediary systems between target and destination to determine the scope of the packet on the networks they know. will still hit all ip addresses in all rages. for example in your /27 networks, an upstream host does not know that they are /27, so if it sent to, it would broadcast to all of the /27 networks. the router determines that. Nov 25, 2015 at 19:37
  • CONT. This approach is essential for Route Aggregation (in the old days called "Supernetting") so that an Internet backbone router in France can reffer to all the networks in North America with only a handful of routes. This is important for router performance. as the traffic gets closer to north america, the routes become more specific so that eventually you hit a router that knows a route to Iowa, and from there a route to the city Springfield, and then a route to the neighborhood clearcreek, etc. Big routes encompass many smaller routes. Nov 25, 2015 at 19:41
  • OK, so I gathered from your comments and this CLN Post that the ICMP Ping broadcast travels until it hits the Router and dies when crossing into a different network. All intervening network devices propagate the packet to all appropriate network ports restricted by subnet and/or VLAN. Did I understand that correctly? Nov 25, 2015 at 19:59
  • more or less. In theory you should be able to ping every device in the world with, but this is obiviously harmful, so the capability has been curtailed. In your case, an upstream device will see as a single network, so the router that knows that these are differant networks will make decisions about teh scope of the delivery. this can lead to cases where an upstream device believes that .31 is a host, but the downstream router will treat it as a broadcast. Nov 25, 2015 at 20:06
  • I should also point out that in my comments, I'm not really restricting my thoughts to specific protocols/applications like ICMP Echo, but discussing the meaning of the IP. Pinging in and of itself introduces another set of complexities as vendors try to implement the specs on their devices and have t make real world decisions. @DAvid Schwartz's answer is more specific to ping implenentations in particular, and is perfectly valid from that perspective. Nov 25, 2015 at 20:21

1 Answer 1


If a host pings, the ping will go to every host in its broadcast domain. That will typically include every host in its subnet, but can be larger than that. Any number of subnets can be in the same broadcast domain.

  • In the above example, who gets the ping from Host C? Which addresses specifically? Nov 25, 2015 at 19:23
  • I think you may be confusing layers 2 and 3. a broadcast that is limited by "broadcast domain" (eg a switch fabric with no interstitial routers or devices that reframe the datagram) is a MAC broadcast targeted to FF:FF:FF:FF:FF:FF. an IP broadcast however can hit multiple networks, and can cross routers if correctly they are configured. Most routers however will not pass an IP broadcast in this fashion however. Nov 25, 2015 at 19:33
  • Pings to are typically mapped to Ethernet broadcasts to FF:FF:FF:FF:FF:FF. Anything can be configured to happen. I don't think the OP's question is that broad. Nov 25, 2015 at 19:43
  • fair enough. that is a very logical solution to the problem. Nov 25, 2015 at 20:06

You must log in to answer this question.

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