configuration /
network /
ports
CLI REST-API
add-port
add-port [name] [description]
The "add-port" command can be used to add the definition of a physical network
port to the configuration. Typically this is done automatically when new
ports are added to a system, i.e. by installing an additional network interface
card.
A port will not work until it has been assigned a MAC address of an available network
port (i.e. the MAC address is not used by any already existing port).
RESTAPI: The Json-data will be copied to the new port.
The data can be passed in the body like this:
{
"parameters": {
"name": "lan0"
}
}
Name | Value | Description | Example |
---|
| name | | lan0 |
| description | | lan0 |
See also:
/configuration/network/ports: Physical Network Configuration
/configuration/network/ports/delete-port: removes a network port definition from the system's
REST-API Support:
This command is supported by the REST API:
Method: POST
URL: /api/configuration/network/ports/add-port
Body:
{
"parameters": {
"name": [name]
}
}
Example using curl:
curl -X POST /api/configuration/network/ports/add-port -d
"{
\"parameters\": {
\"name\": \"lan0\"
}
}"