How to connect two routers and subnets

routerroutingsubnet

I know this is very basic question, but I don't have prior experience of setting network environments with multiple routers and no matter what I try I can't get the configuration working.

So, I have two routers, A and B. A is a dumb fellow (no DDNS, VPN, etc. fancy features) provided by my ISP and its duty is to bridge PPPoE to router B (ASUS RT-AC68U) and provide telephone access (not possible with B). A must be connected directly to WAN. PPPoE bridge works fine, meaning that I can access internet from Subnet B and DDNS in router B works. However, I can't access either Internet nor subnet B from subnet A. ping 10.0.0.1 from laptop throws Transmit error: code 1231, and ping 10.0.2.1 from PC throws Destination net unreachable.

Router B has DHCP server running, whereas A does not, in order to make sure two DHCP servers don't mess up each other.

I tried adding static route to B (10.0.2.0/255.255.255.0 gateway: 10.0.2.1), but it didn't seem to work. I also tried adding static route to A (10.0.0.0/255.255.255.0 gateway: 10.0.0.1), but it didn't work either.

What kind of routing, gateway, etc. settings do I have to set in each router in order to get access between the subnets? Access to Internet from subnet A is not necessary. Instructions preferably in noob format, as I'm not expert when it comes to routers and routing.

Routing table of B:

Destination     Gateway         Genmask         Flags    Metric Ref    Use Type Iface
<external 1.>   *               255.255.255.255 UH       0      0        0 WAN0 ppp0
10.0.1.2        *               255.255.255.255 UH       0      0        0      tun21
10.0.0.0        *               255.255.255.0   U        0      0        0 LAN  br0
10.0.1.0        10.0.1.2        255.255.255.0   UG       0      0        0      tun21
<external 2.>   *               255.255.0.0     U        0      0        0 MAN0 eth0
default         <external 1.>   0.0.0.0         UG       0      0        0 WAN0 ppp0

The topology:

here

Best Answer

I like this question, old though it might be.

Some conceptual items:

  • Routers should typically be drawn between networks because they provide a "route" (or path) from one to the other.
  • They can be connected to as many networks as they are capable of, and they will have an IP address on each.
  • You don't need more than one physical link between routers, to answer the implicit question related to the two links between router A and router B.
  • Any physical link between two routers should be represented as a network on the layer-3 diagram (it can be a network that other hosts or routers are connected to).

In your diagram, I would place router A between the Internet and subnet A.

I would place router B between subnet A and subnet B, meaning that subnet A is also used as a routing network between subnet B and the Internet.

In order for the routing network to work out correctly, router B must be configured with router A as its default route to the Internet. Also, router A must be configured to recognize router B as the correct direction for traffic to subnet B.

That probably looks like:

  • Router B:

    • IP1: 10.0.0.1/24 netmask: 255.255.255.0
    • IP2: 10.0.2.2/24 netmask: 255.255.255.0
    • Route: Net: 0.0.0.0/0 [default], gateway: 10.0.2.1/24
    • Note that the networks 10.0.0.0/24 and 10.0.2.0/24 are defined implicitly and are local to this router. Only the Internet needs an explicit route.
  • Router A:

    • IP1: [Internet IP via PPPoE]
    • IP2: 10.0.2.1/24 netmask 255.255.255.0
    • Route: Net: 0.0.0.0/0 [default], gateway: PPPoE
    • Route: Net: 10.0.0.0/24, gateway: 10.0.2.2
Related Question