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

2025-10-22 15:37:11

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.0

PC1: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 shutdown

R1(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 shutdown

R2(config-if)#cdp run

R1(config-if)#end

OK,类同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 ms

R2#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通了;接下来做静态路由:LOOK

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

R1:

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 route

Gateway 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/1

R2:

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 route

Gateway 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 ms

OK通了;

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 m

OK也通了;

PC0上测试:

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

PC1上测试:

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

行了,到些实验成功;

总结:静态路由是很容易的路由协议,也是最基本的,只要了解了这个路由协议,那么以后在学习路由协议上就轻松多了;现大家都知道Cisco静态路配置,怎么设置静态路协议了吗

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢