22 Oct 2024 Techi Blog
In the world of networking, configuring static routes is a fundamental skill that helps ensure reliable communication between different network segments. In this guide, we’ll walk through the process of configuring IP addresses and static routes on Cisco IOS and XR routers, specifically using the next-hop method.
TASK 1 : CONFIGURE IP ADDRESS
R1
conf t
host R1
int g0/0/0/0
ip add 10.1.12.1/24
no sh
int l1
ip add 1.1.1.1/8
commit label ip_address
R2
conf t
host R2
int g0/0/0/0
ip add 10.1.12.2/24
no sh
int g0/0/0/1
ipv4 add 10.1.23.2/24
no sh
commit
R3
conf t
host R3
int g0/0/0/0
ip add 10.1.23.3/24
no sh
int g0/0/0/1
ipv4 add 10.1.34.3/24
no sh
commit
R4
conf t
host R4
int g0/0/0/0
ip add 10.1.34.4 255.255.255.0
no sh
int l1
ip add 4.4.4.4 255.0.0.0
no sh
int g0/0/0/1
ip add 10.1.45.4/24
no shut
commit
R5
conf t
int g0/0
ip add 10.1.45.5 255.255.255.0
no sh
int l1
ip add 5.5.5.5 255.0.0.0
TASK 2 : CONFIGURE STATIC ROUTE
R1
router static
address-family ipv4 unicast
4.0.0.0/8 10.1.12.2
10.1.23.0/24 10.1.12.2
10.1.34.0/24 10.1.12.2
10.1.45.0/24 10.1.12.2
4.0.0.0/8 10.1.12.2
5.0.00/8 10.1.12.2
R2
router static
address-family ipv4 unicast
10.1.34.0/24 10.1.23.3
1.0.0.0/8 10.1.12.1
4.0.0.0/8 10.1.23.3
10.1.45.0/24 10.1.23.3
5.0.0.0/8 10.1.23.3
R3
router static
address-family ipv4 unicast
10.1.12.0/24 10.1.23.2
1.0.0.0/8 10.1.23.2
4.0.0.0/8 10.1.34.4
10.1.45.0/24 10.1.34.4
5.0.0.0/8 10.1.34.4
R4
router static
address-family ipv4 unicast
10.1.23.0/24 10.1.34.3
1.0.0.0/8 10.1.34.3
10.1.12.0/24 10.1.34.3
5.0.0.0/8 10.1.45.4
R5
conf t
ip route 10.1.12.0 255.255.255.0 10.1.45.4
ip route 10.1.23.0 255.255.255.0 10.1.45.4
ip route 10.1.34.0 255.255.255.0 10.1.45.4
ip route 1.0.0.0 255.0.0.0 10.1.45.4
ip route 4.0.0.0 255.0.0.0 10.1.45.4
Conclusion
By following these steps, you have successfully configured static routes on both Cisco IOS and XR routers using the next-hop method. This configuration not only enables communication between routers but also lays a solid foundation for further network expansion and management.