题目:
第一步:划分网段
192.168.1.0/27 —骨干(6个) 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 192.168.1.24/30 192.168.1.28/30
192.168.1.32/27—R1 192.168.1.32/28 192.168.1.48/28
192.168.1.64/27—R2 192.168.1.64/28 192.168.1.80/28
192.168.1.96/27—R3 192.168.1.96/28 192.168.1.112/28
192.168.1.128/27—R4 192.168.1.128/28 192.168.1.144/28
剩余多的网段
192.168.1.160/27
192.168.1.192/27
192.168.1.224/27
分配图如下
第二步:配置基层,让所有结点拥有合法ip
-
给路由接口配ip
以r1为例
[Huawei]sysname r1
[r1]interface Ethernet 0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.5 30
[r1-GigabitEthernet0/0/0]q
[r1]interface Ethernet 0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.1.1 30
-
给每个路由创建环回接口
以r1为例
[r1]interface LoopBack 0
[r1-LoopBack0]ip address 192.168.1.33 28
[r1-LoopBack0]q
[r1]interface LoopBack 1
[r1-LoopBack1]ip address 192.168.1.49 28
第三步:让全网可达
-
给每台路由器补充到达缺少的网段的路由信息
以r1为例
[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.2
[r1]ip route-static 192.168.1.8 30 192.168.1.2
[r1]ip route-static 192.168.1.12 30 192.168.1.2
[r1]ip route-static 192.168.1.128 30 192.168.1.2
[r1]ip route-static 192.168.1.128 30 192.168.1.6
[r1]ip route-static 192.168.1.16 30 192.168.1.2
[r1]ip route-static 192.168.1.16 30 192.168.1.6
第四步:配置缺省路由[单项走,往过配]
[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.6
[r2]ip route-static 0.0.0.0 0 192.168.1.10
[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.18
可ping 5.5.5.0 24的网段通
第五步:配置浮动静态路由
[r4]ip route-static 0.0.0.0 0 192.168.1.22 perference 61
[r5]ip route-static 192.168.1.0 30 192.168.1.21 preference 61
[r5]ip route-static 192.168.1.4 30 192.168.1.21 preference 61
[r5]ip route-static 192.168.1.8 30 192.168.1.21 preference 61
[r5]ip route-static 192.168.1.12 30 192.168.1.21 preference 61
[r5]ip route-static 192.168.1.32 27 192.168.1.21 preference 61
[r5]ip route-static 192.168.1.64 27 192.168.1.21 preference 61
[r5]ip route-static 192.168.1.96 27 192.168.1.21 preference 61
第六步:设置空接口防环路由
[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
[r1]ip route-static 192.168.1.128 27 null 0
静态路由缺点:
1、在中大型网络配置量大,管理难度高
2、不能随着拓扑的变化而实时收敛