Configure and verify default routing

Exam: 300-101 - CCNP Implementing Cisco IP Routing (ROUTE v2.0)


The routers use routings tables to store routing information. The routes can be configured by the routers manually as static routing or can be calculated dynamically as dynamic routing. The default routing is configured in conjunction with static routing to tell routers where to route data in case there is no route specified in the routing table for an unknown destination.

The default routes can be compared to default gateway that is configured on PCs to access its local router and then access Internet or a remote network through that router. Just as in PCs, you don’t need a gateway configured to access a device on the same network. Similarly, in routers you don’t need a default route configured to access the local network. The difference however is that PCs use a single interface to connect to a remote network whereas a router has multiple interfaces and a default route helps it to identify a route where unknown traffic can be sent.

Default routes are also known as ‘Gateway of last resort’ that tell computers or others routers to go to the next hop of the default router if no specific route is found in the routing table. If default routing is not configured then all the requests for the networks that are not configured in the routing table are dropped by the router. The gateway of last resort is also known as the default router.

Default routing can be configured in stub networks that have just one output interface with a single exit point configured on it. In such a scenario the default route that matches all the possible routes can be configured instead of configuring many static routes to remote networks. This is useful since in a stub network the traffic really only has one place that it can go to reach any other networks.

Default routes use zeros in their IP address and therefore also called 0/0 routes. They are typically denoted with 0.0.0.0 IP address and 0.0.0.0 subnet mask. This IP translates into message that says for any IP address that has any subnet mask send it to the specified IP address, as shown in the code sample given below:

RouterR1(config)#ip route 0.0.0.0 0.0.0.0 200.43.89.66

In this example, the router is configured to send packets to the router with the specified IP address of 200.43.89.66 if no other specific routes are found. The default routes are configured in the same way as static routes are configured. To configure a default route, you need to specify a static route with 0.0.0.0 network and 0.0.0.0 subnet mask. Further you need specify the next hop router or exit interface which has a path out of the network to which you want to divert the unknown traffic.

To create a default route you need to use the following commands:

R1(config)#ip route 0.0.0.0 0.0.0.0 <next hop router IP address>

Example:

RouterR1(config)#ip route 0.0.0.0 0.0.0.0 200.165.199.66

or

R1(config)#ip route 0.0.0.0 0.0.0.0 <exit interface>

Example:

RouterR1(config)#ip route 0.0.0.0 0.0.0.0 s2/2

Now check the routing table of R1

Consider RouterA is configured as:

RouterA >
RouterA >en
RouterA#config t
Enter configuration commands, one per line. End with CNTL/Z.
RouterA(config)#hostname RouterA
RouterA(config)#interface ethernet0
RouterA(config-if)#ip address 192.168.10.33 255.255.255.224
RouterA(config-if)#no shut
RouterA(config-if)#int serial0
RouterA(config-if)#

00:15:02: %LINK-3-UPDOWN: Interface Ethernet0, changed state to up
00:15:03: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to up
RouterA(config-if)#ip address 192.168.10.65 255.255.255.224
RouterA(config-if)#no shut
2500A(config-if)#
00:16:28: %LINK-3-UPDOWN: Interface Serial0, changed state to up
00:16:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state
to up
RouterA(config-if)# ^Z
RouterA#

Router B is configured as:

Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname RouterB
RouterB(config)#interface ethernet0
RouterB(config-if)#ip address 192.168.30.97 255.255.255.224
RouterB(config-if)#no shut
RouterB(config-if)#interface serial0
RouterB(config-if)#
00:18:21: %LINK-3-UPDOWN: Interface Ethernet0, changed state to up
00:18:22: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to up
RouterB(config-if)#ip address 192.168.10.66 255.255.255.224
RouterB(config-if)#clock rate 1000000
RouterB(config-if)#no shut
RouterB(config-if)#^Z
RouterB #
00:19:47: %SYS-5-CONFIG_I: Configured from console by console
00:19:48: %LINK-3-UPDOWN: Interface Serial0, changed state to up
00:19:49: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state
to up
RouterB#

Now configure the serial 1 interface on the RouterB and then set up default route.

RouterB#config t
Enter configuration commands, one per line. End with CNTL/Z.
RouterB(config)#int s1
RouterB(config-if)#ip address 200.43.89.65 255.255.255.252
RouterB(config-if)#no shut
RouterB(config-if)#
00:43:21: %LINK-3-UPDOWN: Interface Serial1, changed state to down
RouterB(config-if)#exit
RouterB(config)#ip route 0.0.0.0 0.0.0.0 200.165.199.66
RouterB(config)#ip classless
RouterB(config)#^Z
RouterB #
00:43:38: %SYS-5-CONFIG_I: Configured from console by console
RouterB#

RouterB#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default

U - per-user static route, o - ODR

Gateway of last resort is 200.165.199.66 to network 0.0.0.0

192.168.10.0/27 is subnetted, 3 subnets

C 192.168.30.96 is directly connected, Ethernet0

C 192.168.10.64 is directly connected, Serial0

S 192.168.10.32 [1/0] via 192.168.10.65

200.43.89.0/30 is subnetted, 1 subnets

C 200.165.199.66 is directly connected, Serial1

S* 0.0.0.0/0 [1/0] via 200.165.199.66

RouterB#

In the above code, notice that the gateway of last resort is configured. The status S* shows a static default route. The default route is also shown with a star as depicted above in the routing table.

Exam Question

Which of the following statement is true about default route?

  1. Default routes are configured manually along with static routes
  2. Default routes are configured manually along with dynamic routes
  3. Default routes are calculated dynamically along with static routes
  4. Default routes are calculated dynamically along with dynamic routes

Answer 1

The default routing is configured manually in conjunction with static routing to tell routers where to route data in case there is no route specified in the routing table for the desired destination.


Related IT Guides

  1. Describe UDP operations
Close

April campaign! 30% Discount for All Exams!

This is a ONE TIME OFFER. You will never see this Again

Instant Discount
Test-King Testing Engine

30% OFF

Enter Your Email Address to Receive Your 30% OFF Discount Code Plus... Our Exclusive Weekly Deals

A confirmation link will be sent to this email address to verify your login.


* We value your privacy. We will not rent or sell your email address.

Close

Your 30% Discount on Your Purchase

Save 30%. Today on all IT exams. Instant Download

Test-King Testing Engine

Use the following Discount Code during the checkout and get 30% discount on all your purchases:

Start Shopping