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?

  • Hey @Rob, just to add another probability: You haven't mentioned your IP address (last octet). If you were provided with a single IP (and not a block) the subnet mask may be wrong - could it be a /31 instead of /29? – GCon Oct 07 '23 at 22:44
  • Likewise. What exactly did the ISP tell? If the ISP chose to configure its router differently you might have been given a /29, but to be addressed as 8 /32 (thus forfeiting the concept of IP broadcast): in such case each system between .9 and .15 included would have to use a /32 address (not a /29) and specifically add a /32 link route to the router and then a default route using it (or use the few available shortcuts for this depending on the OS). – A.B Oct 08 '23 at 11:46

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
  • 71,269
  • 5
    However OP will need to have the ISP correct this, as if they have assigned his gateway the impossible .8 address, likely they have also assigned all the possible addresses (and maybe the impossible .15 address as well) to other subscribers. – tsc_chazz Oct 06 '23 at 21:52
  • Are you certain this applies to gateways as wel as hosts? I seem to remember an exception for gateways. Any RFCs you could reference? – Daniël van den Berg Oct 08 '23 at 07:06
  • 3
    @DaniëlvandenBerg, a gateway is a host on the network that knows how to reach other networks. – Ron Maupin Oct 08 '23 at 07:39
  • @RonMaupin neither RFCs 791/792 nor ien109 mention anything along the lines of host 0 being reserved, for anything. So, where does it come from? Where's the proof/specs? All I can find is people saying "trust me, I know how it works". – Daniël van den Berg Oct 09 '23 at 05:16
  • I just ran into RFC917 again, and noticed that host 0 is used there as an anonymous host which doesn't know it's host number. Only reference I can find so far. – Daniël van den Berg Oct 09 '23 at 05:24
1

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.