Multiple home routers


Suppose I have the following configuration:

  • Router A: WAN port connected to the Internet, LAN =
  • Computer A: Connected to router A as
  • Router B: WAN port connected to router A as, LAN =
  • Computer B: Connected to router B as

Now I want computer A to communicate with computer B seamlessly (e.g. can establish a TCP connection by running nc <port>) by means of routing, rather than merging the two networks into one (which can be easily accomplished using router B as a switch).

Most routers are shipped with NAT turned on, of which I definitely need to turn off in router B. But what other steps do I need to take so that packets from computer A to computer B would go through router B?

I could manually add a routing table entry in computer A so that all packets targeted to go through gateway, but I would prefer an automatic way if it exist.

Best Answer

In this case static routing is probably the best option. If You looking for more general solution it think this could be good starting point:

For 100% automatic configuration You should have two routers with some routing protocol enabled by default but I think You should configure them anyway fore example fore security reasons. Also You probably want to use rip v2 because rip v1 doesn't support VLSM

Related Question