静态路由分析与配置

人气:319 ℃/2024-04-15 00:17:33
【导读】 静态路由分析与配置,下面是小编为你收集整理的,希望对你有帮助!小编为大家分享。接下来大家跟着小编一起去了解下吧!实验目的使1.1.1.0/24、2.2.2.0/24、3.3.3.0/24 网络之间能够互相通信。1 步骤1:在各路由器上配置IP 地址、保证其直连链...

小编为大家分享。接下来大家跟着小编一起去了解下吧!

实验目的使1.1.1.0/24、2.2.2.0/24、3.3.3.0/24 网络之间能够互相通信。

1 步骤1:在各路由器上配置IP 地址、保证其直连链路的连通

详解教程

R1config#int loopback0

//进入本地回环网口0

R1config-if#ip address 1.1.1.1 255.255.255.0

//设置本地回环网口iP地址

R1config#int s0/0

R1config-if#ip address 192.168.12.1 255.255.255.0

//设置S0/0口IP 地址

R1config-if#no shutdown

//打开端口

R2config#int loopback0

R2config-if#ip address 2.2.2.2 255.255.255.0

R2config#int s0/0

R2config-if#clock rate 128000

R2config-if#ip address 192.168.12.2 255.255.255.0

R2config-if#no shutdown

R2config#int s0/1

R2config-if#clock rate 128000

//设置时钟

R2config-if#ip address 192.168.23.2 255.255.255.0

R2config-if#no shutdown

R3config#int loopback0

R3config-if#ip address 3.3.3.3 255.255.255.0

R3config#int s0/0/1

R3config-if#ip address 192.168.23.3 255.255.255.0

R3config-if#no shutdown

2 R1 上配置静态路由

R1config#ip route 2.2.2.0 255.255.255.0 s0/0/0

//下一跳为接口形式,s0/0是点对点的链路,注意应该是R1 上的s0/0 接口

R1config#ip route 3.3.3.0 255.255.255.0 192.168.12.2

//下一跳为IP 地址形式,192.168.12.2 是R2 上的IP 地址

3 R2 上配置静态路由

R2config#ip route 1.1.1.0 255.255.255.0 s0/0

R2config#ip route 3.3.3.0 255.255.255.0 s0/1

4 R3 上配置静态路由

R3config#ip route 1.1.1.0 255.255.255.0 s0/1

R3config#ip route 2.2.2.0 255.255.255.0 s0/1

5查看R1 ,R2, R3路由器上的路由表,查看能否学习到相关的路由,以R1 检查为例并给出提示

Router#show ip 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检查是否连接成功,

Router#ping 2.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#

至此我们的实验完成了,小编相信大家也学到了少吧

Copyright © 2008-2024 蜗牛素材网 All Rights Reserved
一个致力于分享各种行业知识与经验、学习资源交流平台,知识让你的眼界更宽广!