Wednesday, June 4, 2008

Using two routers on a home network

I recently got two routers to talk to each other and actually had my home network of two computers separated into two subnets. The key to it was to set up one router as a gateway, and have the second router setup with a static ip address as if it were to receive one from the ISP, but instead, set up the static IP to be one within the network of the first router. For example, the first router was setup with DHCP, so its external address would change, but its LAN address was set to 192.168.1.1 and was the gateway. The second router's WAN address was static and set to 192.168.1.2. The second router's LAN address was 192.168.2.0. Then the important part setting up static routing. The first router, 192.168.1.1, had the following static routing entry.
ID Destination IP Address Subnet Mask Default Gateway
1 192.168.2.0 255.255.255.0 192.168.1.2

and on the second router, 192.168.2.0
ID Destination IP Address Subnet Mask Default Gateway
1 192.168.1.0 255.255.255.0 192.168.1.1

The rest was taken care of automatically. Remember, pinging is your friend

No comments: