Categories
CCNA Study Guide

Default Routes in Cisco Routers Explained

This tutorial explains what a default route is, how a default route works in routing, how a router assigns an AD value to a default route, and the difference between static and dynamic default route.

The default route is a route that a router uses to forward an incoming packet when no other route is available for that packet in the routing table. Routers use the routing table to make the forwarding decision. A routing table entry consists of two pieces: the remote network and the local interface that is connected to that network.

When a packet arrives on an interface of a router, the router reads the destination network address of the incoming packet and finds that network address in the routing table. If the routing table contains an entry for the destination network, the router forwards the incoming packet from the interface that is written next to the destination network in the entry.

If the routing table does not contain an entry for the destination address, the router drops the incoming packet. This is the point where the concept of default route fits. A default route gives a route to a router to forward all incoming packets whose destination network addresses are not available in the routing table.

Default route address

A default route contains all zero in the IP address. There are two versions of IP protocol, IPv4 and IPv6. In both versions, the address of the default route is the following.

IPv4 default route: - 0.0.0.0 0.0.0.0
IPv6 default route: - ::/0

All zero (0.0.0.0) in network portion and subnet mask represent all networks and all hosts in the specified network, respectively.

Command or syntax to configure a default route



To configure an IPv4 default route, use the following syntax from the global configuration mode.

Router(config)# ip route 0.0.0.0 0.0.0.0 {ip-address | exit-interface}

To configure an IPv6 default route, use the following syntax from the global configuration mode.

Router(config)# ipv6 route ::/0 {ipv6-address | exit-interface}

In both syntaxes: the ip-address is the IP address of the next-hop and the exit-interface is the local interface of the router.

If you use the IP address of the next-hop, the router will forward packets to the remote interface of the other router (next-hop) that is directly connected to the local router and has configured with the IP address that you assign in the default route.

If you use the exit-interface, the router forwards packets from the local interface that you configure in the default route.



You should configure the exit-interface instead of the next-hop IP address. The benefit of the exit-interface configuration over the next-hop IP address configuration is that the exit-interface configuration does not depend upon the IP address stability of the next-hop.

Let’s take some examples of the default route configuration.

The following command configures an IPv4 default route that forwards all packets from the serial 0/0/0 interface.

Router(config)# ip route 0.0.0.0 0.0.0.0 serial 0/0/0

The following command configures an IPv4 default route that forwards all packets to the next-hop 192.168.1.1.

Router(config)# ip route 0.0.0.0 0.0.0.0 192.168.1.1

The following command configures an IPv6 default route that forwards all packets from the serial 1/1/1 interface.

Router(config)# ipv6 route ::/0 serial 0/0/0

The following command configures an IPv6 default route that forwards all packets to the next-hop 2001:DB8:1:F::1.

Router(config)# ipv6 route ::/0 2001:DB8:1:F::1

To view the default route configuration, use the \”show ip route\” command from the privileged-exec mode.

Router#show ip route

You can also use the \”show running-config\” command to view the command that was used to configure the default route.

Router#show running-config

The following image shows both commands with sample output.

commands to view default route

Static default route v/s Dynamic default route

A default route configured by the \”ip route\” command is called the default static route. Some routing protocols such as RIP and EIGRP allow us to advertise the default static route. A default static route configured on other router and learned via a routing protocol is known as the dynamic default route.

AD (Administrative Distance) value of the default route

Administrative distance is a Cisco proprietary mechanism used to rank the IP routing protocols. Administrative distance assigns a value (from range 0 to 255) to each IP routing protocol.

Routers use AD value to select the best route from all available routes. If a router receives routing updates for a single network from multiple sources, the router uses AD value to choose a single best route from all available routes.

A smaller AD value is more believable by a router, with the best AD value being 0 and the worst, 255.

The AD value of the default route depends on the type of configuration. If the default route is statically configured by the \”ip route\” command, the router assigns it the AD value 1. 1 is the AD value of the static route.

Same way, if the default route is dynamically learned via a routing protocol, the router assigns it an AD value of the routing protocol. For example, if a router learns the default route from the RIP routing protocol, the router assigns the AD value 120. 120 is the AD value of the RIP routing protocol.

How a default route works in routing

A router forwards an incoming packet from the default route only if another route is not available for that packet in the routing table. In other words, if a route is available for an incoming packet in the routing table, the router does not use the default route for that packet.

Let’s take an example. Suppose a packet arrives on an interface of a router. The router reads the destination network from the packet and searches that destination network in the routing table.

Now, there can be three situations. The following table describes each situation along with the action that the router will take in that situation.

Situation Action
Neither an entry in the routing table for the destination network nor a default route is available. Drop the packet
Both, an entry in the routing table for the destination network and a default route are available. Use the entry to forward the packet
An entry for the destination network is not available in the routing table but the default route is available. Use the default route to forward the packet

The following image shows an example of all three situations.

how routers use default route

That’s all for this tutorial. If you like this tutorial, please don’t forget to share it with friends through your favorite social network.

Prerequisites for 200-301

200-301 is a single exam, consisting of about 120 questions. It covers a wide range of topics, such as routing and switching, security, wireless networking, and even some programming concepts. As with other Cisco certifications, you can take it at any of the Pearson VUE certification centers.

The recommended training program that can be taken at a Cisco academy is called Implementing and Administering Cisco Solutions (CCNA). The successful completion of a training course will get you a training badge.

Full Version 200-301 Dumps

Try 200-301 Dumps Demo