Default Routes and their configuration

Default Routes and their configuration

A default route, also known as a gateway of last resort, is a route used by a router when it needs to send data to a network that is not in its routing table. The default route is typically used to send data to networks outside of the local network or outside of the router’s immediate network segment.

To configure a default route, you can use the following command in global configuration mode:

ip route 0.0.0.0 0.0.0.0 <next hop IP address>

This command sets the default route to the IP address specified as the next hop. For example, if the next hop IP address is the IP address of the router’s gateway, all traffic that cannot be routed using a more specific route will be sent to the gateway.

It’s also possible to configure a default route using an exit interface instead of a next hop IP address. This can be done using the following command:

ip route 0.0.0.0 0.0.0.0 <exit interface>

This command sets the default route to the specified exit interface. The router will forward traffic destined for networks outside of its routing table out the specified interface.

By default, a router will prefer a connected route over a static route, and a static route over a default route. However, this behavior can be changed using administrative distance. The administrative distance is a value assigned to a routing protocol or static route that indicates how reliable the route is. The lower the administrative distance, the more reliable the route.

To configure a static route with a lower administrative distance than the default route, you can use the following command:

ip route 0.0.0.0 0.0.0.0 <next hop IP address> <administrative distance>

This command sets the administrative distance for the default route to the specified value. For example, if you wanted to give a static route a lower administrative distance than the default route, you could set the administrative distance for the static route to 1 and the administrative distance for the default route to 2.

Apply for Basic Network Support Certification Now!!

https://www.vskills.in/certification/certified-basic-network-support-professional

Back to Tutorial

Share this post
[social_warfare]
Connected and Static Routes
Routing Protocol IGP and EGP and Algorithms

Get industry recognized certification – Contact us

keyboard_arrow_up