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?

  • 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 Beam May 21 '18 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 May 22 '18 at 9:37
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.

  • That's my point Zac. If it's theoretically possible, why is it avoided? – Alex May 21 '18 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 May 21 '18 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 May 21 '18 at 12:00
  • @RonTrunk I'm just trying to find out what concept I'm missing that makes it impossible... – Alex May 22 '18 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 May 22 '18 at 12:04
0

See also RFC 3021 https://tools.ietf.org/html/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.

  • 1
    /31 is a point-to-point hack that has little to do with the all-0's vs all-1's debate. – Ricky Beam May 21 '18 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. – Alessandro Carini May 21 '18 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 Beam May 21 '18 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 May 24 '18 at 11:01

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.