静态路由的配置方法和技巧(今日静态路由的配置方法和技巧)
大家好,今天就和小新一起来看看这个问题吧 。静态路由的配置方法和技巧,静态路由的配置方法和技巧很多人还不知道,现在让我们一起来看看吧!
1、配置计算机PC1:IP: 192.168.1.2Submask: 255.255.255.0Gateway: 192.168.1.1配置计算机PC2:IP:192.168.2.2Submask:255.255.255.0Gateway:192.168.2.1测试连通性PC1 ping PC2Ping 192.168.2.2配置路由器R1Router>enRouter#conf tRouter(config)#hostname R1R1(config)#int fa1/0R1(config-if)#no shutR1(config-if)#R1(config-if)#ip address 192.168.1.1 255.255.255.0R1(config-if)#exitR1(config)#int s2/0R1(config-if)#ip address 192.168.3.1 255.255.255.0R1(config-if)#clock rate 64000R1(config-if)#no shutR1(config-if)#endR1#clock rate 64000(必须配置时钟才可通信)配置路由器R2R2>enR2#conf tR2(config)#hostname R2R2(config)#int fa1/0R2(config-if)#ip address 192.168.2.1 255.255.255.0R2(config-if)#no shutR2(config-if)#R2(config-if)#exitR2(config)#int s2/0R2(config-if)#ip address 192.168.3.2 255.255.255.0R2(config-if)#no shutR2(config-if)#R2(config-if)#clock rate 64000This command applies only to DCE interfacesR2(config-if)#R2(config-if)#endR2#配置R1路由:R1>enR1#conf tR1(config)#ip route 192.168.2.0 255.255.255.0 192.168.3.2R1(config)#endR1#R1#show ip routeCodes: 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 routeGateway of last resort is not setC 192.168.1.0/24 is directly connected, FastEthernet1/0S 192.168.2.0/24 [1/0] via 192.168.3.2C 192.168.3.0/24 is directly connected, Serial2/0R1#配置路由R2R2>enR2#conf tEnter configuration commands, one per line. End with CNTL/Z.R2(config)#ip route 192.168.1.0 255.255.255.0 192.168.3.1R2(config)#endR2#R2#show ip routeCodes: 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 routeGateway of last resort is not setS 192.168.1.0/24 [1/0] via 192.168.3.1C 192.168.2.0/24 is directly connected, FastEthernet1/0C 192.168.3.0/24 is directly connected, Serial2/0测试连通性:PC1 Ping PC2Ping 192.168.2.2。
这篇文章到此就结束,希望能帮助到大家。
扫描二维码推送至手机访问。
版权声明:文章内容摘自网络,如果无意之中侵犯了您的版权,请联系本站,本站将在3个工作日内删除。谢谢!