多语言展示
当前在线:1840今日阅读:167今日分享:16

Cisco静态路配置,怎么设置静态路协议

Cisco静态路配置,怎么设置静态路协议?费话不多说了,直接看图演示:图如示:R1: f 0/0 10.2.2.2 255.0.0.0; f 0/1 192.168.3.1 255.255.255.0;R2: f 0/0 10.2.2.1 255.0.0.0; f 0/1 192.168.2.1 255.255.255.0;PC0: 192.168.3.100 255.255.255.0PC1:192.168.2.100 255.255.255.0相关设备基本配置信息,命令操作如下:R1:R1#conf tEnter configuration commands, one per line. End with CNTL/Z.R1(config)#intR1(config)#interface f 0/0R1(config)#interface f 0/0R1(config-if)#ip addR1(config-if)#ip address 10.2.2.2 255.0.0.0R1(config-if)#no shutdownR1(config)#int fastEthernet 0/1R1(config-if)#ip addR1(config-if)#ip address 192.168.3.1 255.255.255.0R1(config-if)#no shuR1(config-if)#no shutdownR2(config-if)#cdp runR1(config-if)#endOK,类同R2也是一样的;接下来测试PC与路由之间的接通性:R1#ping 192.168.3.100Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.3.100, timeout is 2 seconds:.!!!!Success rate is 80 percent (4/5), round-trip min/avg/max = 2/2/2 msR2#ping 192.168.2.100Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.2.100, timeout is 2 seconds:.!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 2/2/2 ms可以看到PING通了;接下来做静态路由:LOOKR1:Router#conf tEnter configuration commands, one per line. End with CNTL/Z.R1(config)#ip rouR1(config)#ip route 192.168.2.0 255.255.255.0 10.2.2.1R1#show ip routeGateway of last resort is not setC 10.0.0.0/8 is directly connected, FastEthernet0/0S 192.168.2.0/24 [1/0] via 10.2.2.1C 192.168.3.0/24 is directly connected, FastEthernet0/1R2:Router#conf tEnter configuration commands, one per line. End with CNTL/Z.R2(config)#ip rouR2(config)#ip route 192.168.2.0 255.255.255.0 10.2.2.1R2#show ip routeGateway of last resort is not setC 10.0.0.0/8 is directly connected, FastEthernet0/0C 192.168.2.0/24 is directly connected, FastEthernet0/1S 192.168.3.0/24 [1/0] via 10.2.2.2然后 我们来测试:R1:Router#ping 192.168.2.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 msOK通了;R2:Router#ping 192.168.3.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 mOK也通了;PC0上测试:PC1上测试:行了,到些实验成功;总结:静态路由是很容易的路由协议,也是最基本的,只要了解了这个路由协议,那么以后在学习路由协议上就轻松多了;现大家都知道Cisco静态路配置,怎么设置静态路协议了吗!
推荐信息