2、方案standby interface:

R 1的配置:
R1]int s0
[R1-Serial0]ip add 192.168.2.2 24 给端口配置ip地址
[R1-Serial0]int s1
[R1-Serial1]ip add 192.168.3.2 24
[R1-Serial1]int eth 0
[R1-Ethernet0]ip add 192.168.4.1 24
[R1-Ethernet0]quit
[R1]ip route 192.168.1.0 24 192.168.3.1 配置主链路上的静态路由,
[R1]ip route 192.168.1.0 24 192.168.2.1 配置辅助链路上的静态路由
[R1]int s0 进入s0 端口,说名这个是骨干链路
[R1-Serial0]standby int s1 配置备份接口
[R1-Serial0]standby timer enable-delay 10 骨干链路断开,进入备份链路的延迟是10秒
[R1-Serial0]standby timer disable-delay 10 如果干路恢复,10s后从备份链路切换到干路
[R1-Serial0]quit
[R1]dis cu 查看配置的信息
Now create configuration...
Current configuration
!
version 1.74
sysname R1
firewall enable
aaa-enable
aaa accounting-scheme optional
!
interface Aux0
async mode flow
link-protocol ppp
!
interface Ethernet0
ip address 192.168.4.1 255.255.255.0
!
interface Ethernet1
!
interface Serial0
link-protocol ppp
standby interface Serial 1
standby timer enable-delay 10
standby timer disable-delay 10
ip address 192.168.2.2 255.255.255.0
!
interface Serial1
clock DTECLK1
link-protocol ppp
ip address 192.168.3.2 255.255.255.0
!
interface Async0
physical-mode async
async mode protocol
link-protocol ppp
!
interface Async1
physical-mode async
async mode protocol
link-protocol ppp
quit
ip route-static 192.168.1.0 255.255.255.0 192.168.3.1 preference 60
ip route-static 192.168.1.0 255.255.255.0 192.168.2.1 preference 60
!
return
R 0的配置:
[R0]int s0
[R0-Serial0]ip add 192.168.2.1 24 给s0端口配置ip
[R0-Serial0]int s1 进入广域网链路接口
[R0-Serial1]ip add 192.168.3.1 24 给s1端口配置ip
[R0-Serial1]int eth 0
[R0-Ethernet0]ip add 192.168.1.1 24 给eth0端口配置ip
[R0-Ethernet0]quit
[R0]ip route 192.168.4.0 24 192.168.3.2 配置3.0网段的静态路由
[R0]ip route 192.168.4.0 24 192.168.2.2 配置2.0网段的静态路由
[R0]int s0 进入骨干链路接口
[R0-Serial0]standby int s1 配置备份链路
[R0-Serial0]standby time enable 10 骨干链路断开,进入备份链路的延迟是10秒
[R0-Serial0]standby time disable 10 骨干链路恢复正常时,进入干路延迟是10秒
[R0-Serial0]dis cu
Now create configuration...
Current configuration
!
version 1.74
local-user user1 service-type administrator password simple 123
sysname R0
firewall enable
aaa-enable
aaa accounting-scheme optional
!
interface Aux0
async mode flow
link-protocol ppp
!
interface Ethernet0
ip address 192.168.1.1 255.255.255.0
!
interface Ethernet1
!
interface Serial0
clock DTECLK1
link-protocol ppp
standby interface Serial 1
standby timer enable-delay 10
standby timer disable-delay 10
ip address 192.168.2.1 255.255.255.0
!
interface Serial1
link-protocol ppp
ip address 192.168.3.1 255.255.255.0
!
quit
ip route-static 192.168.4.0 255.255.255.0 192.168.3.2 preference 60
ip route-static 192.168.4.0 255.255.255.0 192.168.2.2 preference 60
!
Return
配置完毕,查看其通信情况

追踪路径信息:

当把R1上颚s0断开时,看其状态:



再把R1上s0断开打开:

再看其追踪的路径:
又改成走主路径了:

