Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Introduction

The Configure and verify routing configuration for static and default routes module provides you
with the instructions and Cisco hardware to develop your hands on skills in configuring static and
default routes on Cisco routers. This module includes the following exercise:

1) Configure and verify static and default routes

Lab Diagram
During your session you will have access to the following lab configuration. Depending on the
exercises you may or may not use all of the devices, but they are shown here in the layout to get an
overall understanding of the topology of the lab.

Internet

ISP1 ISP2
172.14.0.3/24 172.14.0.4/24

Frame-Relay
WAN NYEDGE1 NYEDGE2
Gi0/1 Gi0/1 Cisco
Cisco
2911 Router Ser0/0/0 2911 Router
LDNWAN1
Ser0/0/0
Ser0/0/1

Ser0/0/1
Gi0/0 Ser0/0/1 Gi0/0

Ser0/1/1
Ser0/0/0 Ser0/1/0
Fas1/0/1 Fas1/0/1
Gi0/1 Gi0/0 Fas1/0/2 Fas1/0/12
172.16.16.0/24 Fas1/0/23

NYWAN1 Fas1/0/24 Cisco


Cisco NYCORE1 Fas1/0/22 Fas1/0/22 NYCORE2 IP Phone
NWRKWAN1 Cisco 3750v2-24PS Cisco 3750v2-24PS
2911 Router
Switch Switch

Fas0/24 Fas0/23
PLABCSCO01 NYACCESS1
Cisco Tools Server Lab Nic Fas0/1 Cisco 2960-24
192.168.16.10/24 Switch

Connecting to your lab


In this module you will be working on the following equipment to carry out the steps defined in each
exercise.

 NYEDGE1
 NYEDGE2
 NYCORE1
 NYACCESS1
 PLABCSCO01

Each exercise will detail which terminal you are required to work on to carry out the steps.

During the boot up process an activity indicator will be displayed in the device name tab:

 Black - Powered Off


 Orange - Working on your request
 Green - Ready to access

If the remote terminal is not displayed automatically in the main window (or popup) click the
Connect icon located in the tools bar to start your session.

Copyright Notice
This document and its content is copyright of Practice-IT - © Practice-IT 2015. All rights reserved.
Any redistribution or reproduction of part or all of the contents in any form is prohibited other than
the following:

1) You may print or download to a local hard disk extracts for your personal and non-commercial use
only.

2) You may copy the content to individual third parties for their personal use, but only if you
acknowledge the website as the source of the material. You may not, except with our express
written permission, distribute or commercially exploit the content. Nor may you transmit it or store
it in any other website or other form of electronic retrieval system.
Exercise 1 - Configure and verify static and default routes
In this exercise you will learn how to configure static and default routes on a router. If you
completed the module Configure and verify initial router configuration then you will already have
some knowledge of configuring static routes and this will serve as a reminder and an extension to
that knowledge.

Static routes are used mainly in small environments, or in larger environments in isolated areas
where there are 3rd party devices connected to the network and it is undesirable to share dynamic
routing information with the other organisations, or where you have some redundancy
requirements that use static routes.

Of course there are many other reasons to use static routes, but these are a couple of the common
ones.

Before continuing with the practical exercises, ensure you have read through your course material to
gain an understanding of the topics covered in this module. You can also use your favourite search
engine to search for these topics:

 Cisco configuring static routes


 Cisco configuring a default route

Configuring a static route


A static route is a routing entry that has been manually configured on a router by an engineer. As
explained in the introduction, there are reasons that you would want to use a static route rather
than dynamic routing. In this example you will configure a static route on NYEDGE1 so that it
understands the network topology on NYEDGE2.

Step 1
Ensure NYEDGE1, NYEDGE2, NYCORE1, NYACCESS1 and PLABCSCO01 are powered on.

Connect to the desktop of PLABCSCO01 and the terminal of NYEDGE1 once they have powered up
and are ready for use.

You configure routing protocols in global configuration mode on a router. With dynamic routing you
would enter in to the routing protocol sub-configuration mode, but static routes are configured in
global configuration mode, there is no static route configuration mode so to speak.

A static route has a number of components to it:

 The destination network (or host)


 The subnet mask of the destination network, or host (a host subnet mask is specific)
 The next hop IP Address or interface to send the traffic out of in order for the traffic to reach
the final destination (which may or may not be connected to the next hop)
 The distance metric for the route
There are a number of other parameters that can be configured for a static route; the first three
listed above are the fundamentals. You can then additionally set a distance for the route you are
entering.

If you configure the distance, we would normally call this a floating or weighted static route and is
very useful for using backup links in the event a dynamic route entry drops out of the routers routing
table. Feel free to configure some weighted static routes at the end of this exercise.

Before beginning the configuration, first confirm that PLABCSCO01 is unable to communicate to the
IP Address 172.14.0.2 using the ping command line utility.

Note: Before running this test, make sure NYCORE1 and NYACCESS1 are also powered on and have
the green power indicator meaning it is ready for use!

Step 2
On NYEDGE1, configure a route to the network 172.14.0.0 /24 with a next hop of 192.168.16.2

The command you will need to use is shown below, remember this must be entered in global
configuration mode:

ip route 172.14.0.0 255.255.255.0 192.168.16.2


NYEDGE1#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

NYEDGE1(config)#ip route 172.14.0.0 255.255.255.0 192.168.16.2

Once you have configured the route confirm its presence in the routers routing table. To do this, exit
from global configuration mode, then use the command show ip route which will confirm that the
route is now present in the routers routing table:

NYEDGE1#show ip route

Codes: L - local, C - connected, S - static, 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

i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

ia - IS-IS inter area, * - candidate default, U - per-user static route

o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP

+ - replicated route, % - next hop override

Gateway of last resort is not set

172.14.0.0/24 is subnetted, 1 subnets

S 172.14.0.0 [1/0] via 192.168.16.2

192.168.16.0/24 is variably subnetted, 2 subnets, 2 masks

C 192.168.16.0/24 is directly connected, GigabitEthernet0/0

L 192.168.16.1/32 is directly connected, GigabitEthernet0/0

Step 3
The show ip route command is used for all routing protocols; you can filter the routes by a specific
protocol. For instance you can view just static routes by using show ip route static. Try the following
commands:

 show ip route
 show ip route static
 show ip route summary
 show ip route | include 172.14.0

The output of the above commands is as follows:

show ip route

NYEDGE1#show ip route

Codes: L - local, C - connected, S - static, 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

i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

ia - IS-IS inter area, * - candidate default, U - per-user static route

o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP

+ - replicated route, % - next hop override

Gateway of last resort is not set

172.14.0.0/24 is subnetted, 1 subnets

S 172.14.0.0 [1/0] via 192.168.16.2

192.168.16.0/24 is variably subnetted, 2 subnets, 2 masks

C 192.168.16.0/24 is directly connected, GigabitEthernet0/0

L 192.168.16.1/32 is directly connected, GigabitEthernet0/0

show ip route static

NYEDGE1#show ip route static

Codes: L - local, C - connected, S - static, 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

i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

ia - IS-IS inter area, * - candidate default, U - per-user static route

o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP


+ - replicated route, % - next hop override

Gateway of last resort is not set

172.14.0.0/24 is subnetted, 1 subnets

S 172.14.0.0 [1/0] via 192.168.16.2

show ip route summary

NYEDGE1#show ip route summary

IP routing table name is default (0x0)

IP routing table maximum-paths is 32

Route Source Networks Subnets Replicates Overhead Memory (bytes)

connected 0 2 0 120 360

static 0 1 0 60 180

internal 2 756

Total 2 3 0 180 1296

show ip route | include 172.14.0

NYEDGE1#show ip route | include 172.14.0

172.14.0.0/24 is subnetted, 1 subnets

S 172.14.0.0 [1/0] via 192.168.16.2

Step 4
To confirm the route works, use the traceroute and ping utilities on PLABCSCO01 to communicate
with 172.14.0.2 which is NYEDGE2’s Gi0/1 interface address:
Output from the traceroute:
Configuring a default route
A default route means quite simply if I can’t find a route in my routing table, I will send the packet to
the next hop defined in my default route in hope that the next hop I send to will have knowledge of
where to forward the packet. A default route on a router is the same as a default gateway on a
Windows or Linux machine.

A default route is configured in exactly the same way as a static route but it has a special syntax for
the route itself.

The route is 0.0.0.0 with a mask of 0.0.0.0. This is essentially a match for any.

As a router calculates and uses the most specific route to send traffic to, this ends up being the catch
anything that the router doesn’t have a more specific route for bucket.

You can also configure a default gateway and a default network on the router too, for information
on these and the default route, you can use your favourite search engine, try searching for:

 Cisco configuring a Gateway of Last Resort Using IP Commands


Step 1
Using NYEDGE1, remove the static route that you previously configured. To do this get to global
configuration mode and use the no form of the command you previously used to add the route:

no ip route 172.14.0.0 255.255.255.0 192.168.16.2

NYEDGE1#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

NYEDGE1(config)#no ip route 172.14.0.0 255.255.255.0 192.168.16.2

Confirm that the route has been removed by viewing the routing table once more:

NYEDGE1#show ip route

Codes: L - local, C - connected, S - static, 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

i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

ia - IS-IS inter area, * - candidate default, U - per-user static route

o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP

+ - replicated route, % - next hop override

Gateway of last resort is not set

192.168.16.0/24 is variably subnetted, 2 subnets, 2 masks

C 192.168.16.0/24 is directly connected, GigabitEthernet0/0

L 192.168.16.1/32 is directly connected, GigabitEthernet0/0

Step 2
Still on NYEDGE1, enter global configuration mode, and use the command below to configure a
default route to go via 192.168.16.2 / NYEDGE2:

ip route 0.0.0.0 0.0.0.0 192.168.16.2

NYEDGE1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.

NYEDGE1(config)#ip route 0.0.0.0 0.0.0.0 192.168.16.2

Step 3
Now view the routing table and note the difference in output from when you added the static route.

NYEDGE1#show ip route

Codes: L - local, C - connected, S - static, 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

i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

ia - IS-IS inter area, * - candidate default, U - per-user static route

o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP

+ - replicated route, % - next hop override

Gateway of last resort is 192.168.16.2 to network 0.0.0.0

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

192.168.16.0/24 is variably subnetted, 2 subnets, 2 masks

C 192.168.16.0/24 is directly connected, GigabitEthernet0/0

L 192.168.16.1/32 is directly connected, GigabitEthernet0/0

Notice the line in the output above and the fact that we now have a Gateway of last resort in the
output. Compare this to your previous output of the same command.

Step 4
Finally repeat the tests you did previously using ping and traceroute, to confirm that your default
route works.
Summary
In this module you achieved the following activities:

 You configured a static route to enable communication between PLABCSCO01 and


NYEDGE2’s external interface.
 You used ping and traceroute to verify that the router was forwarding the traffic as defined
by your static route.
 You configured a default route and confirmed that it operated correctly, again using
PLABCSCO01 and NYEDGE2 as test devices.

You might also like