Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I want to know why same IP with same mask on both WAN and LAN side could be a problem.

I also want to know if setting different mask, but having same IPs will resolve the routing problem.

Specifically are same IP addresses with different masks LAN: and WAN: problematic from routing and NAT point of view and why?

Are different IP addresses with same mask LAN: and WAN: problematic and why?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

Specifically are same IP addresses with different masks LAN: and WAN: problematic from routing and NAT point of view and why ?

Yes, this is a problem, for routing in general.

Hosts on the LAN network will see the entire /24 as a CONNECTED route. Connected routes often have a special meaning, and can override more specific routes on remote networks. (what could get more specific than a host you have an ARP entry for?)

At a minimum, hosts on the LAN will be able to reach either the WAN subnet, or hosts on the LAN which are in the WAN range. (you could try adding a static route, for example.) But never both.

Also, WAN hosts will not be able to reach LAN hosts in the same IP range.

Some NATs (in particular, carrier-grade NAT) is capable of handling cases where the same subnet is on both the inner and outer side of the NAT. But obviously, this only works unidirectionally.

Are different IP addresses with same mask LAN: and WAN: problematic and why ?

This is not, and has never been problematic. Lots of networks have the same mask, and it's not a problem. At the time of this writing, there are 260,864 /24 networks in the global BGP table. The only reason why your specific example could be problematic is because it's shared RFC 1918 address space. So if you imagine two organizations using, and one organization buys out the other organization, then there will be problems.

share|improve this answer

Why can't I have the same subnet on WAN and LAN?

Directly answering this question I have to say you can have it — merging LAN and WAN on layer 2, with Ethernet bridge technique, as most of SOHO Wi-Fi routers usually do, but this effectively collapses two different IP interfaces into single one, just wider.

But since your direct question isn't the real question you want to have answer for, I shall let myself go further.

If we have the same logical (IPv4) network on several interfaces, there's a choice problem, when router has to send IPv4 packet to a host inside this LAN, what path should it choose? In one case it needs to send it on radio, on another — just put it in wire. Network IP-addresses are specifically made to solve that kind of choice.

P. S. Your question indicates you don't know the very basis things related to IP-addressing. I'm not going to be rude telling you to go read books, but, hey, there're books for reason, man.

share|improve this answer
Forums also exist for a reason. If people buy SOHO routers then they don't have time to read books and make conclusions from that reading. So far I've learned that many network experts love to send people to read books instead of answering questions and also often give contradicting to each other answers. It does not happen that much in other subject areas, not sure if it's because networking is too complicated or too simple. I think Mike's answer is better, but only you can decide if his answer is correct (please object if it's not), I just have to trust his information and accept it. –  alpav Jan 23 '14 at 3:45
@alpav, I prefer brief clarity. It has even more value when dealing with SOHO-questions. ;) And yeah, forums are for reasons like either "what book should I read?", or "something isn't covered with books, seemingly". –  poige Jan 23 '14 at 5:29

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.