configuration / network / interfaces

CLI REST-API

add-interface

add-interface [vif-id] [port-id]
The "add-interface" command adds another virtual interface to the system. Virtual
interfaces can be assigned to an individual VLAN and they are used to configure
IPv4 and IPv6 addresses. Each virtual interface has to be assigned to a
physical network port on the system. Please note that if you assign the virtual
interface to a network port that is part of a bonding group or PRP team, the
system automatically sets up the IP addresses of the interface on all ports of
the bonding/LACP/PRP group.

In order to assign and configure a new virtual interface after you created it with
"add-interface", you have to edit the configuration parameters in the
/configuration/network/interfaces/[name of virtual interface]/ menu. For example,
assigning the virtual interface 10 to network port lan0 requires the following command:

"/configuration/network/interfaces/vif10/misc/assigned-port lan0"

RESTAPI: The Json-data will be copied to the new interface.
The data can be passed in the body like this:
{
    "parameters": {
        "vif-id": "vif0"
    }
}
NameValueDescriptionExample
vif-idvif0
port-idlan0
See also:
/configuration/network/interfaces: Configue existing Interfaces
/configuration/network/interfaces/delete-interface: delete a virtual interfaces definition from the system configuration

REST-API Support:


This command is supported by the REST API:

Method: POST
URL: /api/configuration/network/interfaces/add-interface
Body:
{
    "parameters": {
        "vif-id": [vif-id]
    }
}

Example using curl:
curl -X POST /api/configuration/network/interfaces/add-interface -d 
"{
    \"parameters\": {
        \"vif-id\": \"vif0\"
    }
}"