I'm wondering if I can use the network and broadcast IP addresses of a /24 subnet, when the /24 subnet is included in a larger /22 subnet range for NAT?

PS: Please consider that is Public IPv4 address for NAT.

For example, i have 4 times /24 subnets such as:


I'm using them all for NAT. In this case i'm using their only usable IPs such as:

- to198.51.0.254
- to198.51.1.254
- to198.51.2.254
- to198.51.3.254

But i wanted them to use aggregated/summarized like this: -

Which means i have to use NAT like: - to198.51.3.254

In this case, Network and broadcast IPs such as:

are used for NAT. Is it really okay to use like this?

  • Please do not use any public IP addresses that you do not own, not even in an example - I have replaced 1.x by 10.x for you.
    – Zac67
    May 3, 2023 at 7:47
  • Please specify "use for NAT" - is 10.x used for a public, outbound NAT pool? Are you source NATing private 10.x to something else?
    – Zac67
    May 3, 2023 at 7:49
  • Okay, Thank you for correcting and sorry for using real public IP that i don't own in example. But in my question, i asked about real Public IPs for NAT full-cone. i'll change that 10.X private IP to X.X.0.0 ? So i hope it that people won't get wrong idea tho.
    – Ulteara
    May 3, 2023 at 7:58
  • The best way is to use documentation IP addresses ;)
    – JFL
    May 3, 2023 at 8:04
  • @jfl The doc ranges are only (TEST-NET-1), (TEST-NET-2), and (TEST-NET-3) - not /16!
    – Zac67
    May 3, 2023 at 9:03

3 Answers 3


Yes you can simply use the, and any addresses apart and are host addresses within that subnet.

This requires that you don't have any address within that subnet configured with a /24 suffix anywhere on your network.

The other way around:
If you have the network, then you can have a host with address

If you subnet this network in two, you get:


Now, beacame the network address of and you can no more use it as a host address.

(Nor which is the broadcast address of

  • Thank you for answering, I'm lack of experience and knowledge. So i wanted to learn from experienced engineers :). So do you have similiar experience like using and IPs for NAT and there's no problem? since you only announced your IP as /22 SUBNET?
    – Ulteara
    May 3, 2023 at 8:08
  • Yes, there's nothing special about a /24 compared to a /22, except it is more readable for humans. If you convert the address and subnet mask in binary you'll see for example is a perfectly normal host address within The 0 and 255 are no magic number, it's better to think about "the first and last addresses in the subnet".
    – JFL
    May 3, 2023 at 8:15

If the /22 isn't attached to an interface - just a route entry, then there is no "network" and "broadcast", it's just a block of addresses. So, if the ISP is routing the /22 to a WAN address, you can use every last address. Yes, it will be confusing to people seeing zeros and 255's in addresses, but they are perfectly valid.

(I've done this many times. But no one's ever routed me something as big as a /22. :-) In Cisco IOS, if you enter the pool as xxx/22, it will automatically exclude the zero and 255 addresses. Entered as a range, it will use every address given.)


In my opinion, i don't see any problem to use /22 network on NAT as long as i reserve /22 subnet's Network and Broadcast IPs.

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.