0% found this document useful (0 votes)
27 views11 pages

Experiment 5

The document discusses configuring basic static routes on routers. It describes tasks like configuring router interfaces and IP addresses, testing connectivity, and configuring static routes between networks that are not directly connected to allow communication between all hosts.

Uploaded by

Just Someone
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views11 pages

Experiment 5

The document discusses configuring basic static routes on routers. It describes tasks like configuring router interfaces and IP addresses, testing connectivity, and configuring static routes between networks that are not directly connected to allow communication between all hosts.

Uploaded by

Just Someone
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Computer Engineering Computer Network Lab.

Fourth Class
Experiment (5)
Basic Static Route Configuration
Objective
In this experiment you will learn

 Design a network according to the Topology Diagram.


 Perform basic configuration tasks on a router.
 Interpret debug ip routing output.
 Configure and activate Serial and Ethernet interfaces then test connectivity.
 Configure a static route using an intermediate address and an exit interface.
 Compare a static route with intermediate address to a static route with exit
interface.
 Configure a default static route and configure a summary static route.

Introduction:

In this lab activity, you will create a network that is similar to the one shown in the
Topology Diagram. You will then perform the initial router configurations required for
connectivity. Use the IP addresses that are provided in the Addressing Table to apply an
addressing scheme to the network devices. After completing the basic configuration,
test connectivity between the devices on the network. First test the connections
between directly connected devices, and then test connectivity between devices that
are not directly connected. Static routes must be configured on the routers for end-to-
end communication to take place between the network hosts. You will configure the
static routes that are needed to allow communication between the hosts. View the
routing table after each static route is added to observe how the routing table has
changed.

Topology Diagram

Dr. Heba Hakim -1- Dr. Abbas A. Jasim


Computer Engineering Computer Network Lab. Fourth Class

Addressing Table

Procedure:

*Task 1: Perform Basic Configuration.

Step 1: Use global configuration commands.


On the routers, enter global configuration mode and configure the basic global
configuration commands including:
 Hostname
 no ip domain-lookup
 enable secret

Step 2: Configure the console and virtual terminal line passwords on each of the
routers.
 password
 login

Step 3: Add the exec-timeout command to the console and virtual terminal lines.
To set the interval that the EXEC command interpreter waits until user input is detected, we
can use the exec-timeout line configuration command. If no input is detected during the
interval, the EXEC facility resumes the current connection. If no connections exist, the EXEC
facility returns the terminal to the idle state and disconnects the incoming session. This
command allows you to control the amount of time a console or virtual terminal line can be
idle before the session is terminated. The syntax follows:

Router(config-line)#exec-timeout minutes [seconds]

Dr. Heba Hakim -2- Dr. Abbas A. Jasim


Computer Engineering Computer Network Lab. Fourth Class
Syntax description:
minutes—Integer that specifies the number of minutes.
seconds—(Optional) Additional time intervals in seconds.

In a lab environment, you can specify “no timeout” by entering the exec-timeout 0 0
command. This command is very helpful because the default timeout for lines is 10
minutes. However, for security purposes, you would not normally set lines to “no timeout”
in a production environment.

R1 is shown here as an example.

Add exec-timeout 0 0 to console and virtual terminal lines on all routers.

R1(config)#line console 0
R1(config-line)#exec-timeout 0 0
R1(config-line)#line vty 0 4
R1(config-line)#exec-timeout 0 0

*Task 2: Interpreting Debug Output.

Step 1: On R1 from privileged EXEC mode, enter the debug ip routing command.
R1#debug ip routing
IP routing debugging is on

The debug ip routing command shows when routes are added, modified, and deleted from
the routing table. For example, every time you successfully configure and activate an
interface, Cisco IOS adds a route to the routing table. We can verify this by observing output
from the debug ip routing command.

Step 2: Enter interface configuration mode for R1’s LAN interface.


R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#interface fastethernet 0/0

Configure the IP address as specified in the Topology Diagram.


R1(config-if)#ip address 172.16.3.1 255.255.255.0
is_up: 0 state: 6 sub state: 1 line: 1 has_route: False

As soon as you press the Enter key, Cisco IOS debug output informs you that there is now a
route, but its state is False. In other words, the route has not yet been added to the routing
table.

*Complete your configuration.

Step 3: Turn off debugging on router using either no debug ip routing or simply,
undebug all.

Dr. Heba Hakim -3- Dr. Abbas A. Jasim


Computer Engineering Computer Network Lab. Fourth Class
R1(config-if)#end
R1#no debug ip routing
IP routing debugging is off

*Task 3: Finish Configuring Router Interfaces


Finish configuring the interfaces on R2 and R3 according to the Topology Diagram and
Addressing Table.

*Task 4: Configure IP Addressing on the Host PCs.

Step 1: Configure the host PC2.


Configure the host PC1 with an IP address of 172.16.3.10/24 and a default gateway of
172.16.3.1.

Step 2: Configure the host PC2.


Configure the host PC2 with an IP address of 172.16.1.10/24 and a default gateway of
172.16.1.1.

Step 3: Configure the host PC3.


Configure the host PC3 with an IP address of 192.168.2.10/24 and a default gateway of
192.168.2.1.

*Task 5: Test and Verify the Configurations.

Step 1: Test connectivity.


Test connectivity by pinging from each host to the default gateway that has been
configured for that host.

From the host PC1, is it possible to ping the default gateway? ________
From the host PC2, is it possible to ping the default gateway? ________
From the host PC3, is it possible to ping the default gateway? ________

Step 2: Use the ping command to test connectivity between directly connected
routers.
From the router R2, is it possible to ping R1 at 172.16.2.1? ________
From the router R2, is it possible to ping R3 at 192.168.1.1? ________

Step 3: Use ping to check connectivity between devices that are not directly
connected.
From the host PC3, is it possible to ping the host PC1? ________
From the host PC3, is it possible to ping the host PC2? ________
From the host PC2, is it possible to ping the host PC1? ________
From the router R1, is it possible to ping router R3? ________

These pings should all fail. Why? ________

Dr. Heba Hakim -4- Dr. Abbas A. Jasim


Computer Engineering Computer Network Lab. Fourth Class

*Task 6: Gather Information.

Step 1: Check status of interfaces.


Check the status of the interfaces on each router with the command show ip interface brief.
The following output is for R2.

R2#show ip interface brief


Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 172.16.1.1 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/0/0 172.16.2.2 YES manual up up
Serial0/0/1 192.168.1.2 YES manual up up
Vlan1 unassigned YES manual administratively down down

Are all of the relevant interfaces on each router activated (that is, in the up and up state)?
________
How many interfaces are activated on R1 and R3? _______
Why are there three activated interfaces on R2?
__________________________________________

Step 2: View the routing table information for all three routers.
R1# 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 level2,ia-IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

172.16.0.0/24 is subnetted, 2 subnets


C 172.16.2.0 is directly connected, Serial0/0/0
C 172.16.3.0 is directly connected, FastEthernet0/0

What networks are present in the Topology Diagram but not in the routing table for R1?
____________________________________________________________________

R2# 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 level2,*-candidate default
U - per-user static route, o - ODR

Dr. Heba Hakim -5- Dr. Abbas A. Jasim


Computer Engineering Computer Network Lab. Fourth Class

Gateway of last resort is not set

172.16.0.0/24 is subnetted, 2 subnets


C 172.16.1.0 is directly connected, FastEthernet0/0
C 172.16.2.0 is directly connected, Serial0/0/0
C 192.168.1.0/24 is directly connected, Serial0/0/1

What networks are present in the Topology Diagram but not in the routing table for R2?
____________________________________________________________________

R3# 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 level2,*-candidate default
U - per-user static route, o - ODR

Gateway of last resort is not set

C 192.168.1.0/24 is directly connected, Serial0/0/1


C 192.168.2.0/24 is directly connected, FastEthernet0/0

What networks are present in the Topology Diagram but not in the routing table for R2?

____________________________________________________________________

Why are all the networks not in the routing tables for each of the routers?
_________________________________________________________________________

What can be added to the network so that devices that are not directly connected can ping
each other?_____________________________________________________________

*Task 7: Configure a Static Route Using a Next-Hop Address.

Step 1: To configure static routes with a next-hop specified, the following syntax:

Router(config)# ip route network-address subnet-mask ip-address

 network-address:—Destination network address of the remote network to be added


to the routing table.
 subnet-mask—Subnet mask of the remote network to be added to the routing table.
The subnet mask can be modified to summarize a group of networks.
 ip-address—Commonly referred to as the next-hop router’s IP address.

On the R3 router, configure a static route to the 172.16.1.0 network using the Serial 0/0/1
interface of R2 as the next-hop address.

Dr. Heba Hakim -6- Dr. Abbas A. Jasim


Computer Engineering Computer Network Lab. Fourth Class
R3(config)#ip route 172.16.1.0 255.255.255.0 192.168.1.2
R3(config)#

Step 2: View the routing table to verify the new static route entry.
Notice that the route is coded with an S, which means that the route is a static route.

R3#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 level2,*-candidate default
U - per-user static route, o - ODR

Gateway of last resort is not set

172.16.0.0/24 is subnetted, 1 subnets


S 172.16.1.0 [1/0] via 192.168.1.2
C 192.168.1.0/24 is directly connected, Serial0/0/1
C 192.168.2.0/24 is directly connected, FastEthernet0/0
R3#

With this route entered in the routing table, any packet that matches the first 24 left-most
bits of 172.16.1.0/24 will be forwarded to the next-hop router at 192.168.1.2.

What interface will R3 use to forward packets to the 172.16.1.0/24 network? ____________

Assume that the following packets have arrived at R3 with the indicated destination
addresses. Will R3 discard the packet or forward the packet? If R3 forwards the packet, with
what interface will R3 send the packet?

Packet Destination IP Discard or Forward? Interface


1 172.16.2.1 _________ _________
2 172.16.1.10 _________ _________
3 192.168.1.2 _________ _________
4 172.16.3.10 _________ _________
5 192.16.2.10 _________ _________

Step 3: Use ping to check connectivity between the host PC3 and the host PC2.
From the host PC3, is it possible to ping the host PC2? ________
These pings should fail. The pings will arrive at PC2 if you have configured and verified all
devices. PC2 will send a ping reply back to PC3. However, the ping reply will be discarded at
R2 because the R2 does not have a return route to the 192.168.2.0 network in the routing
table.

Step 4: On the R2 router, configure a static route to reach the 192.168.2.0 network.
What is the next-hop address to which R2 would send a packet destined for the
192.168.2.0/24 network?

Dr. Heba Hakim -7- Dr. Abbas A. Jasim


Computer Engineering Computer Network Lab. Fourth Class
R2(config)#ip route 192.168.2.0 255.255.255.0 ________________

Step 5: View the routing table to verify the new static route entry.
Notice that the route is coded with an S, which means the route is a static route.
R2#_________________________________

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 level2,*-candidate default
U - per-user static route, o - ODR

Gateway of last resort is not set


172.16.0.0/24 is subnetted, 2 subnets
C 172.16.1.0 is directly connected, FastEthernet0/0
C 172.16.2.0 is directly connected, Serial0/0/0
C 192.168.1.0/24 is directly connected, Serial0/0/1
S 192.168.2.0/24 [1/0] via 192.168.1.1

Step 6: Use ping to check connectivity between the host PC3 and the host PC2.
From the host PC3, is it possible to ping the host PC2? ________
This ping should be successful.

*Task 8: Configure a Static Route Using an Exit Interface.


To configure static routes with an exit interface specified, use the following syntax:

Router(config)# ip route network-address subnet-mask exit-interface



 network-address—Destination network address of the remote network to be added
to the routing table.
 subnet-mask—Subnet mask of the remote network to be added to the routing table.
The subnet mask can be modified to summarize a group of networks.
 exit-interface—Outgoing interface that would be used in forwarding packets to the
destination network.

Step 1: On the R3 router, configure a static route.


On the R3 router, configure a static route to the 172.16.2.0 network using the Serial 0/0/0
interface of the R3 router as the exit interface.

R3(config)# ip route 172.16.2.0 255.255.255.0 Serial0/0/1


R3(config)#

Step 2: View the routing table to verify the new static route entry.
R3#show ip route

Step 3: On the R2 router, configure a static route.


On the R2 router, configure a static route to the 172.16.3.0 network using the Serial 0/0/0
interface of the R2 router as the exit interface.

Dr. Heba Hakim -8- Dr. Abbas A. Jasim


Computer Engineering Computer Network Lab. Fourth Class
R2(config)# ip route 172.16.3.0 255.255.255.0 Serial0/0/0
R2(config)#

Step 4: View the routing table to verify the new static route entry.
R2#show ip route

At this point, R2 has a complete routing table with valid routes to all five networks shown in
the Topology Diagram.
Does this mean that R2 can receive ping replies from all destinations shown in the Topology
Diagram? ________
Why or why not?
_______________________________________________________________________

Step 5: Use ping to check connectivity between the host PC2 and PC1.
This ping should fail because the R1 router does not have a return route to the 172.16.1.0
network in the routing table.

*Task 9: Configure a Default Static Route.


In the previous steps, you configured the router for specific destination routes. But could
you do this for every route on the Internet? No. The router and you would be overwhelmed.
To minimize the size of the routing tables, add a default static route. A router uses the
default static route when there is not a better, more specific route to a destination.
Instead of filling the routing table of R1 with static routes, we could assume that R1 is a stub
router. This means that R2 is the default gateway for R1. If R1 has packets to route that do
not belong to any of R1 directly connected networks, R1 should send the packet to R2.
However, we must explicitly configure R1 with a default route before it will send packets
with unknown destinations to R2. Otherwise, R1 discards packets with unknown
destinations.

To configure a default static route, use the following syntax:

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

Step 1: Configure the R1 router with a default route.


Configure the R1 router with a default route using the Serial 0/0/0 interface of R1 as the
next-hop interface.

R1(config)#ip route 0.0.0.0 0.0.0.0 172.16.2.2

Step 2: View the routing table to verify the new static route entry.
R1#_________________________________

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

Dr. Heba Hakim -9- Dr. Abbas A. Jasim


Computer Engineering Computer Network Lab. Fourth Class
i-IS-IS,L1-IS-IS level-1,L2-IS-IS level2,*-candidate default
U - per-user static route, o - ODR

Gateway of last resort is 172.16.2.2 to network 0.0.0.0

172.16.0.0/24 is subnetted, 2 subnets


C 172.16.2.0 is directly connected, Serial0/0/0
C 172.16.3.0 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 172.16.2.2

Note that the R1 router now has a default route, the gateway of last resort, and will send all
unknown traffic out Serial 0/0/0, which is connected to R2.

Step 3: Use ping to check connectivity between the host PC2 and PC1.
From the host PC2, is it possible to ping PC1? ________
This ping should be successful this time because the R1 router can return the packet using
the default route.
From the host PC3, is it possible to ping the host PC1? ________
Is there a route to the 172.16.3.0 network in the routing table on the R3 router? ________

*Task 10: Configure a Summary Static Route.


We could configure another static route on R3 for the 172.16.3.0 network. However, we
already have two static routes to 172.16.2.0/24 and 172.16.1.0/24. Because these networks
are so close together, we can summarize them into one route. Again, doing this helps
reduce the size of routing tables, which makes the route lookup process more efficient.
Looking at the three networks at the binary level, we can a common boundary at the 22nd
bit from the left.

172.16.1.0 10101100.00010000.00000001.00000000
172.16.2.0 10101100.00010000.00000010.00000000
172.16.3.0 10101100.00010000.00000011.00000000

The prefix portion will include 172.16.0.0, because this would be the prefix if we turned off
all the bits to the right of the 22nd bit.

Prefix 172.16.0.0

To mask the first 22 left-most bits, we use a mask with 22 bits turned on from left to right:

Bit Mask 11111111.11111111.11111100.00000000

This mask, in dotted-decimal format, is...

Mask 255.255.252.0

Step 1: Configure the summary static route on the R3 router.


The network to be used in the summary route is 172.16.0.0/22.

R3(config)#ip route 172.16.0.0 255.255.252.0 192.168.1.2

Dr. Heba Hakim -11- Dr. Abbas A. Jasim


Computer Engineering Computer Network Lab. Fourth Class
Step 2: Verify that the summary route is installed in the routing table.
R3#show ip route

Configuring a summary route on R3 did not remove the static routes configured earlier
because these routes are more specific routes. They both use /24 mask, whereas the new
summary will be using a /22 mask. To reduce the size of the routing table, we can now
remove the more specific /24 routes.

Step 3: Remove static routes on R3.


Remove the two static routes that are currently configured on R3 by using the no form of
the command.

R3(config)#no ip route 172.16.1.0 255.255.255.0 192.168.1.2


R3(config)#no ip route 172.16.2.0 255.255.255.0 Serial0/0/0

Step 4: Verify that the routes are no longer in the routing table.
R3 now only has one route to any host belonging to networks 172.16.0.0/24, 172.16.1.0/24,
172.16.2.0/24, and 172.16.3.0/24. Traffic destined for these networks will be sent to R2 at
192.168.1.2.

Step 5: Use ping to check connectivity between the host PC3 and PC1.
This ping should be successful this time because there is a route to the 172.16.3.0 network
on the R3 router, and the R1 router can return the packet using the default route.

Dr. Heba Hakim -11- Dr. Abbas A. Jasim

You might also like