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.

没有评论:

发表评论