【1】 构建拓扑并分配IP
oop
【2】配各个接口的IP
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.10/30
环回接口
[r4]interface LoopBack 0
[r4-LoopBack0]ip address 192.168.1.29/28
… …
… …
… …
blog
[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]ip address 192.168.1.22/30
环回接口
[r5]interface LoopBack 0
[r5-LoopBack0]ip address 5.5.5.1 24
… …
… …
… …
接口
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2/30
环回接口
[r2]interface LoopBack 0
[r2-LoopBack0]ip address 192.168.1.65/28
… …
… …
… …
图片
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.1.13/30
环回接口
[r3]interface LoopBack 0
[r3-LoopBack0]ip address 192.168.1.97/28
… …
… …
… …
ip
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1/30
环回接口
[r1]interface LoopBack 0
[r1-LoopBack0]ip address 192.168.1.33/28
… …
… …
… …
路由
【3】配路由表
[r1]ip route-static 192.168.1.8 30 192.168.1.2
… …
… …
… …
it
[r2]ip route-static 192.168.1.4 30 192.168.1.1
… …
… …
… …
class
[r3]ip route-static 192.168.1.0 30 192.168.1.5
… …
… …
… …
配置
[r4]ip route-static 192.168.1.4 30 192.168.1.13
… …
… …
… …
route
[r5]ip route-static 192.168.1.0 24 192.168.1.17
… …
… …
… …
【4】缺省路由
[r1]ip route-static 0.0.0.0 0.0.0.0 192.168.1.2
[r2]ip route-static 0.0.0.0 0.0.0.0 192.168.1.10
[r3]ip route-static 0.0.0.0 0.0.0.0 192.168.1.14
[r4]ip route-static 0.0.0.0 0.0.0.0 192.168.1.18
[r4]ip route-static 0.0.0.0 0.0.0.0 192.168.1.22
【5】 路由黑洞
r1 0.0 3.0 实际不存在 ,将致使流量有去无回;
而路由黑洞与缺省路由相遇必然产生环路,能够在黑洞路由器上配置一条到达汇总网段的空接口路由来防止该环路由产生
[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
【6】静态浮动路由
[r5]ip route-static 192.168.1.0 24 192.168.1.21 preference 61
(假设1.16/30网段为1000M,1.20/30网段为100M)
通过上述配置后,将全网可达,,而且当1000M故障时将自动切换为100M。