2012年3月21日星期三

How to configure static routes on Cisco routers?

You can cisco configuration two types of routing on the router- static and dynamic to send the traffic to destination. Static route tell the network devices about exact location (hard-coded destination). Static routers can work well with small network but in large scale network dynamic routing is the best choice. Configure static routes between routers to allow data transfer between routers without the use of dynamic routing protocols.

From the global configuration mode, configure the hostname then configure the console and enable passwords on each router.

To configure static routes, first enter global configuration mode to run the following commands.

Configure the Static Routes on Router A. 
First run the cisco command show ip route to view the IP routing table for router A before defining static routes
RouterA#configure terminal                (enter in global configuration mode) 
RouterA(config)#ip route 15.0.0.0  255.0.0.0 10.1.1.2     (define static routing on Router A)
RouterA(config)#ip route 193.168.2.0 255.255.255.0 10.1.1.2       (define static routing on Router A)
RouterA(config)#ip route 193.168.3.0 255.255.255.0 20.1.1.2       (define static routing on Router A)
RouterA(config)#exit
RouterA#

Now run the command show ip route on router A to view the IP routing table (directly connected + static routes) detail.

Configure the Static Routes on Router B.
First run the command show ip route to view the IP routing table for router B before defining static routes
RouterB#configure terminal                (enter in global configuration mode)

RouterB(config)#ip route 20.0.0.0  255.0.0.0 10.1.1.1     (define static routing on Router B)
RouterB(config)#ip route 193.168.1.0 255.255.255.0 10.1.1.1       (define static routing on Router B)
RouterB(config)#ip route 193.168.3.0 255.255.255.0 15.1.1.2       (define static routing on Router B)
RouterB(config)#exit
RouterB#

Now run the command show ip route on router B to view the IP routing table (directly connected + static routes) detail.

Configure the Static Routes on Router C. 
First run the cisco software command show ip route to view the IP routing table for router C before defining static routes
RouterC#configure terminal                (enter in global configuration mode) 
RouterC(config)#ip route 10.0.0.0  255.0.0.0 15.1.1.1     (define static routing on Router C)
RouterC(config)#ip route 193.168.2.0 255.255.255.0 15.1.1.1       (define static routing on Router C)
RouterC(config)#ip route 193.168.1.0 255.255.255.0 20.1.1.2       (define static routing on Router C)
RouterC(config)#exit
RouterC#

Now run the command cisco download show ip route on router C to view the IP routing table (directly connected + static routes) detail.

2 条评论:

  1. I found the guide on setting up static routes really clear, especially the part explaining how traffic chooses the right path. A while back when I was fixing a small office network, I relied on network interface modules while testing different routing paths between devices. It took some trial and error, but watching the routes finally work taught me how important simple routing rules can be for stable connections.

    回复删除
  2. Great tutorial on configuring static routes on Cisco routers. The step-by-step explanation makes it much easier for beginners to understand how traffic can be directed to specific networks using manual routing instead of dynamic protocols. Guides like this are very helpful for people learning real networking concepts and practicing router configuration. In many business environments, routing works together with infrastructure devices such as managed and unmanaged switches, which help connect multiple devices across a LAN and ensure smooth communication within the network.

    回复删除