Configuring Static Routing via IP addresses
Objective
The goal of this lab exercise is to configure static routes using next-hop IP addresses on interfaces connected to a switch between two routers. This lab also includes validating the configured static routes.
Purpose
Static route configuration is a fundamental skill for network engineers. There are several ways to configure static routes on a Cisco router, each with its pros and cons. As a Cisco engineer or a CCNA candidate, you are expected to know how to configure 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: Configure SW1 as a VTP server and configure VLAN10 named STATIC. Assign ports FastEthernet0/1 and FastEthernet0/2 to this VLAN 10.
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.100.1.1 255.255.255.0 R1(config-if)#exit R1(config)#interface Loopback101 R1(config-if)#ip address 10.101.1.1 255.255.255.0 R1(config-if)#exit R1(config)#interface Loopback102 R1(config-if)#ip address 10.102.1.1 255.255.255.0 R1(config-if)#exit R1#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 Static Routes and Verify
Objective: On R2, configure static routes using the next-hop IP address 172.27.32.1 for all subnets on R1's Loopback interfaces. Validate connectivity.
Configuration and Verification:
R2#configure terminal R2(config)#ip route 10.100.1.0 255.255.255.0 172.27.32.1 R2(config)#ip route 10.101.1.0 255.255.255.0 172.27.32.1 R2(config)#ip route 10.102.1.0 255.255.255.0 172.27.32.1 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 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 10.0.0.0/24 is subnetted, 3 subnets S 10.100.1.0 [1/0] via 172.27.32.1 S 10.101.1.0 [1/0] via 172.27.32.1 S 10.102.1.0 [1/0] via 172.27.32.1 172.27.0.0/30 is subnetted, 1 subnets C 172.27.32.0 is directly connected, FastEthernet0/0 R2#ping 10.100.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.100.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/0 ms R2#ping 10.101.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.101.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/0 ms R2#ping 10.102.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.102.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 0/1/6 ms
Notes: Using an IP address for the next hop avoids the ARP timeout for the first packet, ensuring immediate connectivity.
Cisco Packet Tracer file:
Load and open the .pkt Lab file in Cisco Packet Tracer from here: Static_Routing_via_IP_addresses.pkt