Network devices configuration lab manual
CHAPTER TWO
Look at the following network topology
Before we dive into configuring static routes,
let’s take a look at a sample static route and see
what we can find out about it.
Router(config)#ip route [Link]
[Link] [Link]
_ The ip route command tells us simply that it is
a static route.
_ [Link] is the remote network we want to
send packets to.
Wachemo university department of IT By Engdaw A.
Network devices configuration lab manual
_ [Link] is the mask of the remote
network.
_ [Link] is the next hop, or router, we will
send packets to.
Wachemo university department of IT By Engdaw A.
Network devices configuration lab manual
Lab_A Configuration
To configure the Lab_A router, you just need to
add an IP address to interface FastEthernet 0/0
as well as the serial 0/0. Configuring the
hostnames of each router will make
identification easier.
Router>en
Router#config t
Router(config)#hostname Lab_A
Lab_A(config)#enable secret todd
Lab_A(config)#interface fa0/0
Lab_A(config-if)#ip address [Link]
[Link]
Lab_A(config-if)#description Lab_A LAN
Connection
Lab_A(config-if)#no shut
Lab_A(config-if)#interface serial 0/0
Lab_A(config-if)#ip address [Link]
[Link]
Lab_A(config-if)#description WAN
Connection to Lab_B
Lab_A(config-if)#no shut
Lab_A(config-if)#exit
Wachemo university department of IT By Engdaw A.
Network devices configuration lab manual
Lab_A(config)#line console 0
Lab_A(config-line)#password todd
Lab_A(config-line)#login
Lab_A(config-line)#line aux 0
Lab_A(config-line)#password todd
Lab_A(config-line)#login
Lab_A(config-line)#line vty 0 4
Lab_A(config-line)#password todd
Lab_A(config-line)#login
Lab_A(config-line)#exit
Lab_A(config)#banner motd #
This is the Lab_A router#
Lab_A(config)#^z
Lab_A#copy running-config startup-config
Destination filename [startup-config]? [Enter]
Lab_A#
To view the IP routing tables created on a Cisco
router, use the command show ip route.
The command output is shown as follows:
Lab_A#sh ip route
Codes: C - connected, S - static, I - IGRP, R -
RIP,M - mobile, B – BGP D - EIGRP, EX -
Wachemo university department of IT By Engdaw A.
Network devices configuration lab manual
EIGRP external, O -OSPF, IA - OSPF inter area
N1 - OSPF NSS 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, P -
periodic downloaded static route, T - traffic
engineered route
Gateway of last resort is not set
C [Link]/24 is directly connected,
FastEthernet0/0
C [Link]/24 is directly connected, Serial
0/0
Lab_A#
Lab_B Configuration
It’s now time to configure the next router. To
configure Lab_B, we have three interfaces to
deal with: FastEthernet 0/0, serial 0/0, and serial
0/1. Both serial interfaces are DCE.
Router>en
Router#config t
Wachemo university department of IT By Engdaw A.
Network devices configuration lab manual
Router(config)#hostname Lab_B
Lab_B(config)#enable secret todd
Lab_B(config)#interface fa0/0
Lab_B(config-if)#ip address [Link]
[Link]
Lab_B(config-if)#description Lab_B LAN
Connection
Lab_B(config-if)#no shut
Lab_B(config-if)#interface serial 0/0
Lab_B(config-if)#ip address [Link]
[Link]
Lab_B(config-if)#description WAN
Connection to Lab_A
Lab_B(config-if)#clock rate 64000
Lab_B(config-if)#no shut
Lab_B(config-if)#interface serial 0/1
Lab_B(config-if)#ip address [Link]
[Link]
Lab_B(config-if)#description WAN
Connection to Lab_C
Lab_B(config-if)#clock rate 64000
Lab_B(config-if)#no shut
Lab_B(config-if)#exit
Wachemo university department of IT By Engdaw A.
Network devices configuration lab manual
Lab_B(config)#line console 0
Lab_B(config-line)#password todd
Lab_B(config-line)#login
Lab_B(config-line)#line aux 0
Lab_B(config-line)#password todd
Lab_B(config-line)#login
Lab_B(config-line)#line vty 0 4
Lab_B(config-line)#password todd
Lab_B(config-line)#login
Lab_B(config-line)#exit
Lab_B(config)#banner motd #
This is the Lab_B router#
Lab_B(config)#^z
Lab_B#copy running-config startup-config
Destination filename [startup-config]? [Enter]
Lab_B#
These commands configured serial 0/0 into
network [Link], serial 0/1 into network
[Link], and FastEthernet 0/0 into network
[Link]. The show ip route command
displays the following:
Lab_B#sh ip route
[output cut]
Wachemo university department of IT By Engdaw A.
Network devices configuration lab manual
Gateway of last resort is not set
C [Link]/24 is directly connected,
Serial0/0
C [Link]/24 is directly connected,
Serial0/1
C [Link] is directly connected
FastEthernet 0/0
Lab_B#
Notice that router Lab_B knows how to get to
networks [Link], [Link], and
[Link]. Router Lab_A and router Lab_B
can now communicate because they’re
connected on the same WAN.
Lab_C Configuration
The configuration of Lab_C is similar to the
other two routers (make sure we remember to
add passwords, interface descriptions, and a
banner to the router configuration):
Router>en
Router#config t
Router(config)#hostname Lab_C
Lab_C(config)#enable secret todd
Lab_C(config)#interface fa0/0
Wachemo university department of IT By Engdaw A.
Network devices configuration lab manual
Lab_C(config-if)#ip address [Link]
[Link]
Lab_C(config-if)#description Lab_C LAN
Connection
Lab_C(config-if)#no shut
Lab_C(config-if)#interface serial 0/0
Lab_C(config-if)#ip address [Link]
[Link]
Lab_C(config-if)#description WAN
Connection to Lab_B
Lab_C(config-if)#no shut
Lab_C(config-if)#exit
Lab_C(config)#line console 0
Lab_C(config-line)#password todd
Lab_C(config-line)#login
Lab_C(config-line)#line aux 0
Lab_C(config-line)#password todd
Lab_C(config-line)#login
Lab_C(config-line)#line vty 0 4
Lab_C(config-line)#password todd
Lab_C(config-line)#login
Lab_C(config-line)#exit
Lab_C(config)#banner motd #
Wachemo university department of IT By Engdaw A.
Network devices configuration lab manual
This is the Lab_C router#
Lab_C(config)# ^z
Lab_C#copy running-config startup-config
Destination filename [startup-config]? [Enter]
Lab_C#
The output of the following show ip route
command displays the directly connected
networks
of [Link] and [Link], as seen here:
Lab_C#sh ip route
[output cut]
Gateway of last resort is not set
C [Link]/24 is directly connected,
FastEthernet0/0
C [Link]/24 is directly connected,
Serial0/0
Lab_C#
Routers Lab_A and Lab_B can communicate
because they’re on the same WAN network.
And Lab_B and Lab_C can communicate too
because they’re connected with a WAN link.
But router Lab_A can’t communicate with the
Wachemo university department of IT By Engdaw A.
Network devices configuration lab manual
Lab_C router because it does not know about
networks [Link] and [Link]—yet.
Lab_A
The Lab_A router is connected to networks
[Link] and [Link]. For the Lab_A
router to be able to route to all networks, the
following networks have to be configured in its
routing table:
_ [Link]
_ [Link]
_ [Link]
The following router output shows the
configuration of static routes on the Lab_A
router and the routing table after the
configuration.
Notice that each static route sends the packets to
[Link], which is the Lab_A router’s next
hop.
Lab_A(config)#ip route [Link]
[Link] [Link]
Lab_A(config)#ip route [Link]
[Link] [Link]
Wachemo university department of IT By Engdaw A.
Network devices configuration lab manual
Lab_A(config)#ip route [Link]
[Link] [Link]
After the router is configured, you can type
show running-config and show ip route to see
the static routes:
Lab_A#sh ip route
[output cut]
S [Link] [1/0] via [Link]
S [Link] [1/0] via [Link]
S [Link] [1/0] via [Link]
C [Link] is directly connected, Serial 0/0
C [Link] is directly connected,
FastEthernet0/0
Lab_A#
Lab_B
The Lab_B router is connected to the networks
[Link], [Link], and [Link].
The following static routes must be configured
on the Lab_B router:
_ [Link]
_ [Link]
Here’s the configuration for the Lab_B router:
Wachemo university department of IT By Engdaw A.
Network devices configuration lab manual
Lab_B(config)#ip route [Link]
[Link] [Link]
Lab_B(config)#ip route [Link]
[Link] [Link]
By looking at the routing table, you can see that
the Lab_B router now understands how to find
each network:
Lab_B#sh ip route
[output cut]
S [Link] [1/0] via [Link]
C [Link] is directly connected, Serial0/1
C [Link] is directly connected,
FastEthernet 0/0
C [Link] is directly connected, Serial0/0
S [Link] [1/0] via [Link]
Lab_B#
The Lab_B router now has a complete routing
table. As soon as the other routers in the
internetwork have all the networks in their
routing table, Lab_B can communicate to all
remote networks.
Lab_C
Wachemo university department of IT By Engdaw A.
Network devices configuration lab manual
The Lab_C router is directly connected to
networks [Link] and [Link]. Three
routes need to be added:
_ [Link]
_ [Link]
_ [Link]
Here’s the configuration for the Lab_C router:
Lab_C(config)#ip route [Link]
[Link] [Link]
Lab_C(config)#ip route [Link]
[Link] [Link]
Lab_C(config)#ip route [Link]
[Link] [Link]
The following output shows the routing table on
the Lab_C router:
Lab_C#sh ip route
[output cut]
C [Link] is directly connected,
FastEthernet0/0
C [Link] is directly connected, Serial0/0
S [Link] [1/0] via [Link]
S [Link] [1/0] via [Link]
S [Link] [1/0] via [Link]
Wachemo university department of IT By Engdaw A.
Network devices configuration lab manual
Lab_C#
Lab_C now shows all the networks in the
internetwork and can communicate with all
routers and networks. All the routers have the
correct routing table, and all the routers and
hosts should be able to communicate without a
problem—for now. But if you add even one
more network or another router to the
internetwork, you’ll have to update all routers’
routing tables by hand
Lab_A#ping [Link]
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to
[Link], timeout is 2 seconds:
!!!!!
Success rate is 80 percent (4/5), round-trip
min/avg/max = 64/66/68 ms
Lab_A#
From router Lab_C, a ping to [Link] will
test for good IP connectivity. Here is the
Router output:
Wachemo university department of IT By Engdaw A.
Network devices configuration lab manual
Default Routing…..
We use default routing to send packets with a
remote destination network not in the routing
table to the next-hop router.
Router Lab_C is directly connected to networks
[Link] and [Link].
The routing table needs to know about networks
[Link], [Link], and [Link].
You must first delete the existing static routes
from the router and then add the default route.
Lab_C(config)#no ip route [Link]
[Link]
[Link]
Lab_C(config)#no ip route [Link]
[Link] [Link]
Lab_C(config)#no ip route [Link]
[Link] [Link]
Lab_C(config)#ip route [Link] [Link]
[Link]
If you look at the routing table now, you’ll see
only the two directly connected networks plus
Wachemo university department of IT By Engdaw A.
Network devices configuration lab manual
an S*, which indicates that this entry is a
candidate for a default route.
Lab_C#sh ip route
[output cut]
Gateway of last resort is [Link] to
network [Link]
C [Link] is directly connected,
FastEthernet0/0
C [Link] is directly connected, Serial0/0
S* [Link]/0 [1/0] via [Link]
Lab_C#
We could have completed the default route
command another way:
Lab_C(config)#ip route [Link] [Link] s0/0
This says that if you don’t have an entry for a
network in the routing table, just forward it out
serial 0/0. You can choose the IP address of the
next-hop router or the exit interface—either
way, it will work the same.
Wachemo university department of IT By Engdaw A.