6

I am taking a refresher on Networking and I found out that:

  • Network address is an IP address with all 0s after the subnet mask
  • Broadcast address is an IP address with all 1s after the subnet mask

What is the point of reserving two IP addresses in a subnet when one might suffice?

2
  • This has been asked and answered before. (I'll dig it up later) It boils down to ancient specifications. Both have long been reserved addresses, for various reasons.
    – Ricky
    Commented May 21, 2018 at 15:01
  • @RickyBeam I asked this question to find out those reasons. I'd be happy if you find them up for me.
    – Alex
    Commented May 22, 2018 at 9:37

3 Answers 3

11

What is the point of reserving two IP addresses in a subnet when one might suffice?

[...] If it's theoretically possible, why is it avoided?

We live with our history. The distinction between address of the network and broadcast address was not so crisp as it is now. Some software treats the all-0s as a broadcast, some allows it to be a host, some neither.

Rather than find out exactly what everything in your current and future network requires, you can just "waste" the address to avoid any potential incompatibilities. Interoperatbility is for many organisations the overridingly important characteristic of IP.

The RFC "Requirements for Internet Hosts -- Communication Layers" (after the corresponding part of RFC 791) puts it like this:

     1.2.2  Robustness Principle

     At every layer of the protocols, there is a general rule whose
     application can lead to enormous benefits in robustness and
     interoperability:

            "Be liberal in what you accept, and
             conservative in what you send"

You have to remember that at the time, many of these things were experimental, and the best way of doing something might not become apparent until after you have millions of hosts. Also, the design of IP was competing against many other proprietary and commercial networking protocols; one of the reasons it became dominant is exactly because of this multi-vendor, multi-era compatibility.

So we live with this little wrinkle, and many others, as part of the price of practical networking we can actually use, rather than theoretical networking which might be better in small ways.

0

What is the point of reserving two IP addresses in a subnet when one might suffice?

The network address and the broadcast address are different things. The network address is used to refer to the subnet as a whole e.g. in a routing table. The broadcast address is used to address a datagram to all hosts within the subnet.

Sometimes it's possible to use the all-zero address for a host as well. This isn't well supported though and should be avoided.

5
  • That's my point Zac. If it's theoretically possible, why is it avoided?
    – Alex
    Commented May 21, 2018 at 10:37
  • It's more practical this way. Note that the all-zero address is reserved, so theoretically you can't use it. In practice you sometimes can.
    – Zac67
    Commented May 21, 2018 at 10:54
  • @Alex It may be possible, but that would require modifying every computer in the world. Look how hard it is to adopt IPv6.
    – Ron Trunk
    Commented May 21, 2018 at 12:00
  • @RonTrunk I'm just trying to find out what concept I'm missing that makes it impossible...
    – Alex
    Commented May 22, 2018 at 9:36
  • 1
    @Alex Every computer today expects broadcast to be all ones,. So every computer's software has to be updated. That's a massive, expensive job that would very disruptive. I'm not saying it's logically impossible to do, but practically speaking, I can't imagine why anyone would want to go through the effort to do so.
    – Ron Trunk
    Commented May 22, 2018 at 12:04
0

See also RFC 3021 https://www.rfc-editor.org/rfc/rfc3021 ... sometime the use of network and broadcast addresses for host IS supported.

Back in time, when CPU resource was scarce using such addresses was perfectly understandable since you can use a simple logical calculation with XOR and AND gates to decide if the packet should be routed or not.

4
  • 1
    /31 is a point-to-point hack that has little to do with the all-0's vs all-1's debate.
    – Ricky
    Commented May 21, 2018 at 14:58
  • Using a /31 means that the network address and broadcast are used as a actual address, I don't define this a "hack" since is documented in RFC. Commented May 21, 2018 at 16:12
  • 2
    /31 defines the link as ptp (even if it isn't, eg. ethernet - thus hack) as such there is no "network" or "broadcast". It requires special handling because it would otherwise not allow any space for actual nodes. (for any broadcast medium, like ethernet)
    – Ricky
    Commented May 21, 2018 at 18:02
  • The original question is about variability of usage of network address for broadcasts. The /31 addressing RFC defines the 0 and 1 addresses as host addresses. Even modern computers do the calculation with AND and NOT: the issue here is that the code has to make a special case of /31 in order to avoid the broadcast address behaviour.
    – jonathanjo
    Commented May 24, 2018 at 11:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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