2

Is it possible to use Nat/Pat to convert a full subnet of 192.168.1.0 /24 as the inside addresses to a single address of 192.168.1.1 as the outside address?

It would require having the same subnet on two interfaces I think?

6
  • What would you be trying to achieve by doing this? Why not, since you're already using RFC1918 space, use a different subnet in 192.168.0.0/16? Commented Mar 9, 2014 at 17:02
  • I have a /24 LAN that is the same subnet as the /30 subnets I use to connect all of my routers. Can you have subnet overlap if the subnet is a smaller subnet? Commented Mar 9, 2014 at 17:06
  • 2
    What kind of equipment are you using, a cisco router would not allow this.
    – fredpbaker
    Commented Mar 9, 2014 at 17:31
  • PAT is really made up. The RFCs use NAPT for what some people call PAT. See RFC 2663, IP Network Address Translator (NAT) Terminology and Considerations, Section 4.1.2 Network Address Port Translation (NAPT): "NAPT extends the notion of translation one step further by also translating transport identifier (e.g., TCP and UDP port numbers, ICMP query identifiers). This allows the transport identifiers of a number of private hosts to be multiplexed into the transport identifiers of a single external address." There is more in the RFC.
    – Ron Maupin
    Commented Jan 30, 2017 at 15:57
  • Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
    – Ron Maupin
    Commented Aug 10, 2017 at 3:19

2 Answers 2

1

Most nat implementations can't handle overlapping address ranges on the inside and outside.

One workaround for this is to pass the traffic through two NATs. The first NAT converts the traffic to a subnet that doesn't overlap with anything and then the second NAT converts it to the new desired source.

You can do this in one physical box by using multiple instances of the IP stack. Vendors of expensive routers call these "vrfs", linux calls them "network namespaces".

2

Re: Can you have subnet overlap if the subnet is a smaller subnet?

You cannot configure overlapping subnets on a Cisco router. IOS issues error message when you attempt to enter the offending IP address.

While not recommended, you can configure a subnet on one router that overlaps with a subnet on another (different) router. For example, router R1 has 10.1.1.1/24 and R2 has 10.1.1.129/25. But this will create problems - often intermittent but problems nonetheless. Not recommended.

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.