Multi-Router Setup – How to Determine the Default Gateway

default-gatewaylanrouterwan

Trying to set up a network with multiple routers, very similar to what's depicted in this diagram from the FreeBSD handbook:

enter image description here

In particular, regarding this specific diagram, what should the default gateway for RouterB be set to?

In general, how do you determine what the default gateway for a router should be, especially if that router is on a LAN, but behind the router with the WAN interface?

Best Answer

The default gateway is used for those routes where the router doesn't have more specific information. That's the meaning to the term default.

In your case, you would want traffic to unknown routes to be sent to the Internet. So RouterB would use RouterA as its default gateway, and you would configure the next hop as the interface on RouterA (192.168.1.1).

This assumes you are using static routing. If you are running a routing protocol, then Router A would likely advertise a default route to B, so B would learn the default route that way.

Related Topic