Forum Discussion

Shawn_Higgin_84's avatar
Shawn_Higgin_84
Icon for Nimbostratus rankNimbostratus
Dec 28, 2005

How to disable all traffic on bigip

Hi,

 

 

I have been asked to come up with a way from command line to disable all load balanced traffic on a bigip for an emergency "restart" of the site. Is there a way via icontrol to disable ALL VIPs with one command? Of course this user would need admin access.

 

 

Any information/suggestions would be greatly appreciated.

 

 

Thanks,

 

 

Shawn

1 Reply

  • Not quite one command, but you could do it with two method calls.

     

     

    If you want to disable all virtual servers, then you could use the LocalLB::VirtualServer::set_enabled_state() method passing in a list of all virtual servers returned from the LocalLB::VirtualServer::get_list() command.

     

     

    pseudo code would look something like this (actual code will vary depending on your chosen language).

     

     

    string [] vs_list = LocalLB::VirtualServer::get_list();
    EnabledState [] state_list = new EnabledState[vs_list.Length];
    for(int i=0; i{
      state_list[ i ] = "STATE_DISABLED";
    }
    LocalLB::VirtualServer::set_enabled_state(vs_list, state_list);

     

     

    To re-enable the virtuals, change the states to "STATE_ENABLED".

     

     

    -Joe