浮动路由实现
R1配置:
[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.1.1 255.255.255.0
!
interface Ethernet1
!
interface Serial0
link-protocol ppp
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
!
voice-setup
!
subscriber-line 0
!
subscriber-line 1
!
quit
!
quit
ip route-static 192.168.4.0 255.255.255.0 192.168.2.2 preference 30
ip route-static 192.168.4.0 255.255.255.0 192.168.3.2 preference 60
!
return
R1路由:
R2配置:
[R2]dis cu
Now create configuration...
Current configuration
!
version 1.74
sysname R2
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 Serial0
clock DTECLK1
link-protocol ppp
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
!
quit
ip route-static 192.168.1.0 255.255.255.0 192.168.2.1 preference 30
ip route-static 192.168.1.0 255.255.255.0 192.168.3.1 preference 60
!
return
R2路由:
从PC1上追踪路由到PC2
断掉2.0网段之后查看R1的路由表
再次从PC1上追踪路由到PC2
备份接口实现
未配置备份端口的R1配置:
[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.1.1 255.255.255.0
ospf enable area 0.0.0.0
!
interface Ethernet1
!
interface Serial0
link-protocol ppp
standby interface Serial 1
ip address 192.168.2.1 255.255.255.0
ospf enable area 0.0.0.0
!
interface Serial1
link-protocol ppp
ip address 192.168.3.1 255.255.255.0
ospf enable area 0.0.0.0
!
voice-setup
!
subscriber-line 0
!
subscriber-line 1
!
quit
!
quit
ospf enable
!
quit
!
Return
R1路由表:
R1端口状态:
R2的配置
[R2]dis cu
Now create configuration...
Current configuration
!
version 1.74
sysname R2
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
ospf enable area 0.0.0.0
!
interface Serial0
clock DTECLK1
link-protocol ppp
standby interface Serial 1
ip address 192.168.2.2 255.255.255.0
ospf enable area 0.0.0.0
!
interface Serial1
clock DTECLK1
link-protocol ppp
ip address 192.168.3.2 255.255.255.0
ospf enable area 0.0.0.0
!
quit
ospf enable
!
quit
!
return
R2路由表:
R2端口状态:
从PC1上追踪路由到主机PC2
当掉R1上的s0端口
端口信息切换过程
R1路由表:
R2路由表:
再次从PC1上追踪路由到主机PC2
虚拟模板链路实现
R1配置:
[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.1.1 255.255.255.0
!
interface Ethernet1
!
interface Serial0
link-protocol ppp
ppp mp
ppp mp interface Virtual-Template1
shutdown
!
interface Serial1
link-protocol ppp
ppp mp
ppp mp interface Virtual-Template1
!
interface Virtual-Template1
link-protocol ppp
ip address 192.168.2.1 255.255.255.0
!
voice-setup
!
subscriber-line 0
!
subscriber-line 1
!
quit
!
quit
ip route-static 0.0.0.0 0.0.0.0 192.168.2.2 preference 60
!
return
R1路由:
R2配置:
[R2]dis cu
Now create configuration...
Current configuration
!
version 1.74
sysname R2
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 Serial0
clock DTECLK1
link-protocol ppp
ppp mp
ppp mp interface Virtual-Template1
!
interface Serial1
clock DTECLK1
link-protocol ppp
ppp mp
ppp mp interface Virtual-Template1
!
interface Virtual-Template1
link-protocol ppp
ip address 192.168.2.2 255.255.255.0
!
quit
ip route-static 0.0.0.0 0.0.0.0 192.168.2.1 preference 60
!
return
R2路由:
测试:为断开R1上s0端口
从PC1上ping主机PC2
断开R2上s0或者s1之间的端口测试从PC2上ping主机PC1: