静态路由典型配置 |
您所在的位置:网站首页 › 汇总路由怎么配置 › 静态路由典型配置 |
验证配置结果
# 配置完成后,在SwitchA和SwitchB上执行display efm session all命令,可以看到EFM会话已经建立,且状态为detect,即接口处于握手状态,SwitchA上的显示为例。 [SwitchA] display efm session all Interface EFM State Loopback Timeout ---------------------------------------------------------------------- GigabitEthernet1/0/1 detect --# 在SwitchA查看IP路由表,静态路由存在于路由表中。 [SwitchA] display ip routing-table Route Flags: R - relay, D - download to fib, T - to vpn-instance ------------------------------------------------------------------------------ Routing Tables: Public Destinations : 5 Routes : 5 Destination/Mask Proto Pre Cost Flags NextHop Interface 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 192.168.1.0/24 Direct 0 0 D 192.168.1.1 Vlanif10 192.168.1.1/32 Direct 0 0 D 127.0.0.1 Vlanif10 192.168.2.0/24 Static 60 0 RD 192.168.1.2 Vlanif10# 在SwitchB接口GigabitEthernet1/0/1视图下执行undo efm enable命令模拟链路故障。 [SwitchB] interface gigabitethernet 1/0/1 [SwitchB-GigabitEthernet1/0/1] undo efm enable# 在SwitchA上执行display efm session all命令,可以看到EFM OAM协议状态为discovery,即接口处于对端发现状态。 [SwitchA] display efm session all Interface EFM State Loopback Timeout ---------------------------------------------------------------------- GigabitEthernet1/0/1 discovery --# 查看SwitchA的路由表,发现静态路由192.168.2.0/24也不存在了。因为静态路由绑定了efm-state,当EFM OAM检测到链路故障后,就会迅速通知所绑定的静态路由不可用。 [SwitchA] display ip routing-table Route Flags: R - relay, D - download to fib, T - to vpn-instance ------------------------------------------------------------------------------ Routing Tables: Public Destinations : 4 Routes : 4 Destination/Mask Proto Pre Cost Flags NextHop Interface 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 192.168.1.0/24 Direct 0 0 D 192.168.1.1 Vlanif10 192.168.1.1/32 Direct 0 0 D 127.0.0.1 Vlanif10# 在SwitchB接口GigabitEthernet1/0/1视图下执行efm enable命令模拟链路恢复正常。 [SwitchB-GigabitEthernet1/0/1]efm enable# 在SwitchA上执行display efm session all命令,可以看到EFM OAM协议状态恢复为detect,即接口处于握手状态。 [SwitchA] display efm session all Interface EFM State Loopback Timeout ---------------------------------------------------------------------- GigabitEthernet1/0/1 detect --# 查看SwitchA的路由表,发现静态路由192.168.2.0/24重新出现在路由表中。因为当EFM OAM检测到链路恢复正常后,就会迅速通知所绑定的静态路由重新生效。 [SwitchA] display ip routing-table Route Flags: R - relay, D - download to fib, T - to vpn-instance ------------------------------------------------------------------------------ Routing Tables: Public Destinations : 5 Routes : 5 Destination/Mask Proto Pre Cost Flags NextHop Interface 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 192.168.1.0/24 Direct 0 0 D 192.168.1.1 Vlanif10 192.168.1.1/32 Direct 0 0 D 127.0.0.1 Vlanif10 192.168.2.0/24 Static 60 0 RD 192.168.1.2 Vlanif10 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |