(eNSP)主备接口备份配置
1.实验拓扑
2.基本配置
配置主备接口备份基本功能,当主接口及所在直连链路因故障而无法进行业务传输时,启用备份接口,以提高业务传输的可靠性。
[R1]dis cu
[V200R003C00]
#sysname R1
#
interface GigabitEthernet0/0/0ip address 192.168.10.254 255.255.255.0
#
interface GigabitEthernet2/0/0ip address 10.1.1.1 255.255.255.0 standby interface GigabitEthernet2/0/2 30standby interface GigabitEthernet2/0/1 20standby timer delay 10 10
#
interface GigabitEthernet2/0/1ip address 10.1.2.1 255.255.255.0
#
interface GigabitEthernet2/0/2ip address 10.1.3.1 255.255.255.0
#
ip route-static 192.168.20.0 255.255.255.0 10.1.1.2
ip route-static 192.168.20.0 255.255.255.0 10.1.2.2
ip route-static 192.168.20.0 255.255.255.0 10.1.3.2
#
[R2]dis cu
[V200R003C00]
#sysname R2
#
interface GigabitEthernet0/0/0ip address 192.168.20.254 255.255.255.0
#
interface GigabitEthernet2/0/0ip address 10.1.1.2 255.255.255.0
#
interface GigabitEthernet2/0/1ip address 10.1.2.2 255.255.255.0
#
interface GigabitEthernet2/0/2ip address 10.1.3.2 255.255.255.0
#
ip route-static 192.168.10.0 255.255.255.0 10.1.1.1
ip route-static 192.168.10.0 255.255.255.0 10.1.2.1
ip route-static 192.168.10.0 255.255.255.0 10.1.3.1
#
3.重点配置
[R1-GigabitEthernet2/0/0]di th
[V200R003C00]
#
interface GigabitEthernet2/0/0
ip address 10.1.1.1 255.255.255.0
standby interface GigabitEthernet2/0/2 30
standby interface GigabitEthernet2/0/1 20
standby timer delay 10 10
4.命令格式
standby timer delay命令用来配置主备接口切换延时。
undo standby timer delay命令用来恢复主备接口切换延时为缺省值。
缺省情况下,主备接口切换延时为5秒。
standby timer delay enable-delay disable-delay
undo standby timer delay
enable-delay | 指定主接口切换到备份接口的延时。 | 取值范围是0~65535,单位是秒。缺省延时为5秒。 |
disable-delay | 指定备份接口切换到主接口的延时。 | 取值范围是0~65535,单位是秒。缺省延时为5秒。 |
5.结果验证
此时将G2/0/0shutdown
再次shutdownG2/0/2
此时再次关闭G2/0/1发现,链路完全断开