Configuring and Naming Static Routes on Cisco Routers
Objective
The objective of this lab exercise is to configure named static routes via next-hop IP addresses on interfaces connected to a switch between two routers. This lab also covers the validation of the configured static routes.
This lab will not work on Packet Tracer.
Purpose
Static route configuration is a fundamental skill for network engineers. There are various methods to configure static routes on a Cisco router, each with its pros and cons. Naming static routes allows for easy identification of their purposes when viewing router configurations. As a Cisco engineer or a CCNA candidate, you should be able to configure named static routes using any available methods in Cisco IOS.
Lab Topology
Use the following topology to complete this lab exercise:
Task 1: Configure Hostnames
Objective: Set hostnames on R1, R2, and SW1 as illustrated in the topology.
Configuration:
R1#configure terminal R1(config)#hostname R1 R1(config)#end R2#configure terminal R2(config)#hostname R2 R2(config)#end SW1#configure terminal SW1(config)#hostname SW1 SW1(config)#end
Task 2: Configure VTP and VLAN
Objective: Set SW1 as a VTP server, create VLAN 10 named STATIC, and assign ports FastEthernet0/1 and FastEthernet0/2 to this VLAN.
Configuration:
SW1#configure terminal SW1(config)#vtp mode server SW1(config)#vtp domain cisco SW1(config)#vlan 10 SW1(config-vlan)#name STATIC SW1(config-vlan)#exit SW1(config)#interface FastEthernet0/1 SW1(config-if)#switchport mode access SW1(config-if)#switchport access vlan 10 SW1(config-if)#exit SW1(config)#interface FastEthernet0/2 SW1(config-if)#switchport mode access SW1(config-if)#switchport access vlan 10 SW1(config-if)#end
Task 3: Configure IP Addresses
Objective: Configure IP addresses 172.27.32.1/30 on R1 and 172.27.32.2/30 on R2's Fa0/0 interfaces. Also, configure the Loopback interfaces on R1.
Configuration:
R1#configure terminal R1(config)#interface FastEthernet0/0 R1(config-if)#ip address 172.27.32.1 255.255.255.252 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#interface Loopback100 R1(config-if)#ip address 10.88.100.1 255.255.255.224 R1(config-if)#exit R1(config)#interface Loopback101 R1(config-if)#ip address 10.99.100.1 255.255.255.224 R1(config-if)#end R2#configure terminal R2(config)#interface FastEthernet0/0 R2(config-if)#ip address 172.27.32.2 255.255.255.252 R2(config-if)#no shutdown R2(config-if)#end
Task 4: Configure Named Static Routes
Objective: On R2, configure a static route named LAN-ROUTE via FastEthernet0/0 with a next-hop IP address of 172.27.32.1 to the 10.88.100.0/27 subnet. Configure a static route named WAN-ROUTE via Serial0/0 with a next-hop IP address of 192.168.7.1 to the 10.99.100.0/27 subnet. Verify your static route configuration.
Configuration and Verification:
R2#configure terminal R2(config)#ip route 10.88.100.0 255.255.255.224 FastEthernet0/0 172.27.32.1 name LAN-ROUTE R2(config)#ip route 10.99.100.0 255.255.255.224 FastEthernet0/0 172.27.32.1 name WAN-ROUTE R2(config)#end R2#show ip route Codes: 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 leve l-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 172.27.0.0/30 is subnetted, 1 subnets C 172.27.32.0 is directly connected, FastEthernet0/0 10.0.0.0/27 is subnetted, 2 subnets S 10.99.100.0 is directly connected, FastEthernet0/0 S 10.88.100.0 is directly connected, FastEthernet0/0
Note: The names configured on the static routes do not show in the output of the show ip route command, but they appear in the running configuration. Naming static routes helps in identifying their purposes, especially when numerous static routes are configured. Use the show running-config | include route command to filter route statements:
R2#show running-config | include route ip route 10.88.100.0 255.255.255.224 FastEthernet0/0 name LAN-ROUTE ip route 10.99.100.0 255.255.255.224 FastEthernet0/0 name WAN-ROUTE
Task 5: Verification
Objective: Ping each Loopback interface configured on R1 from R2 to verify your static route configuration.
R2#ping 10.88.100.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.88.100.1, timeout is 2 seconds: .!!!! Success rate is 80 percent (4/5), round-trip min/avg/max = 20/28/36 ms R2#ping 10.99.100.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.99.100.1, timeout is 2 seconds: .!!!! Success rate is 80 percent (4/5), round-trip min/avg/max = 8/14/28 ms