Default Routes and their configuration

Default Routes and their configuration
 


The default route is the IP address of the next hop when no other routes are known.


To configure the default route to be 192.168.1.1:

config t ip route 0.0.0.0 0.0.0.0 192.168.1.1

An interface can be used as an alternative to and IP address. To use serial0/0 for destinations not in the routing table, use:

ip route 0.0.0.0 0.0.0.0 serial 0/0

 

 

Static Default Routes
A default route is a special route that matches all packet destinations.  Default routes can be particularly useful when only one physical path exists from one part of the network to another, and in cases for which one enterprise router provides connectivity to the Internet for that enterprise.


Default Routes Using the ip route Command
When a router knows about at least one default route, the router notes that route with an asterisk in the routing table.  If a router learns about multiple default routes – either through static configuration or from routing protocols – the router notes each default route with an asterisk in the routing table.  The router chooses the best default route, noting that choice as the gateway of last resort.


Default Routes Using the ip default-network Command
ip default-network lists a classful IP network as its parameter, telling the router to use the routing details of the route for that classful network as the forwarding details for a default route.

This command is useful when an engineer wants to use the default route to reach networks besides the networks used inside that enterprise.


Default Route Summary
Remember these key points regarding default routes:

* Default static routes can be statically configured using the ip route 0.0.0.0 0.0.0.0 next-hope-address or the ip default-network net-number command.

* When a router only matches a packet with the default route, that router uses the forwarding details listed in the gateway of last resort line.  Default routes are used according to the rules of classless or classful routing.

For static routes, you can change the distance of each route by entering a distance after the ip route command:

ip route network subnet mask next hop distance

You can't change the administrative distance for all the static routes at once.

 

 

 For Support