Get VRRP Interfaces

Obtains list of VRRP interfaces.

URL

/api/v1/interface/virtual

HTTP Method

GET

URL Parameters

none

Response Parameters

Returns a JSON structure containing zero or more vrrp_details objects

vrrp_details

Parameter

Type

Description

advskew

string containing integer

The VRRP advertising skew.

priority is an abstraction of this value, and adheres to the following relation:

advskew = 254 - priority

alias

array of strings containing IP addresses

List of IP aliases associated with this VRRP interface

carppeer

string containing IP address

The IP address of the other node in the cluster to sync with.

if

string containing network interface

The physical network interface that the VRRP interface is bound to

netmask

string containing netmask

The netmask of the VRRP interface

priority

string containing integer

The priority of the interface in the VRRP group.

This is an abstraction of the advskew value, and adheres to the following relation:

advskew = 254 - priority

state_current

string

State of the VRRP interface, which can be either "MASTER" or "BACKUP"

type

string containing integer

The type of the VRRP interface

"1" → FAILOVER MASTER
"2" → FAILOVER BACKUP

vhid

string containing integer

The virtual host identifier number of the VRRP group

vip

string containing IP address

The virtual IP address shared by the nodes of the cluster

Example: Get VRRP interfaces

Request

GET

/api/v1/interface/virtual

cURL

curl -kv
-u api_ninja:ninja_password
-X GET
https://172.31.1.172:4849/api/v1/interface/virtual

Response

{
    "carp0": {
        "advskew": "50",
        "alias": [
            "123.123.123.1",
            "123.123.123.2",
            "123.123.123.3",
            "123.123.123.4",
            "123.123.123.5",
            "123.123.123.6",
            "123.123.123.7",
            "123.123.123.8",
            "123.123.123.9",
            "123.123.123.10",
            "123.123.123.11",
            "123.123.123.12",
            "123.123.123.13",
            "123.123.123.14",
            "123.123.123.15",
            "123.123.123.16",
            "123.123.123.17",
            "123.123.123.18",
            "123.123.123.19"
        ],
        "carppeer": "224.0.0.18",
        "if": "eth1",
        "netmask": "255.255.255.0",
        "priority": "204",
        "state_current": "MASTER",
        "type": "1",
        "vhid": "2",
        "vip": "123.123.123.123"
    },
    "carp1": {
        "advskew": "100",
        "alias": [],
        "carppeer": "224.0.0.18",
        "if": "eth1",
        "netmask": "255.255.255.0",
        "priority": "154",
        "state_current": "BACKUP",
        "type": "2",
        "vhid": "4",
        "vip": "221.221.221.221"
    }
}