由题可得,现在有14个广播域,需要划分出十四个网段,需要借用四位主机位用于网络位,划分出的网段分别是:
192.168.1.0/28
192.168.1.16/28
192.168.1.32/28
192.168.1.48/28
192.168.1.64/28
192.168.1.80/28
192.168.1.96/28
192.168.1.112/28
192.168.1.128/28
192.168.1.144/28
192.168.1.160/28
192.168.1.176/28
192.168.1.192/28
192.168.1.208/28
192.168.1.224/28
192.168.1.240/28
以下为网段、网关分配情况
根据分析,在路由器上配置IP及环回IP
[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 28
环回
[r2]interface LoopBack 0
[r2-LoopBack0]ip address 192.168.1.65 28
因为需要全网可达,除去直连的路由器,其他的需要编写静态路由
[r1]ip route-static 192.168.1.128 27 192.168.1.18
[r1]ip route-static 192.168.1.128 27 192.168.1.2
[r1]ip route-static 192.168.1.192 27 192.168.1.18
[r1]ip route-static 192.168.1.192 27 192.168.1.2
[r1]ip route-static 192.168.1.176 28 192.168.1.18
[r1]ip route-static 192.168.1.160 28 192.168.1.2
[r4]ip route-static 192.168.1.32 27 192.168.1.161
[r4]ip route-static 192.168.1.64 27 192.168.1.161
[r4]ip route-static 192.168.1.96 27 192.168.1.177
[r4]ip route-static 192.168.1.32 27 192.168.1.177
[r4]ip route-static 192.168.1.16 28 192.168.1.177
[r4]ip route-static 192.168.1.0 28 192.168.1.161
[r3]ip route-static 192.168.1.32 27 192.168.1.17
[r3]ip route-static 192.168.1.64 27 192.168.1.17
[r3]ip route-static 192.168.1.64 27 192.168.1.178
[r3]ip route-static 192.168.1.0 28 192.168.1.17
[r3]ip route-static 192.168.1.128 27 192.168.1.178
[r3]ip route-static 192.168.1.192 27 192.168.1.178
[r3]ip route-static 192.168.1.160 28 192.168.1.178
[r2]ip route-static 192.168.1.32 27 192.168.1.1
[r2]ip route-static 192.168.1.16 28 192.168.1.1
[r2]ip route-static 192.168.1.96 27 192.168.1.1
[r2]ip route-static 192.168.1.176 28 192.168.1.1
[r2]ip route-static 192.168.1.128 27 192.168.1.162
[r2]ip route-static 192.168.1.96 27 192.168.1.162
[r2]ip route-static 192.168.1.192 27 192.168.1.162
[r2]ip route-static 192.168.1.176 28 192.168.1.162
[r5]ip route-static 192.168.1.32 27 192.168.1.193
[r5]ip route-static 192.168.1.0 28 192.168.1.193
[r5]ip route-static 192.168.1.64 27 192.168.1.193
[r5]ip route-static 192.168.1.96 27 192.168.1.193
[r5]ip route-static 192.168.1.16 28 192.168.1.193
[r5]ip route-static 192.168.1.128 27 192.168.1.193
[r5]ip route-static 192.168.1.160 28 192.168.1.193
[r5]ip route-static 192.168.1.176 28 192.168.1.193
[r5]ip route-static 192.168.1.32 27 192.168.1.209
[r5]ip route-static 192.168.1.0 28 192.168.1.209
[r5]ip route-static 192.168.1.64 27 192.168.1.209
[r5]ip route-static 192.168.1.96 27 192.168.1.209
[r5]ip route-static 192.168.1.16 28 192.168.1.209
[r5]ip route-static 192.168.1.128 27 192.168.1.209
[r5]ip route-static 192.168.1.160 28 192.168.1.209
[r5]ip route-static 192.168.1.176 28 192.168.1.209
由于R4,R5之间两条路线的带宽不一样,所以为100M的路线设置低一些的优先级,使R4,R5之间的通信优先1000M路线,故障时才使用100M路线
[r5]ip route-static 192.168.1.32 27 192.168.1.209 preference 66
[r5]ip route-static 192.168.1.0 28 192.168.1.209 preference 66
[r5]ip route-static 192.168.1.64 27 192.168.1.209 preference 66
[r5]ip route-static 192.168.1.96 27 192.168.1.209 preference 66
[r5]ip route-static 192.168.1.16 28 192.168.1.209 preference 66
[r5]ip route-static 192.168.1.128 27 192.168.1.209 preference 66
[r5]ip route-static 192.168.1.160 28 192.168.1.209 preference 66
[r5]ip route-static 192.168.1.176 28 192.168.1.209 preference 66
由于不能直接指向R5的环回使用下一跳,所以这边使用缺省路由来实现,但是有两个网段没有使用,会造成路由黑洞,所以这里使用空接口路由来处理
给R5写上
ip route-static 192.168.1.224 27 NULL 0
解决完路由黑洞,用缺省路由实现到R5环回5.5.5.0网段的可达
ip route-static 0.0.0.0 0.0.0.0 192.168.1.194
还需要考虑到优先级的问题,降低100M这个路线的优先级
ip route-static 0.0.0.0 0.0.0.0 192.168.1.194 preference 66