Professional Documents
Culture Documents
VPN with Overlapping Networks – Practical Networking .net
VPN with Overlapping Networks – Practical Networking .net
Networks
In such cases, hosts on one side of the VPN tunnel will be unable to
communicate with the hosts on the other.
Host D will have the same problem, Host D is configured with the IP
10.0.0.88/24 and also believes that the range 10.0.0.0 – 10.0.0.255
exists on its own local network in Denver. Therefore, any packet Host D
sends to the IP 10.0.0.77 will be sent to the local network, and not to the
Router.
If the packets are not sent to the Router, then the Routers are unable to
forward them through the VPN tunnel to the other side. As a result, because
of the overlapping networks, neither side will be able to speak to the other.
This article uses Routers as the device’s performing NAT. Many other
devices can also perform NAT and the concepts described will still apply.
The first solution involves using Policy NAT on both routers to mask their
internal network when speaking to the opposite side. Recall that a Policy
NAT is a type of NAT that involves making a translation decision based upon
matching both the source and destination address.
The same will occur when Host D sends a packet to Host A – the packet will
have a source of 10.0.0.88 and a destination of 10.1.1.77 . This packet
will be sent to R2, who will translate the source IP to 10.2.2.88 .
Inside the VPN tunnel, the packets will be appear as if the 10.1.1.x
network is speaking to the 10.2.2.x network.
When each hosts’ packet arrives at the opposite router, the router will un-
translate the destination address back to the appropriate IP address:
This will enable hosts in Seattle and hosts in Denver to speak to each other,
despite both sites having IP addresses in overlapping networks.
The whole process can be seen in the illustration below. This is, essentially,
a combination of both images above, with the translations each router is
responsible for highlighted:
Solution #2 will still involve a Policy NAT – making a NAT decision based
upon the Source and Destination. In addition, Solution #2 will also involve a
Twice NAT – translating both the Source and Destination. Combined,
Solution #2 will require Policy Twice NAT configuration.
Solution #2 will still solve the overlapping networks problem in the same
way – by convincing the local site that the opposite site is on a foreign
network. The only difference is Solution #2 will attain this effect by
deploying address translation on only one router.
Once again, the goal will be to make the Seattle network appear as
10.1.1.0/24 when speaking to Denver, and make the Denver network
appear as 10.2.2.0/24 when speaking to Seattle.
Since Host A (in Seattle) considers Denver as 10.2.2.0/24 , R1 must be
configured with a Policy NAT that matches traffic with a Source of
10.0.0.0/24 and a destination of 10.2.2.0/24 .
On the way back, when Host D is responding, the packet will have a source
of 10.0.0.88 and a destination of 10.1.1.77 . The packet will be sent to
R2, which will forward it through the VPN tunnel. Upon arriving at R1, R1
will un-translate the packet:
In this way, we can use a single Policy Twice NAT on one side of the VPN
tunnel to mimic the behavior of using a Policy NAT on both sides outlined in
Solution #1.
Summary
In the end, both solutions above accomplished the same goal: they made it
seem like the IP networks on either side of the VPN tunnel were unique, and
did not overlap.
Of course, the ideal situation would be for both sides of the VPN tunnel to
actually have unique IP networks. But failing that, the solutions above
provide a practical work around.
Comparing the two solutions, Solution #1 is cleaner, and most likely to lend
itself to simpler troubleshooting and debugging in the future. Both sides of
the VPN tunnel are equally contributing to the overall solution.
Solution #2, while viable, should be reserved only for cases where both
sides are unable to or unwilling to configure a Policy NAT.
Related Posts:
Subscribe
{}
44 COMMENTS Oldest
Tim Kowalski
5 years ago
Hello Ed,
Thank you for the excellent explanation on how to solve an issue like this. I have
included an example of how your Solution #2 would look on a Cisco device. Is
this correct?
SeattleInside
subnet 10.0.0.0/24
Seatle2Denver
subnet 10.1.1.0/24
ToDenver
subnet 10.2.2.0/24
DenverInisde
subnet 10.0.0.0/24
nat (inside,outside) source static SeattleInside Seatle2Denver destination static
ToDenver DenverInisde
Thanks again!!
0 Reply
Ed Harmoush Author
Yeap, looks right to me! You’re configuring a Policy, Twice NAT on a Cisco
ASA running 8.4+ code.
0 Reply
techkludge
5 years ago
Hej Ed,
You are gem in explaining and depicting the network diagrams to clearly focus on
the subject, there is always a pleasure reading your posts. Thumps Up!
0 Reply
Ed Harmoush Author
Hi techkludge,
Hopefully though, there is enough details in the article and in this Cisco ASA
NAT configuration guide or Cisco IOS Router NAT configuration guide that
readers can put together the relevant NAT commands themselves. =)
Thank you for the kind words.
1 Reply
Jai Hind
5 years ago
Good work.
May I know which tool do you use for drawing those topology diagrams?
0 Reply
Ed Harmoush Author
Hi Jai, Thank you! I use PowerPoint for all my illustrations. It isn’t the best
tool, but I’ve gotten pretty accustomed to using it.
0 Reply
Ibrahima
5 years ago
Hi Ed,
Your websirte is a treasure for me. Thanks for the great explanations.
I do understand the whole NAT-ting process, However I still don’t get how does
the computers in seattle know that they should use the 10.2.2.0/24 to reach
Denver (and vice versa) ?
Is this achieved through a DNS manipulation ?
Thanks,
0 Reply
Ed Harmoush Author
0 Reply
FXG
4 years ago
Hello Ed,
Thank your very much for your article. However I’m not quite sure to understand
this part in the #1 solution :
How the router is able to know that the destination adress must be translated ?
It only has a Nat rule to translate the source adresse no ?
Thanks for you help.
FXG
0 Reply
Ed Harmoush Author
For inbound packets, the reverse happens: the destination is translated from
10.2.2.0/24 back to 10.0.0.0/24, hence — untranslated from the outbound
translation.
0 Reply
Georg Pauwen
3 years ago
Hello,
great article. How does the routing work ? If I ping a remote address that
overlaps with a local address, the router will never know it is a remote address,
unless you ping the DNS name associated with the other side, is that the right
assumption to make
0 Reply
Ed Harmoush Author
Hi Georg. That is exactly why you need to mask the other side to so it
appears as a different network to the local side. In each example above,
Seattle thinks Denver is the 10.2.2.0/24 network, even though Denver is
actually the 10.0.0.0/24 network.
0 Reply
Richa
3 years ago
Best ever explanation on vpn concept with NAT. Thank you for your effort on
emphasizing on each and every major point.
0 Reply
Ed Harmoush Author
0 Reply
Oshie
3 years ago
But can you please fix my problem in my network, i try my best to explain it to
you.
cheers
0 Reply
Ed Harmoush Author
0 Reply
yasir ilyas
3 years ago
Good article. helped me a lot. I have one question though . I am assuming but
wanted to confirm.
So when traffic sourced out of Seattle with Src ip of 10.2.2.88. I am assuming
Seattle network will somehow advertise that src subnet within Seattle network
may be a null route and redistribute internally with igp or ibgp etc. So the return
traffic is delivered back to this Seattle headend router?
0 Reply
Ed Harmoush Author
Yes. The Routers in Seattle will have to know about and advertise
knowledge of the 10.2.2.x network. Once the traffic gets to the
Headend/VPN Router, it can do the NAT necessary to get it to Denver.
0 Reply
Sajesh
3 years ago
In both the case, what will be the VPN Encryption Domain ACL/ Intresting traffic
ACL through the VPN is ???
It will be 10.1.1.x/24 and 10.2.2.x/24 on R1 and on R2 vice versa if im not wrong.
0 Reply
Ed Harmoush Author
It’s going to differ for each device and vendor, some interpret the Encryption
Domain (or Proxy IDs) before translation, and some do it after translation. So
I can only speak to the devices I’ve had experience with, and for those
devices the Encryption Domain will typically match the traffic as it appears
inside the tunnel (10.1.1.0/24 <--> 10.2.2.0/24).
0 Reply
Dan Joe
3 years ago
Hi This is very helpful. Can you elaborate if it is possible for the following
scenario for the Solution #2?
Currently your example is using two /24 subnets to mask the source IP for both
the West and East endpoints. The Seattle sees Denver as 10.2.2.x/24 and
Denver sees Seattle as 10.1.1.x/24.
0 Reply
Ed Harmoush Author
If so, the honest answer is I don’t know. I don’t think anything would stop
you from configuring the NAT in that way, but I’m wondering if you’ll confuse
the Router/Firewall, since now a single subnet exists in two locations?
0 Reply
Dom ROSS
3 years ago
0 Reply
Ed Harmoush Author
You’re welcome.
For NAT configuration instructions on Cisco Routers, I would point you to this
article:
https://www.practicalnetworking.net/stand-alone/cisco-nat-configurations-
ios-router/
Although, what you would need is instructions on a Policy NAT, which I’ve
only published in my Cisco IOS NAT Course.
0 Reply
Dom ROSS
Reply to Ed Harmoush 3 years ago
Thanks,
should i find in the course the configuration commands (with IOS) for
this example ?
Regards
0 Reply
Ed Harmoush Author
Yes. =)
0 Reply
sahara101
3 years ago
Hi Ed,
Thank you for the explanation. I don’t understand one thing. I want to migrate
VMs from Site A to Site B without changing any IP configurations on them. WHat
will happen if I move the DC to Site B, how will the VMs from Site A
communicate with it? As it is the same subnet…
Thank you!
0 Reply
Ed Harmoush Author
0 Reply
sahara101
Reply to Ed Harmoush 3 years ago
Thank you, so we are better off creating new network on one side and
migrate all machines at once.
0 Reply
Girish P
3 years ago
Ed Harmoush Author
Yes. Of course =)
0 Reply
Aoa,
I have two subnets both on same network (192.168.137.0/24) behind two
ubuntu server devices. how I gave NAT to these devices to look that these
subnets are on different networks.
My configuration is under:
(192.168.137.19)Client1—-(192.168.137.10)UbuntuServer(10.10.3.10)====
(10.10.3.10)UbuntuS2(192.168.137.11)—-(192.168.137.20)Client2
0 Reply
0 Reply
Ed Harmoush Author
I’m not familiar with ubuntu NAT configuration. I’m afraid I can not help you.
The article is meant to speak to the concepts, not the actual configuration.
0 Reply
Cesar Sindoni
2 years ago
Question, it seems this is happening between predeterminate locations…what
about users trying to access a site from multiple locations, Is there any way to
change the settings on their computers so they are able to login via VPN?, as I
understand, NAT has to be configured from both sides, but I am talking about
users at home. Its admirable that you reach the point to explain this process in
such details. Your efforts are appreciated!
0 Reply
Ed Harmoush Author
Often it’s easier to simply change the IP address assigned to VPN clients so
it doesn’t overlap with their home network, or a foreign VPN network.
0 Reply
Jeff Rozar
2 years ago
Can anyone show or know how to setup DNS for this configuration to get it to
work?
0 Reply
Ed Harmoush Author
0 Reply
Daro
2 years ago
0 Reply
Vinay
1 year ago
Hello Ed Harmoush,
I watched all your videos including Twice NAT on IOS router but
couldn’t configure it. If you provider sample configuration based on above image
that would be helpful.
Thank you!
0 Reply
Farrukh
1 year ago
Hi Ed,
Thanks for explaining the need of NAT in Site-to-Site VPN configuration. I have a
situation where there might be a problem utilizing NAT for VPN configuration
and I need your advise on that.
Taking reference from the example network used in blog, lets suppose both
PC”A” and PC”D” wants to transfer data using some protocol where only their
original IP address can be used (not the translated one) to address the Host.
How in that scenario, they would be able to communicate?
0 Reply
Ed Harmoush Author
Reply to Farrukh 1 year ago
They cannot.
Short of other such work arounds, two devices physically sitting in foreign
networks, but sharing IP space cannot communicate.
0 Reply
Farrukh
Reply to Ed Harmoush 1 year ago
0 Reply
leo0
1 year ago
0 Reply
Most read articles this
week:
Configuring VLANs on Cisco
Switches
1.1k views
Practical TLS
Understanding Ethernet Wiring
The most thorough SSL and TLS
1.1k views
course
Virtual Local Area Networks
(VLANs)
1k views
CCNA — Index
805 views
Your E-Mail:
Your Name:
CCNA CCNP cisco
vlans VPN