7

I am trying to do some networking lab. Basically, I have a network like this:

enter image description here

So, is it possible to configure NAT router in such way, that PC1 and PC2 can access remote HOST and each other. The problem for me is that PC1 and PC2 have same local ip addresses.

3
  • place of NAT router is strange for me, you may apply NAT on R1 and R2 cause you actually need to NAT the ip of the PCs to the range of 172.16.X.0
    – Gadeliow
    Commented Jun 4, 2017 at 8:28
  • NAT is configured on R1 and R2 to translate ips to outside interfaces. The problem is how can I access both the HOST and PC2 from PC1? NAT router should translate ips to global 20.0.0.0 range and also destination addresses from PC1 and PC2 to each other.
    – mcferden
    Commented Jun 4, 2017 at 8:48
  • should accomplish the mission by Routing you don't need any NAT to make any thing talk to any thing , the only problem may i face is that the 2 PC has the same IP so how they could reach each other
    – Gadeliow
    Commented Jun 4, 2017 at 8:53

2 Answers 2

4

The scenario you have is one faced by companies that merge, but they have the same private network addressing. Since you have tagged your question with the Cisco tag, you should use the Cisco solution, which is outside source NAT. Cisco has some documents that describe how to use outside source NAT, including Sample Configuration Using the ip nat outside source list Command. I have highlighted below what the introduction says about overlapping networks:

This document provides a sample configuration with the ip nat outside source list command, and includes a brief description of what happens to the IP packet during the NAT process. You can use this command to translate the source address of the IP packets that travel from outside of the network to inside the network. This action translates the destination address of the IP packets that travel in the opposite direction—from inside to outside of the network. This command is useful in situations such as overlapping networks, where the inside network addresses overlap addresses that are outside the network.

4

You'd need what with Lancom is called N:N NAT: translate both subnets to each other, so that one thinks it's talking to 192.168.11.0/24, the other to 192.168.12.0/24 (or any other unique range).

It's not easy to set up and can be a major pain to debug, so if there's any chance I'd rather change the subnet address on one side and route them without NAT.

If there's no easy way to change a subnet, maybe you can get away with adding another, unambiguous subnet on top on each side, so that each PC has two IP addresses, one of which can be routed from the other.

Changed or at least additional unique addresses would also solved the problem with the single NAT router: you assign the default gateway only to the unique address binding, then you can NAT to WAN without problem. Alternatively, you'd need at least one additional NAT router before the central one.

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.