breadcrumb thing.
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.
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.
Let's walk through setting up static routing on two Cisco routers for two networks:
The setup assumes you have two routers connected in a series, each with interfaces in each network.
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.
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.