静态路由应用之浮动静态路由

如图,要求使用静态路由实现PC1与PC2正常情况下通过AR2-AR3直连线路,当这条直连线路出现中断时自动切换到经过AR1的这条线路

静态路由应用之浮动静态路由_第1张图片

思路:静态路由默认优先级为60,可以给12和13网段的静态路由优先级调高即可;

AR2配置:

sys
[Huawei]int gi0/0/1
[[Huawei]un in en
Info: Information center is disabled.
[Huawei]int gi0/0/1
[Huawei-GigabitEthernet0/0/1]ip addr 10.0.23.2 24
[Huawei-GigabitEthernet0/0/1]int gi0/0/0
[Huawei-GigabitEthernet0/0/0]ip addr 10.0.12.2 24
[Huawei-GigabitEthernet0/0/0]int gi0/0/2

[Huawei-GigabitEthernet0/0/2]ip addr 192.168.10.1 24
[Huawei]ip route-static 192.168.20.0 24 10.0.23.3
[Huawei]ip route-static 192.168.20.0 24 10.0.12.1 preference 100

AR3配置:

sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en 
Info: Information center is disabled.
[Huawei]int gi 0/0/0
[Huawei-GigabitEthernet0/0/0]ip addr 10.0.13.3 24
[Huawei-GigabitEthernet0/0/0]int gi 0/0/1
[Huawei-GigabitEthernet0/0/1]ip addr 10.0.23.3 24
[Huawei-GigabitEthernet0/0/1]int gi 0/0/2
[Huawei-GigabitEthernet0/0/2]ip addr 192.168.20.1 24
[Huawei]ip route-static 192.168.10.0 24 10.0.23.2
 [Huawei]ip route-static 192.168.10.0 24 10.0.13.1 preference 100

 

AR1配置:

sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]int gi0/0/0
[Huawei-GigabitEthernet0/0/0]ip addr 10.0.12.1 24
[Huawei-GigabitEthernet0/0/0]int gi0/0/1
[Huawei-GigabitEthernet0/0/1]ip addr 10.0.13.1 24
[Huawei]ip route-static 192.168.20.0 24 10.0.13.3
[Huawei]ip route-static 192.168.10.0 24 10.0.12.2

结果:

1、连通性及路径

静态路由应用之浮动静态路由_第2张图片

2、断开AR2-AR3路径后的连通性及路径

AR2

sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int gi 0/0/1
[Huawei-GigabitEthernet0/0/1]shutdown
静态路由应用之浮动静态路由_第3张图片

 

你可能感兴趣的:(实验)