cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
625
Views
0
Helpful
8
Replies

PBR with VRRP Status

TRACY HARTMANN
Level 1
Level 1

I am trying to add a route if a site goes into backup.  Is there a way to watch the vrrp status on the device and if it goes to master add route?

 

 

8 Replies 8

Hello

Yes you can utilizing EEM (embedded event manager)
Obviously swap the interfaces in the actual syslog message to accommodate your setup

event manager applet VRRP-Backup
event syslog pattern "%VRRP-6-STATECHANGE: Fa0/0 Grp 1 state Master -> Backup"
action 5.0 cli command "enable"
action 5.1 cli command "config t"
action 5.2 cli command " ip route x.x.x.x y.y.y.y z.z.z.z"
 action 5.3 cli command "end"

conf t


event manager applet VRRP-Master
event syslog pattern "%VRRP-6-STATECHANGE: Fa0/0 Grp 1 state Backup -> Master"
action 6.0 cli command "enable"
action 6.1 cli command "config t"
 action 6.2 cli command "no ip route x.x.x.x y.y.y.y z.z.z.z"
 action 6.3 cli command "end"

res

Paul


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Thanks I will try that, however is there a way to add the network to EIGRP if it is in a Master state?

Hello

yes just inclement the cli action to accommodate eigrp inclusion 

 

Ex:  action 5.x cli command “ router eigrp xx

 

action 5.x cli command “ network x.x.x.x”

action 5.x cli command “exit”

 

etc...

 

res

paul


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

I added the action items you listed.  Do I have to add them to an interface or are those the only commands?  Sorry I haven't used these commands before.

Hello

Yes just add those two applets but obvuisouly suppliment it with the correct static route addressing.

 

res

Paul 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Tried it this morning and it didn't work.  The log is below and my config is below it

 

Jun 19 05:50:39: %VRRP-6-STATECHANGE: Gi0/0/0 Grp 1 state Backup -> Master
Jun 19 05:51:03: %VRRP-6-STATECHANGE: Gi0/0/0 Grp 1 state Master -> Backup
Jun 19 05:52:18: %VRRP-6-STATECHANGE: Gi0/0/0 Grp 1 state Backup -> Master

event manager applet VRRP-Master
event syslog pattern "%%VRRP-6-STATECHANGE: Gi0/0/0 Grp 1 state Backup -> Master"
action 6.0 cli command "enable"
action 6.1 cli command "config t"
action 6.2 cli command "network XXX.XXX.XXX 0.0.0.3"
action 6.3 cli command "end"
event manager applet VRRP-Backup
event syslog pattern "%%VRRP-6-STATECHANGE: Gi0/0/0 Grp 1 state Master -> Backup"
action 5.0 cli command "enable"
action 5.1 cli command "config t"
action 5.2 cli command "no network XXX.XXX.XXX 0.0.0.3"
action 5.3 cli command "end"

 

I never seen anything that would have said it tried to add the network while in master status

 

You need to go into router configuration  mode for EIGRP ie.  after "config t" you need a "router eigrp <AS no>" before you add the network statement.

 

Jon

 

Hello

Okay just noticed through Jons post that your trying to add to the eigrp not a static route, That where the confusion lies for me, In fact i did see I have added the config for the network addition into eigrp process but it wasn't that clear - So apologies.

 

Lastly i have also tweaked the syslog pattern to see if that helps but NOTE; the interface and group number (Fa0/0 Grp 1) will need to be change to accommodate your physical interfaces that vrrp is applied to and the group number of vrrp?

 

 

in my case it was this:
interface FastEthernet0/0
vrrp 1

 

I have attach two possible EEM scripts, use either.

            static route
event manager applet VRRP-Backup
event syslog pattern "%VRRP-6-STATECHANGE: Fa0/0 Grp 1 state Master -> Init"
action 5.0 cli command "enable"
action 5.1 cli command "config t"
action 5.2 cli command "ip route 1.1.1.1 255.255.255.255 null 0"
 action 5.3 cli command "end"

event manager applet VRRP-Master
event syslog pattern "%VRRP-6-STATECHANGE: Fa0/0 Grp 1 state Init -> Backup"
action 6.0 cli command "enable"
action 6.1 cli command "config t"
 action 6.2 cli command "no ip route 1.1.1.1 255.255.255.255 null 0"
 action 6.3 cli command "end"



            eigrp process
event manager applet VRRP-Backup
event syslog pattern "%VRRP-6-STATECHANGE: Fa0/0 Grp 1 state Master -> Init"
action 5.0 cli command "enable"
action 5.1 cli command "config t"
action 5.2 cli command "router eigrp xxx"
action 5.3 cli command "network x.x.x.x 0.0.0.0"
action 5.4 cli command "end"

event manager applet VRRP-Master
event syslog pattern "%VRRP-6-STATECHANGE: Fa0/0 Grp 1 state Init -> Backup"
action 6.0 cli command "enable"
action 6.1 cli command "config t"
action 6.2 cli command "router eigrp xxx"
action 6.3 cli command "no network x.x.x.x 0.0.0.0"
action 6.4 cli command "end"


res

Paul


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul
Review Cisco Networking products for a $25 gift card