题目:
题目分析:
1、我们根据1和2条题目要求可以来对设备进行IP地址规划。
由拓扑图可以看出有6个骨干线路,再加上r1~r4每个路由器有2个环回地址(每个环回地址我们看作一个用户线路),推断出需要14个网段。
网段有点多,我们进行优化一下:
我们可以分为两步:
1.1第一步
每个路由器上的2个环回接口我们看成一个子网,4个路由器共4个子网;所有的骨干线路我们看作1个子网。在192.168.1.0/24中我们需要划分出5个子网。
步骤:
1.2第二步
因为每个路由器有2个环回接口,所以每个路由器通过第一步获得的子网需要再划分出2个子网。
步骤:
而骨干线路有6条,所以我们需要将得到的骨干线路子网192.168.1.0/27再划分出6个子网
步骤:
2、根据第3、4、5条题目要求来配置静态路由:
有下面几个关键点:
1.不能直接配置到达5.5.5.0/24的静态路由,但依然可以访问,就需要配置一个缺省路由。
2.要减少路由表条目的数量且避免环路出现,就需要选择最短路径并手工汇总路由表。
3.需要配置一个浮动静态路由
建立拓扑图并进行标注:
为每个接口配置ip地址:
R1:
<Huawei>sys
[Huawei]sysname r1
[r1]int lo0
[r1-LoopBack0]ip address 192.168.1.33 28
[r1-LoopBack0]int lo1
[r1-LoopBack1]ip address 192.168.1.49 28
[r1-LoopBack1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
[r1-GigabitEthernet0/0/0]int g0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.1.14 30
R2:
<Huawei>sys
[Huawei]sysname r2
[r2]int lo0
[r2-LoopBack0]ip address 192.168.1.65 28
[r2-LoopBack0]int lo1
[r2-LoopBack1]ip address 192.168.1.81 28
[r2-LoopBack1]int g0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 30
[r2-GigabitEthernet0/0/0]int g0/0/1
[r2-GigabitEthernet0/0/1]ip address 192.168.1.5 30
R3:
<Huawei>sys
[Huawei]sysname r3
[r3]int lo0
[r3-LoopBack0]ip address 192.168.1.97 28
[r3-LoopBack0]int lo1
[r3-LoopBack1]ip address 192.168.1.113 28
[r3-LoopBack1]int g0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.1.13 30
[r3-GigabitEthernet0/0/1]int g0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.1.10 30
R4:
<Huawei>sys
[Huawei]sysname r4
[r4]int lo0
[r4-LoopBack0]ip address 192.168.1.129 28
[r4-LoopBack0]int lo1
[r4-LoopBack1]ip address 192.168.1.145 28
[r4-LoopBack1]int g0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.6 30
[r4-GigabitEthernet0/0/0]int g0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.1.9 30
[r4-GigabitEthernet0/0/1]int g0/0/2
[r4-GigabitEthernet0/0/2]ip address 192.168.1.17 30
[r4-GigabitEthernet0/0/2]int e4/0/0
[r4-Ethernet4/0/0]ip address 192.168.1.21 30
R5:
<Huawei>sys
[Huawei]sysname r5
[r5]int lo0
[r5-LoopBack0]ip address 5.5.5.1 24
[r5-LoopBack0]int g0/0/0
[r5-GigabitEthernet0/0/0]ip address 192.168.1.22 30[r5-GigabitEthernet0/0/0]int g0/0/1
[r5-GigabitEthernet0/0/1]ip address 192.168.1.18 30
手动配置静态路由:
R1:
[r1]ip route-static 192.168.1.64 27 192.168.1.2
[r1]ip route-static 192.168.1.128 27 192.168.1.2
[r1]ip route-static 192.168.1.96 27 192.168.1.13
[r1]ip route-static 192.168.1.128 27 192.168.1.13
[r1]ip route-static 192.168.4.0 30 192.168.1.2
[r1]ip route-static 192.168.8.0 30 192.168.1.13
[r1]ip route-static 192.168.16.0 30 192.168.1.2
[r1]ip route-static 192.168.16.0 30 192.168.1.13
[r1]ip route-static 192.168.20.0 30 192.168.1.2
[r1]ip route-static 192.168.20.0 30 192.168.1.13
[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.13 //配置缺省路由[r1]display ip routing-table //查看路由表
R2:
[r2]ip route-static 192.168.1.32 27 192.168.1.1
[r2]ip route-static 192.168.1.96 27 192.168.1.1
[r2]ip route-static 192.168.1.128 27 192.168.1.6
[r2]ip route-static 192.168.1.96 27 192.168.1.6[r2]ip route-static 192.168.12.0 30 192.168.1.1
[r2]ip route-static 192.168.8.0 30 192.168.1.6
[r2]ip route-static 192.168.16.0 30 192.168.1.6
[r2]ip route-static 192.168.20.0 30 192.168.1.6
[r2]ip route-static 0.0.0.0 0 192.168.1.6 //配置缺省路由[r2]display ip routing-table //查看路由表
R3:
[r3]ip route-static 192.168.1.32 27 192.168.1.14
[r3]ip route-static 192.168.1.128 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.64 27 192.168.1.9
[r3]ip route-static 192.168.1.0 30 192.168.1.14
[r3]ip route-static 192.168.4.0 30 192.168.1.9
[r3]ip route-static 192.168.16.0 30 192.168.1.9
[r3]ip route-static 192.168.20.0 30 192.168.1.9
[r3]ip route-static 0.0.0.0 0 192.168.1.9 //配置缺省路由[r3]display ip routing-table //查看路由表
R4:
[r4]ip route-static 192.168.1.32 27 192.168.1.5
[r4]ip route-static 192.168.1.32 27 192.168.1.10
[r4]ip route-static 192.168.1.64 27 192.168.1.5
[r4]ip route-static 192.168.1.96 27 192.168.1.10
[r4]ip route-static 192.168.1.0 30 192.168.1.5
[r4]ip route-static 192.168.12.0 30 192.168.1.10
[r4]ip route-static 0.0.0.0 0 192.168.1.18 //配置缺省路由
[r4]ip route-static 0.0.0.0 0 192.168.1.22 preference 61 //设置路由优先级来浮动静[r4]display ip routing-table //查看路由表
R5:
[r5]ip route-static 0.0.0.0 0 192.168.1.17 //所有路由朝这个出口走
[r5]ip route-static 0.0.0.0 0 192.168.1.21 preference 61 //设置路由优先级来浮动静[r5]display ip routing-table //查看路由表