VRRP

拓扑:

SLA   EEM

配置:

VRRP Master:

ip sla monitor 1
type echo protocol ipIcmpEcho 202.1.1.2 source-interface FastEthernet1/0  //追踪ISP1可达性
frequency 5                                                                                                                   //5s发送一次ICMP
ip sla monitor schedule 1 life forever start-time now
!
track 90 rtr 1                                                                                                                  //定义一个TRACK
!
interface FastEthernet0/0
ip address 10.1.1.251 255.255.255.0
ip ospf authentication message-digest
ip ospf authentication-key cisco
duplex auto
speed auto
vrrp 1 ip 10.1.1.254
vrrp 1 timers advertise msec 50
vrrp 1 priority 105
vrrp 1 authentication md5 key-string cisco
vrrp 1 track 90                                                                                                             //调用TRACK
!
interface FastEthernet1/0
ip address 202.1.1.1 255.255.255.252
duplex auto
speed auto
!
!
router ospf 1
log-adjacency-changes
area 0 authentication message-digest
network 10.1.1.251 0.0.0.0 area 0
!
ip route 0.0.0.0 0.0.0.0 202.1.1.2
 

VRRP Backup:

track 90 interface FastEthernet1/0 line-protocol                                                   //TRACK出接口的状态
!                     
interface FastEthernet0/0
ip address 10.1.1.250 255.255.255.0
ip ospf authentication message-digest
ip ospf authentication-key cisco
duplex auto
speed auto
vrrp 1 ip 10.1.1.254
vrrp 1 timers advertise msec 50
vrrp 1 authentication md5 key-string cisco
vrrp 1 track 90                                                                                                              //调用TRACK
!
interface FastEthernet1/0
ip address 64.1.1.1 255.255.255.252
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
area 0 authentication message-digest
network 10.1.1.250 0.0.0.0 area 0
!
ip route 0.0.0.0 0.0.0.0 64.1.1.2

PC:

ip route 0.0.0.0 0.0.0.0 10.1.1.254

测试:

默认情况下

image
 

走的ISP1

image

image

image

image

PC流量切换到ISP2

 

注意:PC两次流量都是走的物理IP地址,并没有走VRRP IP地址。

image

image

image

本文出自 “forest” 博客,转载请与作者联系!

你可能感兴趣的:(border,Alt,target,title,blank)