O'Reilly logo

VRRP: Increasing Reliability and Failover with the Virtual Router Redundance Protocol by Adnan Adam Onart, Ayikudy Srikanth

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

C.13. VRRP State Machine

Initialize

/*********************************************************
 NAME : state_init
*********************************************************/
static void state_init( vrrp_rt *vsrv )
{
   if( vsrv->priority == VRRP_PRIO_OWNER
                || vsrv->wantstate == VRRP_STATE_MAST ){
            state_goto_master( vsrv );
   } else {
            int delay = 3*vsrv->adver_int +
            VRRP_TIMER_SKEW(vsrv);
            VRRP_TIMER_SET( vsrv->ms_down_timer, delay );
            vsrv->state = VRRP_STATE_BACK;
   }
}

This is the initialize state when a physical router participating in VRRP initializes. If the priority configured on the physical router is 255 for the virtual router it is representing, the physical router transitions to master right away by calling state_goto_master(). If the priority ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required