[Link]
net
Lab 1 - Static Routes
Lab 1: IP routing protocol labStatic routes
The physical topology is as shown in Figure 151.
Figure 151: Static routes
Lab exercise
Your task is to configure the network in Figure 151 to allow full connectivity using the static routes.
Please feel free to try the lab without following the lab walk-through section.
Text printed in a monospaced font indicates commands that can be entered on the router.
Purpose
The majority of small businesses have just one router that connects to another router provided
by the service provider. These routers will only need to be configured with a very basic
config including IP addresses and a static route to reach the ISP. This lab will show you just
how do that.
Lab objectives
1. Use the IP addressing scheme depicted in Figure 151. Router A needs to have a clock
rate on interface serial 0: set this to 64000.
2. Set telnet access for the router to use the local login permissions of username banbury and the
password ccna.
3. Configure the enable password to be cisco. Configure the static routes to provide connectivity
to all networks attached to the neighboring router, except the network
used for the serial connection.
4. Ensure routing information is correct by checking the routing table for entries to your
neighbor's networks.
5. Finally, try to ping all loopback interfaces of your neighbor, and then try to access your
neighbor router via telnet.
Lab walk-through
1. To set the IP addresses on an interface, you will need to do the following:
Router#config t
Router(config)#hostname RouterA
RouterA(config)#interface serial 0
RouterA(config-if)#ip address [Link] [Link]
RouterA(config-if)#clock rate 64000
RouterA(config-if)#no shutdown
RouterA(config-if)#interface loopback 0
RouterA(config-if)#ip address [Link] [Link]
RouterA(config-if)#interface loopback 1
RouterA(config-if)#ip address [Link] [Link]
RouterA(config-if)#^Z
RouterA#
To set the clock rate on a serial interface (DCE connection only), you need to use the clock rate #
command on the serial interface, where # indicates the speed:
RouterA(config-if)#clock rate 64000
2. To set telnet access, you need to configure the VTY lines to allow telnet access. To do
this, type (from configuration mode):
RouterA(config)#line vty 0 4 Enters the VTY line configuration
RouterA(config-line)#login local This will use local usernames
and passwords for telnet access
RouterA(config-line)#exit Exit the VTY config mode
RouterA(config)#username banbury password ccna Creates username
and password for telnet access (login local)
3. To set the enable password, do the following:
RouterA(config)#enable secret cisco Sets the enable password (encrypted)
4. To configure static routes on a router, there is only one step:
RouterA(config)#ip route [Link] [Link] [Link]
RouterA(config)#ip route [Link] [Link] [Link]
The above command will configure a static route on router A. To get to the destination
network of [Link] and [Link], use the next hop of [Link]. Instead of
network of [Link] and [Link], use the next hop of [Link]. Instead of
using the above commands, you can enter the ones below. This time the router is told
to use an exit interface instead of a next hop. DO NOT USE BOTH THE ABOVE AND
BELOW TOGETHER.
RouterA(config)#ip route [Link] [Link] serial 0
RouterA(config)#ip route [Link] [Link] serial 0
5. Next, we configure the same commands on router B.
Set the IP addresses:
Router#config t
Router(config)#hostname RouterB
RouterB(config)#interface serial 0
RouterB(config-if)#ip address [Link] [Link]
RouterB(config-if)#no shutdown
RouterB(config-if)#interface loopback 0
RouterB(config-if)#ip address [Link] [Link]
RouterB(config-if)#interface loopback 1
RouterB(config-if)#ip address [Link] [Link]
RouterB(config-if)#^Z
RouterB#
Now make sure you can ping across the serial link. If you cannot, then check the configurations
again.
RouterA#ping [Link]
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/31/32 ms
Configure telnet access:
RouterB(config)#line vty 0 4
RouterB(config-line)#login local
RouterB(config-line)#exit
RouterB(config)#username banbury password ccna
Configure the enable secret password:
RouterB(config)#enable secret cisco
Set the static route:
RouterB(config)#ip route [Link] [Link] [Link]
RouterB(config)#ip route [Link] [Link] [Link]
The above command will configure a static route on router B. To get to the destination network of
[Link] and [Link], use the next hop of [Link]. Instead of using the above
commands, you can enter the ones below. This time the router is told to use an exit interface
instead of a next hop. DO NOT USE BOTH THE ABOVE AND BELOW TOGETHER.
Router B:
RouterB(config)#ip route [Link] [Link] serial 0
RouterB(config)#ip route [Link] [Link] serial 0
This command will configure a static route to the [Link] or [Link] network,
but instead of having a next hop address, we have specified an exit interface to use.
6. Use the show ip route command to check that the static routes are in the routing
table, and that the next hop address is correct.
RouterA#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, 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
C [Link]/16 is directly connected, Loopback0
C [Link]/16 is directly connected, Loopback1
S [Link]/16 [1/0] via [Link]
S [Link]/16 [1/0] via [Link]
[Link]/30 is subnetted, 1 subnets
C [Link] is directly connected, Serial0
7. To test connectivity, you will need to use the ping command. And to logon to your
neighbor's router, you need to use the telnet command:
RouterA#ping [Link] This will send a ping packet to the
address specified; there should be five replies if everything is OK
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent(5/5),round-trip min/avg/max = 1/2/4 ms
RouterA#
RouterA#ping [Link]
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/32/32 ms
RouterA#
RouterA#telnet [Link] This will open a telnet connection to
your neighbor's router. If telnet access has been set up
correctly, you should be presented with a login message.
Type exit to quit a telnet session.
RouterA#telnet [Link]
Trying [Link] ... Open
User Access Verification
Username: banbury
Password: Password will not show as you type it
RouterB>exit
[Connection to [Link] closed by foreign host]
RouterA#
Router B:
Do the same on router B:
RouterB#ping [Link]
RouterB#ping [Link]
RouterB#telnet [Link]
Show runs
RouterA#show run
Building configuration...
Current configuration : 704 bytes
version 12.1
no service single-slot-reload-enable
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
hostname RouterA
username banbury password 0 ccna
ip subnet-zero
interface Loopback0
ip address [Link] [Link]
interface Loopback1
ip address [Link] [Link]
interface Ethernet0
no ip address
shutdown
interface Serial0
ip address [Link] [Link]
clockrate 64000
interface Serial1
no ip address
shutdown
ip classless
ip route [Link] [Link] [Link]
ip route [Link] [Link] [Link]
no ip http server
line con 0
line 1 8
line aux 0
line vty 0 4
login local
end
RouterA#
---
RouterB# show run
Building configuration...
Current configuration : 678 bytes
version 12.1
no service single-slot-reload-enable
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
hostname RouterB
!
username banbury password 0 ccna
ip subnet-zero
interface Loopback0
ip address [Link] [Link]
interface Loopback1
ip address [Link] [Link]
interface Ethernet0
no ip address
shutdown
interface Serial0
ip address [Link] [Link]
interface Serial1
no ip address
shutdown
ip classless
ip route [Link] [Link] [Link]
ip route [Link] [Link] [Link]
no ip http server
line con 0
line aux 0
line vty 0 4
login local
end
RouterB#
2006-2011 [Link] All Rights Reserved. Reproduction without permission prohibited.