Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This may seem like an odd question, but I'm in a corporate network and VPNing in to Amazon's AWS, both of which use the same block of addresses. Ultimately, there is no overlapping, but I can't set up static route tables to divide the two networks. I have dnsmasq configured to properly route DNS queries either to the Amazon DNS server or the internal DNS server, but I'd like the responses to be dumped as routes so that subsequent requests are served correctly. Any ideas on how to go about this?

EDIT: Let's say I have 2 adapters, TUN1 and ETH1. I also have two domains DOMAINA.COM and DOMAINB.COM. All request to *.DOMAINA.COM should be served through TUN1 and all requests to *.DOMAINB.COM should be served through ETH1. Both DOMAINA.COM and DOMAINB.COM addresses sit in the block, but...

If I request SERVERA.DOMAINA.COM and it returns, I should also route through TUN1. If I request SERVERB.DOMAINB.COM and it returns, should route through ETH1.

share|improve this question
I think you may need to provide more detail here and maybe some examples of what you expect to happen. – Zoredache Oct 3 '11 at 23:46
@Zoredache, added a clarifying example. Does this make it a little more clear? – Stefan Mai Oct 3 '11 at 23:57
I don't have any experience actually setting one up, but you are looking for information on a stretch vLAN. Hopefully having that term will help your google-foo. – mrdenny Oct 4 '11 at 0:06
up vote 2 down vote accepted

If your example is accurate, and there's a block on both sides, then you do have overlap. Routing uses numbers, not names, and that's a good thing for the internet.

Solution A (preferred): Fix the overlap.

Solution B: Put a NAT in place for the remote network, so that local devices see the remote devices as being in

Solution C: Combine the broadcast domains with a layer 2 tunnel of some sort.

Solution D: Lots and lots of static /32 or slightly larger routes.

share|improve this answer
Just to clarify, while the ranges overlap there is no specific instance that overlaps: ie IPs map one to one to machines. The NAT option is definitely something worth considering, thanks. – Stefan Mai Oct 4 '11 at 0:23
Leaving this open just in case there is a genius answer out that, but I'm satisfied with D. Currently I'm modifying the source to dnsmasq to enable it. I'll post the results, but it might be messy ;). – Stefan Mai Oct 4 '11 at 0:59
@StefanMai Now that sounds like fun. Let me know how it goes! – Shane Madden Oct 4 '11 at 1:00
I would pick a unused /24 in and use it to map the other network's 10.x addresses as need. So from your network, might NAT to on the other network and might NAT to on the other network. Just add static NAT entries as needed. A PITA, but that's life in the IPv4 world. – David Schwartz Oct 4 '11 at 4:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.