System Administration Commands vrrpadm(1M) NAME vrrpadm - VRRP administration tool SYNOPSIS vrrpadm create -v vrid -i intf [-j primary_ipaddr] -A assoc_ipaddrs [-p priority] [-d adv_interval] [-o flags] [-P protected_service[,...]] vinst_name vrrpadm delete vinst_name vrrpadm startup vinst_name vrrpadm shutdown vinst_name vrrpadm modify [-p priority] [-d adv_interval] [-o flags] vinst_name vrrpadm show [-p] [-o field[,...]] [vinst_name] DESCRIPTION The vrrpadm command is used to administer the VRRP service in the system. Each vrrpadm subcommand operates on a VRRP instance. A VRRP instance is an abstraction of the VRRP protocol that runs on one VRRP router that belongs to a VRRP virtual router. A system can have multiple VRRP instances, in which case it belongs to more than one VRRP virtual routers. A VRRP instance is uniquely identified by a three-tuple: (VRID, interface, address family), where VRID is a unique ID to identify the corresponding Virtual Router. For simplity, the vrrpadm subcommands use a name, instead of the three-tuple, to identify the VRRP instance on which the operation will be performed. So, when the VRRP instance is created, both the three-tuple and the instance name must be specified, and all following operations simply use that instance name. SUBCOMMANDS The following subcommands are supported. Note, most subcommands (create, delete, startup, shutdown, modify) require the PRIV_SYS_NET_CONFIG and PRIV_NET_RAWACCESS privileges to operate; the show command doesn't require extra privileges. vrrpadm create -v vrid -i intf [-j primary_ipaddr] -A assoc_ipaddrs [-p priority] [-d adv_interval] [-o flags] [-P protected_services[,...]] vinst_name Create a VRRP instance with the specified attributes, and assign it an instance name. -v vrid The VRID that uniquely identifies the corresponding Virtual Router. -i intf The interface on which the VRRP instance will be running. -j primary_ipaddr The primary IP address of the VRRP instance. If not specified, it will be selected from the IP addresses that are already configured on 'intf'. Note, among the three-tuple that uniquely identify the VRRP instance, VRID and interface must be specified with '-v' and '-i'. The address family is not explicitly specified in the command line; it is derived from primary_ipaddr. -A assoc_ipaddrs The IP addresses associated with the VRRP instance. They are the IP addresses to be protected by this VRRP instance. Multiple entries are delimited with commas. -p priority The priority of this VRRP instance. The default value of 1 is used if not specified. -d adv_interval The advertisement interval. The default value of 1 is used if not specified. -o flags The preempt and accept modes, delimited by a comma. Values can be: preempt, un_preempt, accept, not_accept. By default both are set to true. Example: -o preempt,not_accept. -P protected_service[,...] The SMF services to be protected by this VRRP instance, delimited by commas. When any of service is brought offline, the VRRP instance will receive a SHUTDOWN event to enter the INIT state; when all the services are brought online, the VRRP instance will receive a STARTUP event to resume operation. Note, this option is needed only when the services are provided by applications. Services provided by the kernel, such as the forwarding service or the load balancing service, don't need this option. vinst_name The name of this VRRP instance. This name will be used to identify this VRRP instance in the other commands. vrrpadm delete vinst_name Delete the VRRP instance identified by vinst_name. vrrpadm startup vinst_name Send a STARTUP event to the VRRP instance identified by vinst_name. On receiving this event, the VRRP instance, if in the INITIALIZE state, will leave the INITIALIZE state and eventually enter either BACKUP or MASTER state. vrrpadm shutdown vinst_name Send a SHUTDOWN event to the VRRP instance identified by vinst_name. On receiving this event, the VRRP instance, if in BACKUP or MASTER state, will enter the INITIALIZE state, which is actually a "paused" state. vrrpadm modify [-p priority] [-d adv_interval] [-o flags] vinst_name Modify the properties of the VRRP instance identified by vinst_name. Only the priority, the advertisement interval, the preempt mode and the accept mode can be modified. Other properties such as VRID or interfaces are considered 'fatal' and are not allowed to be modified. -p priority The new priority of this VRRP instance. -d adv_interval The new advertisement interval. -o flags The new preempt and/or accept modes. Either one or both can be specified. If both are specified, they are delimited by a comma. Example: -o preempt,not_accept vrrpadm show [-p] [-o field[,...]] [vinst_name] Display the information of the VRRP instance identified by vinst_name. This name can be omitted; in this case all VRRP instances in the system will be displayed. -p The machine parsable mode. Must be used together with "-o". The values in the output are separated by colons. -o field[,...] The fields whose values will be displayed. Applies to both machine parsable and human readable formats. By default the human readable format is used. Example: human readable (the default format). Note the content from "state" is different for different states. $ vrrpadm show vinst4 INSTANCE vinst4 vrid = 4 priority = 100 adv_intval = 2 preempt_mode = true accept_mode = false interface = bge2 primary_ipaddr = 10.100.77.77 assoc_ipaddrs = 10.100.77.88,10.100.77.99 protected_service = svc:/network/http:apache2 prev_state = INIT time_last_state_trans = 2008.03.12,16:34:08.323 (10.323 secs ago) state = BACK master_priority = 255 master_src_addr = 10.100.77.78 master_adv_intval = 1.00 master_adv_last = 2008.03.12,16:44:08.323 (0.323 seconds ago) skew_time = 0.391 master_down_intval = 3.391 master_down_timer = 3.068 For the MASTER state, the names of the fields begin with 'peer_' instead of 'backup_'. Some fields (skew_time, master_down_intval, master_down_timer) don't apply to this state and are thus not displayed. state = BACK peer_priority = 255 peer_src_addr = 10.100.77.78 peer_adv_intval = 1.00 peer_adv_last = 2008.03.12,16:44:08.323 (0.323 seconds ago) For the INIT state, it doesn't has specific data: state = INIT Example: human reabable format, with selected fields. $ vrrpadm show -o vrid,interface,primary_ipaddr,state vinst4 INSTANCE vinst4 vrid = 4 interface = bge2 primary_ipaddr = 10.100.77.77 state = BACK Example: machine parsable output, with selected fields. $ vrrpadm show -p -o name,vrid,interface,primary_ipaddr,state vinst4:4:bge2:10.100.77.77:BACK vinst13:13:nge1:192.168.3.3:MAST SEE ALSO vrrpd(1M), libvrrp(3LIB)