Back to Posts

Static Routing

Static Routing

breadcrumb thing.

Static Routing with Cisco Routers

What is Static Routing?

Static routing is the process of manually configuring routing tables on routers. In static routing, the network administrator specifies the paths for traffic to take based on destination IP addresses. Unlike dynamic routing, which adjusts automatically, static routing is fixed and doesn't change unless manually reconfigured.

Why is Static Routing Used?

Static routing is used in smaller networks or when the network structure is predictable. It's ideal for simple, cost-effective configurations because it doesn't require additional resources like routing protocols. Static routes also provide more control over traffic routing and can be used for specific security or performance needs.

How to Set Up Static Routing

Let's walk through setting up static routing on two Cisco routers for two networks:

  • Network A: 192.168.1.0/24
  • Network B: 192.168.2.0/24

The setup assumes you have two routers connected in a series, each with interfaces in each network.

Step 1: Configure Router A


RouterA> enable
RouterA# configure terminal
RouterA(config)# interface GigabitEthernet0/0
RouterA(config-if)# ip address 192.168.1.1 255.255.255.0
RouterA(config-if)# no shutdown
RouterA(config-if)# exit

RouterA(config)# ip route 192.168.2.0 255.255.255.0 192.168.1.2
        

This configures Router A's interface with the IP address for Network A and sets up a static route to Network B through Router B's IP address.

Step 2: Configure Router B


RouterB> enable
RouterB# configure terminal
RouterB(config)# interface GigabitEthernet0/0
RouterB(config-if)# ip address 192.168.2.1 255.255.255.0
RouterB(config-if)# no shutdown
RouterB(config-if)# exit

RouterB(config)# ip route 192.168.1.0 255.255.255.0 192.168.2.2
        

This configures Router B's interface with the IP address for Network B and sets up a static route to Network A through Router A's IP address.

Network Topology

Network Topology
Back to Posts