6

We were sent the following gateway info from our ISP: gateway: XXX.XXX.XXX.8 /29 I am Xing out the first three octets for privacy purposes because they will remain the same in a /29 network, and we are only looking at the last octet. This does not appear to be valid to me, because within that subnet, the .8 is the network address and .15 is the broadcast address, so the usable range is .9 - .14. Is it possible for the gateway to have a .8 IP address within a /29 network?

Someone suggested to me that it is possible that the network address be something else within that range, other than the first number, and therefore the gateway could use the .8 address. Is this possible?

2 Answers2

6

You are correct and this is wrong.

An IP(v4) address ending in .8 in a /29 subnet has all host bits set to 0; thus it's the network address and it can't pinpoint any specific host. It's just as invalid as the broadcast address (.15).

The usable IP addresses in that subnet range from .9 to .14; the network address and the broadcast address are not valid to use.

More details here: How does IPv4 Subnetting Work?


BTW, it's perfectly fine to have a router use any IP address on a given subnet; using the first or the last one is just a convention.
But you can't use the network or broadcast address.

Massimo
  • 72,827
2

After quite some searching, I found the following in RFC1122

 "IP addresses are not permitted to have the value 0 or -1 for
             any of the <Host-number>, <Network-number>, or <Subnet-
             number> fields (except in the special cases listed above).
             This implies that each of these fields will be at least two
             bits long."

https://datatracker.ietf.org/doc/html/rfc1122 3.2.1.3

This, in combination with Massimo's answer on how host/net calculations work, means we can prove this is not allowed, and you can tell your ISP "I need a different gateway address as you're not conforming RFC1122".

It's not necessarily disallowed because it's the "network address", but simply because the RFC says so.