静态路由配置实验(静态路由配置实验原理)

网友投稿 250 2022-09-28


静态路由配置实验(静态路由配置实验原理)

1、 根据拓扑链接,配置PC 的IP和网关2、 路由器基本配置路由器R0基本配置Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#interRouter(config)#interface f0/0Router(config-if)#ip add 192.168.1.2 255.255.255.0Router(config-if)#no shutdown Router(config-if)#interface s2/0Router(config-if)#ip add 192.168.3.1 255.255.255.0Router(config-if)#no shutdown Router(config-if)#clock rate 64000 时钟频率Router(config-if)#no shutdown Router(config-if)#interface s3/0Router(config-if)#ip add 192.168.2.1 255.255.255.0Router(config-if)#clock rate 64000 时钟频率Router(config-if)#no shutdown Router(config-if)#endRouter#Router#show ip route 查看路由表 都是直连路由

C 192.168.1.0/24 is directly connected, FastEthernet0/0C 192.168.2.0/24 is directly connected, Serial3/0C 192.168.3.0/24 is directly connected, Serial2/0Router#conf tRouter(config)#ip route 192.168.6.0 255.255.255.0 192.168.3.2配置静态路由命令格式:IP route 目标网段 掩码 下一跳或者出接口Router(config)#ip route 192.168.5.0 255.255.255.0 192.168.2.2Router(config)#endRouter#Router#show ip route

C 192.168.1.0/24 is directly connected, FastEthernet0/0C 192.168.2.0/24 is directly connected, Serial3/0C 192.168.3.0/24 is directly connected, Serial2/0S 192.168.5.0/24 [1/0] via 192.168.2.2S 192.168.6.0/24 [1/0] via 192.168.3.2Router#

路由器R2基本配置Router>Router>enRouter#conf tRouter(config)#interface f0/0Router(config-if)#ip add 192.168.5.2 255.255.255.0Router(config-if)#no shutdown

Router(config-if)#Router(config-if)#exit Router(config)#interface s2/0Router(config-if)#ip add 192.168.2.2 255.255.255.0Router(config-if)#no shuRouter(config-if)#no shutdown Router(config-if)#interface s3/0Router(config-if)#ip add 192.168.4.2 255.255.255.0Router(config-if)#no shuRouter(config-if)#no shutdown Router(config-if)#endRouter#Router#show ip route C 192.168.2.0/24 is directly connected, Serial2/0C 192.168.4.0/24 is directly connected, Serial3/0C 192.168.5.0/24 is directly connected, FastEthernet0/0

Router#conf tRouter(config)#ip rouRouter(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1 Router(config)#ip route 192.168.6.0 255.255.255.0 192.168.4.1 Router(config)#endRouter#Router#show ip rouRouter#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

candidate default, U - per-user static route, o - ODRP - periodic downloaded static route

Gateway of last resort is not set

S 192.168.1.0/24 [1/0] via 192.168.2.1C 192.168.2.0/24 is directly connected, Serial2/0C 192.168.4.0/24 is directly connected, Serial3/0C 192.168.5.0/24 is directly connected, FastEthernet0/0S 192.168.6.0/24 [1/0] via 192.168.4.1Router#

路由器R3基本配置Router>Router>enRouter#conf tRouter(config)#interface f0/0

Router(config-if)#ip add 192.168.6.2 255.255.255.0Router(config-if)#no shutdown Router(config-if)#exit Router(config)#interRouter(config)#interface s2/0Router(config-if)#ip add 192.168.3.2 255.255.255.0Router(config-if)#no shRouter(config-if)#no shutdown

Router(config-if)#interface s3/0Router(config-if)#ip add 192.168.4.1 255.255.255.0Router(config-if)#clock rate 64000 Router(config-if)#no shutdown Router(config-if)#endRouter#Router#show ip route

C 192.168.3.0/24 is directly connected, Serial2/0C 192.168.4.0/24 is directly connected, Serial3/0C 192.168.6.0/24 is directly connected, FastEthernet0/0Router#conf tRouter(config)#ip rouRouter(config)#ip route 192.168.1.0 255.255.255.0 192.168.3.1Router(config)#ip route 192.168.5.0 255.255.255.0 192.168.4.2Router(config)#

最后测试三台PC是否可以ping通!如果通说明实验成功,如果不通要检查路由,检查网关等


版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:BGP(一)——原理精讲及内外部邻居配置(bgp邻居建立过程及报文详解)
下一篇:Springboot项目如何获取所有的接口
相关文章

 发表评论

暂时没有评论,来抢沙发吧~