0

Suppose we have a IP Address of a subnetwork of this form:"192.168.1.0/22.".What does the "/" mean in between of 0 and 22?I have never seen a IP Address in such a format.Does it mean that the last integer of the IP Address can be between 0 and 22?

0

1 Answer 1

0

No. It indicates the "prefix length", which is another way of writing a "net mask" or – /22 means a 22-bit prefix (which corresponds to a netmask of 255.255.252.0). The slash notation is usually called "CIDR notation".

Keep in mind that the notation can be used both with single addresses (indicating a host address together with its netmask) or with network addresses (indicating a network of a specific size); usually it's clear from context which one is meant.

In your example, since the "host" bits of "192.168.1.0/22" (the last 10 bits in this case) are not all-zero, it most likely does not indicate a range – not a valid range, anyway – but a single address in the middle of the 192.168.0.0/22 range.

(The actual range is from 192.168.0.0 to 192.168.3.255; the first 22 bits stay the same while the last 32−22=10 bits range from 0 to 1.)

So you can read it as "Address 192.168.1.0 within a /22 network" or "…with a subnet mask of 255.255.252.0" (and yes, it's a valid host address despite the last integer being a zero).

4
  • I was really hesitant to agree on the "duplicate" flag because it feels like the questions are only similar on the surface; both answers involve more than just the notation, but go in different directions (e.g. "public vs private" and "is it a range or a single address"). Commented Jun 24, 2023 at 9:34
  • Isnt the actual range from 192.168.252.0 to 192.168.255.255?
    – Volpina
    Commented Jun 24, 2023 at 9:49
  • Well, no; that's a valid /22 range as well, but it doesn't actually match the address that was in your example – 192.168.1.0 is obviously not within that range... Are you guessing this from the way the netmask looks? Netmasks don't really work that way (they indicate bits, not ranges; the range needs to be calculated). Commented Jun 24, 2023 at 9:55
  • Hmm yes true sorry.
    – Volpina
    Commented Jun 24, 2023 at 9:56

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