静态路由分析与配置(推荐2篇)
读文网小编为大家分享静态路由分析与配置。接下来大家跟着读文网小编一起去了解下吧!
静态路由分析与配置详解教程
R1(configintloopback0
//进入本地回环网口0
R1(config-ifipaddress 1.1.1.1 255.255.255.0
//设置本地回环网口iP地址
R1(configints0/0
R1(config-ifipaddress 192.168.12.1 255.255.255.0
//设置S0/0口IP 地址
R1(config-ifnoshutdown
//打开端口
R2(configintloopback0
R2(config-ifipaddress 2.2.2.2 255.255.255.0
R2(configints0/0
R2(config-if)clockrate 128000
R2(config-ifipaddress 192.168.12.2 255.255.255.0
R2(config-ifnoshutdown
R2(configints0/1
R2(config-if)clockrate 128000
//设置时钟
R2(config-ifipaddress 192.168.23.2 255.255.255.0
R2(config-ifnoshutdown
R3(configintloopback0
R3(config-ifipaddress 3.3.3.3 255.255.255.0
R3(configints0/0/1
R3(config-ifipaddress 192.168.23.3 255.255.255.0
R3(config-ifnoshutdown
(2) R1 上配置静态路由
R1(configiproute 2.2.2.0 255.255.255.0 s0/0/0
//下一跳为接口形式,s0/0是点对点的链路,注意应该是R1 上的s0/0 接口
R1(configiproute 3.3.3.0 255.255.255.0 192.168.12.2
//下一跳为IP 地址形式,192.168.12.2 是R2 上的IP 地址
(3) R2 上配置静态路由
R2(configiproute 1.1.1.0 255.255.255.0 s0/0
R2(configiproute 3.3.3.0 255.255.255.0 s0/1
(4) R3 上配置静态路由
R3(configiproute 1.1.1.0 255.255.255.0 s0/1
R3(configiproute 2.2.2.0 255.255.255.0 s0/1
(5)查看R1 ,R2, R3路由器上的路由表,查看能否学习到相关的路由,以R1 检查为例并给出提示
Routershowip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.12.0/24 is directly connected, Serial0/0
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
2.0.0.0/24 is subnetted, 1 subnets
S 2.2.2.0 is directly connected, Serial0/0
3.0.0.0/24 is subnetted, 1 subnets
S 3.3.3.0 [1/0] via 192.168.12.2
(6)使用ping检查是否连接成功,
Routerping2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/71/120 ms
Router#
至此我们的实验完成了,小编相信大家也学到了少吧
静态路由分析与配置
实验目的使1.1.1.0/24、2.2.2.0/24、3.3.3.0/24 网络之间能够互相通信。
(1) 步骤1:在各路由器上配置IP 地址、保证其直连链路的连通