静态路由实验(作业)

本次作业使用的软件为eNSP

实验报告链接

http://t.csdnimg.cn/Sjxeq

此处是实验思路

好滴,先看题目

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

2R1-R4每个路由器存在两个环回接口,用于模拟连接pc网段,地址也在192,168.10/24这个网络范围内

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

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

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

那么首先进行的就是划分网段啦:

由于每个路由器的每个环回接口都处于一个独立的网段,再加上每个路由器与其他路由器相连的网段

可以确定,本图中一共要求划分出14个网段

然而,因为题目要求尽量减少每泰路由器,路由表的条目数列,那么自然不能一口气全部划分完

首先,可以确定的是每个路由器之间的网段是必须的

那么就有6个网段是确定的

随后,每个路由器的环回地址的网段,可以由一个更大的网段来进行划分

故总共需要划分的网段为:

10个大网段以及8个小网段

首先大网段划分出来依次是:

1:192.168.1.00000000--192.168.1.0/28

2:192.168.1.00010000--192.168.1.16/28

3:192.168.1.00100000--192.168.1.32/28

4:192.168.1.00110000--192.168.1.48/28

5:192.168.1.01000000--192.168.1.64/28

6:192.168.1.01010000--192.168.1.80/28

7:192.168.1.01100000--192.168.1.96/28

8:192.168.1.01110000--192.168.1.112/28

9:192.168.1.10000000--192.168.1.128/28

10:192.168.1.10010000--192.168.1.144/28

11:192.168.1.10100000--192.168.1.150/28

12:192.168.1.10110000--192.168.1.176/28

13:192.168.1.11000000--192.168.1.192/28

14:192.168.1.11010000--192.168.1.208/28

15:192.168.1.11100000--192.168.1.224/28

16:192.168.1.11110000--192.168.1.240/28

由于题目只需要前10个,所以后面的子网先按下不表,留作备用。

其次,是小网段的划分

这里取前10个中的后4个:

由于每个路由只有两个环回地址,故每个网段只需要再划分为两个网段

此处全0与全1网段不再展示

7:192.168.1.01100000--192.168.1.96/28

        192.168.1.01100100--192.168.1.100/30

        192.168.1.01101000--192.168.1.104/30

8:192.168.1.01110000--192.168.1.112/28

        192.168.1.01110100--192.168.1.116/30

        192.168.1.01111000--192.168.1.120/30

9:192.168.1.10000000--192.168.1.128/28

        192.168.1.10000100--192.168.1.132/30

        192.168.1.10001000--192.168.1.136/30

10:192.168.1.10010000--192.168.1.144/28

        192.168.1.10010100--192.168.1.148/30

        192.168.1.10011000--192.168.1.152/30

拓扑图

R1-R4的环回网段依次为

R1:192.168.1.96/28

                        192.168.1.100/30

                        192.168.1.104/30

R2:192.168.1.112/28

                        192.168.1.116/30

                        192.168.1.120/30

R3:192.168.1.128/28

                        192.168.1.132/30

                        92.168.1.136/30

R4:192.168.1.144/28

                        192.168.1.148/30

                        192.168.1.152/30

接下来就是用命令给挨个路由器配上ip

这里不予展示

给每一个路由器配置完IP过后,就是配置静态路由了

首先给R1配置好通往其他大网关的静态路由

[R1]ip route-static 192.168.1.48 28 192.168.1.34
[R1]ip route-static 192.168.1.16 28 192.168.1.2
[R1]ip route-static 192.168.1.16 28 192.168.1.34 pre 61
[R1]ip route-static 192.168.1.48 28 192.168.1.2 pre 61
[R1]ip route-static 192.168.1.64 28 192.168.1.2
[R1]ip route-static 192.168.1.64 28 192.168.1.34
[R1]ip route-static 192.168.1.80 28 192.168.1.34
[R1]ip route-static 192.168.1.80 28 192.168.1.2

随后再给R1配置通往其他路由环回地址的静态路由

[R1]ip route-static 192.168.1.112 28 192.168.1.2 

[R1]ip route-static 192.168.1.128 28 192.168.1.34
[R1]ip route-static 192.168.1.144 28 192.168.1.34
[R1]ip route-static 192.168.1.144 28 192.168.1.2

[R1]ip route-static 192.168.1.128 28 192.168.1.2 pre 61
[R1]ip route-static 192.168.1.112 28 192.168.1.34 pre 61

按以上的步骤依次再给R2,R3,R4配置

[R2]ip route-static 192.168.1.32 28 192.168.1.1
[R2]ip route-static 192.168.1.48 28 192.168.1.18
[R2]ip route-static 192.168.1.64 28 192.168.1.18
[R2]ip route-static 192.168.1.80 28 192.168.1.18
[R2]ip route-static 192.168.1.96 28 192.168.1.1
[R2]ip route-static 192.168.1.128 28 192.168.1.1
[R2]ip route-static 192.168.1.128 28 192.168.1.18
[R2]ip route-static 192.168.1.144 28 192.168.1.18

[R2]ip route-static 192.168.1.64 28 192.168.1.1 preference 61
[R2]ip route-static 192.168.1.80 28 192.168.1.1 preference 61
[R2]ip route-static 192.168.1.48 28 192.168.1.1 preference 61
[R2]ip route-static 192.168.1.144 28 192.168.1.1 preference 61

[R2]ip route-static 192.168.1.96 28 192.168.1.18 preference 61

[R3]ip route-static 192.168.1.0 28 192.168.1.33
[R3]ip route-static 192.168.1.16 28 192.168.1.50
[R3]ip route-static 192.168.1.64 28 192.168.1.50
[R3]ip route-static 192.168.1.80 28 192.168.1.50
[R3]ip route-static 192.168.1.144 28 192.168.1.50
[R3]ip route-static 192.168.1.96 28 192.168.1.33
[R3]ip route-static 192.168.1.112 28 192.168.1.33
[R3]ip route-static 192.168.1.112 28 192.168.1.50

[R4]ip route-static 192.168.1.32 28 192.168.1.49
[R4]ip route-static 192.168.1.0 28 192.168.1.17
[R4]ip route-static 192.168.1.112 28 192.168.1.17
[R4]ip route-static 192.168.1.128 28 192.168.1.49
[R4]ip route-static 192.168.1.96 28 192.168.1.49
[R4]ip route-static 192.168.1.96 28 192.168.1.17

[R5]ip route-static 192.168.1.0 28 192.168.1.65 
[R5]ip route-static 192.168.1.16 28 192.168.1.65
[R5]ip route-static 192.168.1.32 28 192.168.1.65
[R5]ip route-static 192.168.1.48 28 192.168.1.65
[R5]ip route-static 192.168.1.48 28 192.168.1.80 preference 61
[R5]ip route-static 192.168.1.16 28 192.168.1.80 preference 61
[R5]ip route-static 192.168.1.0 28 192.168.1.80 preference 61
[R5]ip route-static 192.168.1.32 28 192.168.1.80 preference 61

[R5]ip route-static 192.168.1.112 28 192.168.1.65
[R5]ip route-static 192.168.1.128 28 192.168.1.65
[R5]ip route-static 192.168.1.144 28 192.168.1.65

[R5]ip route-static 192.168.1.96 28 192.168.1.65

由于不能在R1-R4上配置通往5.5.50/24网段的静态路由

故我们在R1-R4上配置缺省路由,并配置防环设计

[R1]ip route-static 0.0.0.0 0 192.168.1.34

[R2]ip route-static 0.0.0.0 0 192.168.1.18

[R3]ip route-static 0.0.0.0 0 192.168.1.50

[R4]ip route-static 0.0.0.0 0 192.168.1.66
[R4]ip route-static 0.0.0.0 0 192.168.1.82 preference 61

这一下就是全网通了

防环设计

[R1]ip route-static 192.168.1.96 28 NULL 0

[R2]ip route-static 192.168.1.112 28 NULL 0

[R3]ip route-static 192.168.1.128 28 NULL 0

[R4]ip route-static 192.168.1.144 28 NULL 0

最后修改一下cost百兆网的cost值

[R4-GigabitEthernet4/0/0]ospf cost 10

使其cost增加,所有线路优先选择cost低的千兆网

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值