Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've got two routers with two separate public IP addresses on the same subnet, but I can't get them to talk to each other. Both are connected to the internet (ISP-provided gateway) via Ethernet ports provided by the landlord, but I don't have access to or knowledge of how those are physically connected or the protocols used to get back to the ISP. I can ping either from the outside, but they can't ping each other. Traceroutes in and out look the same, and they receive the same gateway over DHCP. I can ping other IPs on the subnet, so I assume this is not any sort of intentional isolation for security/privacy.

Since I'm in a setup where my landlord provides internet and we don't have contact with the ISP, I can't really ask the ISP for help (doubt the landlord would know much either.)

The situation is similar to the diagram at this question, but instead of the two servers, there's another router coming off the (presumed) switch, and I don't have access to the switch.

I've tried giving them static routes to each other with the ISP internet gateway as the gateway, but that's not working. One is a Linksys WRT54GL running DD-WRT, the other is a Netgear WGR614v7, although I could get something more capable if necessary. I'd like to keep them each connected directly to the ISP on their WAN ports, but I can have an ethernet cable between them if necessary - I'm wondering if there's a way without that, and if there isn't, I'd appreciate advice on how to get that working.

Sorry this is so nitpicky; there are reasons for all the constraints, but they don't apply to the real question, so I left them out. ;) Thank you!

share|improve this question
1  
Are the two hosts really on the same subnet, or are they really on separate networks with identical DHCP pools? Kind of sounds like the latter. –  JoshP Jun 20 '12 at 12:26
    
@Josh I hadn't thought of it that way, but you are probably correct. It's frustrating because it's breaking the hosts from serving to each other, but whoever set this up probably assumed nobody would be intentionally serving on the internet, so there was no need to make sure people who ended up on the same WAN subnet could see each other. –  Joey Hewitt Jun 20 '12 at 19:12
    
The day after I asked the question, it started working (and I've had it set up and not working for several weeks.) Traceroute shows it goes through an outside router I see with outbound traceroutes (outside of the LANs and outside the WAN subnet.) I guess this shows that router knows my two routers are on separate but identical-looking subnets and knows how to route between them, but I don't know why the route wasn't discovered earlier. Maybe the static routes on my side helped -- but why the overnight delay? I'll update if I learn more information. Thanks for your answers! –  Joey Hewitt Jun 21 '12 at 17:12

2 Answers 2

I'm assuming that both of your routers are performing NAT to a private 192. network. And also operating over a NAT'd network themselves for their WAN ports. This makes things more difficult, because what you're trying to do is route between two private (non-route-able) networks, across NAT.

You might need dd-wrt on both routers, but you could link both routers, and bridge the two. For sanity's sake, you should set one to the primary DHCP server, and the other one can act as DHCP-helper and do forwarding to the other server. You may get away with establishing separate leases on each, but with the bridged sub-net I'm not sure you could reliably know which router would answer.

You would still have the issue of the dual-uplinks and how these would route. Not sure on this. It would probably be undefined (unreliable) - unless you setup a real routing protocol and had them running something like rip or ospf to tell it which port to go outbound on.

In the network below which is how these routers would be setup by default - there's no way to route from A to B, they're all private networks, and you have two separate networks with the same IP range, but they're different networks (as Josh mentioned in the comments).

[ISP] 
  |
 NAT
  |
[192.168.1.1/24] - landlord
      |
      |--NAT-- [192.168.1.1/24] RouterA
      |            \-Hosts
      |
      |--NAT-- [192.168.1.1/24] RouterB
                   \-Hosts

As an alternative, try setting up the following:

[ISP] 
  |
 NAT
  |
[192.168.1.0/24] - landlord
      |
      |--NAT-- [192.168.2.0/25] RouterA[.1]
      |         |  \-Hosts (Use DHCP range of 2-126 for /25)
      |         |          GW: default via 192.168.1.1 dev [uplink port]
      |         |
      |         | [inter-link network of [10.0.0.0/30]
      |         \[.1]
      |           |         RouterA: ip r a 192.168.2.128/25 via 10.0.0.2
      |           |         RouterB: ip r a 192.168.2.0/25   via 10.0.0.1
      |         /[.2]
      |         |
      |         |
      |--NAT-- [192.168.2.128/25] RouterB[.1]
                   \-Hosts (Use DHCP range of 129-254 for /25)
                           GW: default via 192.168.1.1 dev [uplink port]

Both routers will share the same gateway, but can't see each other because the gateway router won't route between two private instances of .1.x. We've added the 10.0.0.0/30 network as a two-node link between the two /25 subnets of .2.0/24, and static routes so they see each other. Now both routers should route outbound traffic out the local default route, but traffic for the other side of .2/24 over the 10. network.

share|improve this answer

Use an Ethernet cable on the router's LAN ports to link them. This means merging the two LAN subnets (with consequences for static routes and separation of DHCP pools etc). Otherwise you'd probably need another router to link the two LAN subnets.

Your landlord's switch is probably configured to provide privacy to tenants from each other.

Your ISP's gateway is a router and it is not normally the job of a router to facilitate local traffic - that's what switches are for.

share|improve this answer

Your Answer

 
discard

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.