How do I configure static routing on Cisco routers?

Static routing is one of the simplest and most fundamental methods of directing network traffic to specific destinations. On Cisco routers, static routing can be configured quickly and efficiently to meet a variety of network connectivity needs. In this article, we’ll explore step-by-step how to configure static routing on Cisco routers.

What is static routing?

Static routing involves manually configuring specific network paths to particular destinations. Unlike dynamic routing, where routes are discovered and exchanged between routers using routing protocols such as OSPF or EIGRP. Static routing therefore requires manual configuration of every route on every router.

See also: How do I configure SSH on a Cisco router?

Advantages of static routing :

  • Precise control: network administrators have total control over configured routes. This allows network paths to be explicitly defined.
  • Resource consumption: Static routing uses fewer processor and bandwidth resources than dynamic routing. This makes it suitable for smaller or less complex networks.
  • Security: Since routes are configured manually, static routing can offer increased security by reducing the risk of false route injection or traffic detour.

Configuring static routing on two Cisco routers :

Here’s an example of static routing configuration on two Cisco routers, R1 and R2, with networks 192.168.1.0/24 and 192.168.2.0/24. And a link between the two routers with the 10.10.10.0/30 network:

How do I configure static routing on Cisco routers?

Configuring static routing on R1 :

R1(config)# ip route 192.168.2.0 255.255.255.0 10.10.10.2

These commands add static routes on R1 to direct traffic to the 192.168.2.0/24 network via the interface connected to R2, and to the 10.10.10.0/30 network via the interface connected to R2.

Configuring static routing on R2 :

R2(config)# ip route 192.168.1.0 255.255.255.0 10.10.10.1

These commands add static routes on R2 to direct traffic to the 192.168.1.0/24 network via the interface connected to R1, and to the 10.10.10.0/30 network via the interface connected to R1.

Checking the configuration :

Use the command :

show ip route

On each router to check that static routes have been correctly added to the routing table.

R1#show ip route 
Codes: L - local, 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, 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/8 is variably subnetted, 2 subnets, 2 masks
C       10.10.10.0/30 is directly connected, GigabitEthernet0/0
L       10.10.10.1/32 is directly connected, GigabitEthernet0/0
     192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.1.0/24 is directly connected, GigabitEthernet0/1
L       192.168.1.1/32 is directly connected, GigabitEthernet0/1
S    192.168.2.0/24 [1/0] via 10.10.10.2

Conclusion

Static routing is a simple and effective method for directing network traffic to specific destinations on Cisco routers. By following the steps described in this article, you’ll be able to configure static routing. This is to meet your network’s connectivity needs.

Whether for simple networks or as a complement to dynamic routing protocols in more complex environments. Static routing remains an essential skill for any Cisco network administrator.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.