3

This follows another question i had previously asked.. I am in a situation where sub net A is connected to two routers {Router A{left}} and {routerB{right}}. The sub net A knows that the address of the interface of router A is its default gateway but there is also router B which is also connected to sub net A but from the right.... How do we make sub net A have some kind of secondary default gateway address? Thank You

1
  • 2
    Most often, different gateways lead to different networks. So, you'd set up a specific route to each of these networks. Normally, there's only one default gateway (=fits all) but you can have multiple ones as Ron has explained.
    – Zac67
    Commented May 9, 2021 at 11:55

1 Answer 1

4

The sub net A knows that the address of the interface of router A is its default gateway

Default routes are configured on hosts, not subnets.

It may be helpful to remember that a default route is just like any other route -- it just has the shortest mask.

If you want one route to be the "secondary" route, you first need a mechanism for determining that the primary route is no longer valid. That can be the interface status or information learned from routing protocols.

You also need a methods to indicate the preference of one route over another. there are usually two methods for this: a metric for routes of the same type, and a preference for routes of a different type.

One route is preferred over another, and that's what the host uses to route packets. If the preferred route is no longer preferred, the next best route is used.

8
  • Thanks for this info, where can i get tutorial on how to make a route prefered over another?
    – Dong Li
    Commented May 9, 2021 at 13:19
  • Should i configure it as a gateway of last resort?
    – Dong Li
    Commented May 9, 2021 at 16:46
  • A default route and gateway of last resort mean exactly the same thing
    – Ron Trunk
    Commented May 9, 2021 at 17:26
  • Route preference depends upon the device OS and the type of routing.
    – Ron Trunk
    Commented May 9, 2021 at 17:29
  • how do i make a router that is the default gateway of PC0,contact another router to ping a certain ip address?
    – Dong Li
    Commented May 9, 2021 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.