静态路由协议实验综合实验

文章详细描述了如何为R1至R5路由器分配192.168.1.0/24网络的IP地址,设置静态路由以确保全网可达,并避免直接配置到5.5.5.0/24的路由。同时,涉及了环回接口的配置和线路优先级的调整。
摘要由CSDN通过智能技术生成

需求:

1、除R5的换回地址已固定外,整个其他所有的网段基于192.168.1.0/24进行合理的IP地址划分。

2、R1-R4每台路由器存在两个环回接口,用于模拟连接PC的网段;地址也在192.168.1.0/24这个网络范围内。

3、R1-R4上不能直接编写到达5.5.5.0/24的静态路由,但依然可以访问。

4、全网可达,尽量减少每台路由器路由条目的数量;避免环路出现。

5、R4与R5之间,正常1000M链路通信,故障时自动改为100M。

第一步、划分IP地址并配置。

由题意得,共划分五个网段即可,干路一个网段,其他四台路由器各占一个网段,则需要借3位:

1、192.168.1.0/27(干路)

每段链路仅需要两个IP地址就够了,所以继续借位借到30位。

①192.168.1.0/30

②192.168.1.4/30

③192.168.1.8/30

④192.168.1.12/30

⑤192.168.1.16/30

⑥192.168.1.20/30

又因为每个路由器需要用到两个网段,则继续借一位。(每个路由的两个环回地址分别用其网段的第一个可用IP地址)

2、192.168.1.32/27(R1)

①192.168.1.32/28

②192.168.1.48/28

3、192.168.1.64/27(R2)

①192.168.1.64/28

②192.168.1.80/28

4、192.168.1.96/27(R3)

①192.168.1.96/28

②192.168.1.112/28

5、192.168.1.128/27(R4)

①192.168.1.128/28

②192.168.1.144/28

第二步、写静态路由

[r1]ip route-static 192.168.1.64 27 192.168.1.2
[r1]ip route-static 192.168.1.96 27 192.168.1.10
[r1]ip route-static 192.168.1.4 30 192.168.1.2  
[r1]ip route-static 192.168.1.12 30 192.168.1.10
[r1]ip route-static 192.168.1.128 27 192.168.1.10
[r1]ip route-static 192.168.1.128 27 192.168.1.2 
[r1]ip route-static 192.168.1.20 30 192.168.1.2 
[r1]ip route-static 192.168.1.16 30 192.168.1.10

[r2]ip route-static 192.168.1.32 27 192.168.1.1
[r2]ip route-static 192.168.1.8 30 192.168.1.1 
[r2]ip route-static 192.168.1.96 27 192.168.1.1
[r2]ip route-static 192.168.1.96 27 192.168.1.6
[r2]ip route-static 192.168.1.12 30 192.168.1.6
[r2]ip route-static 192.168.1.128 27 192.168.1.6
[r2]ip route-static 192.168.1.20 30 192.168.1.6 
[r2]ip route-static 192.168.1.16 30 192.168.1.6

[r3]ip route-static 192.168.1.32 28 192.168.1.9
[r3]ip route-static 192.168.1.0 30 192.168.1.9 
[r3]ip route-static 192.168.1.64 27 192.168.1.9
[r3]ip route-static 192.168.1.64 27 192.168.1.14
[r3]ip route-static 192.168.1.128 27 192.168.1.14
[r3]ip route-static 192.168.1.4 30 192.168.1.14  
[r3]ip route-static 192.168.1.16 30 192.168.1.14
[r3]ip route-static 192.168.1.20 30 192.168.1.14

[r4]ip route-static 192.168.1.64 27 192.168.1.5
[r4]ip route-static 192.168.1.32 27 192.168.1.5
[r4]ip route-static 192.168.1.0 30 192.168.1.5 
[r4]ip route-static 192.168.1.8 30 192.168.1.13
[r4]ip route-static 192.168.1.32 27 192.168.1.13
[r4]ip route-static 192.168.1.96 27 192.168.1.13

[r5]ip route-static 192.168.1.32 27 192.168.1.21
[r5]ip route-static 192.168.1.64 27 192.168.1.21
[r5]ip route-static 192.168.1.96 27 192.168.1.21
[r5]ip route-static 192.168.1.128 27 192.168.1.21
[r5]ip route-static 192.168.1.32 27 192.168.1.17 
[r5]ip route-static 192.168.1.64 27 192.168.1.17
[r5]ip route-static 192.168.1.96 27 192.168.1.17
[r5]ip route-static 192.168.1.128 27 192.168.1.17
[r5]ip route-static 192.168.1.0 30 192.168.1.21  
[r5]ip route-static 192.168.1.4 30 192.168.1.21
[r5]ip route-static 192.168.1.8 30 192.168.1.21
[r5]ip route-static 192.168.1.12 30 192.168.1.21
[r5]ip route-static 192.168.1.0 30 192.168.1.17 
[r5]ip route-static 192.168.1.4 30 192.168.1.17
[r5]ip route-static 192.168.1.8 30 192.168.1.17
[r5]ip route-static 192.168.1.12 30 192.168.1.17

第三步、写缺省路由

[r1]ip route-static 0.0.0.0 0 192.168.1.2
[r1]ip route-static 0.0.0.0 0 192.168.1.10

[r2]ip route-static 0.0.0.0 0 192.168.1.6

[r3]ip route-static 0.0.0.0 0 192.168.1.14

[r4]ip route-static 0.0.0.0 0 192.168.1.22
[r4]ip route-static 0.0.0.0 0 192.168.1.18

实现全网可达,且为写指向5.5.5.0/24网段的静态路由。

第四步、在手工汇总的路由器上写空接口环回地址

[r1]ip route-static 192.168.1.32 27 NULL 0

[r2]ip route-static 192.168.1.64 27 NULL 0

[r3]ip route-static 192.168.1.96 27 NULL 0

[r4]ip route-static 192.168.1.128 27 NULL 0

第五步、改变线路的优先级。

[r4]ip route-static 0.0.0.0 0 192.168.1.22 preference 61

实验完成。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

麦农111

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值