Skip to main content

Create a new VLAN or LAG

Contributors

POST /network/ethernet/ports

Introduced In: 9.6

Creates a new VLAN (such as node1:e0a-100) or LAG (ifgrp, such as node2:a0a).

Required properties

  • node - Node the port will be created on.

  • vlan - This field cannot be specified at the same time as lag.

    • vlan.base_port - Physical port or LAG the VLAN will be created on.

    • vlan.tag - Tag used to identify VLAN on the base port.

  • lag - This field cannot be specified at the same time as vlan.

    • lag.mode - Policy for the LAG that will be created.

    • lag.distribution_policy - Indicates how the packets are distributed between ports.

    • lag.member_ports - Set of ports the LAG consists of.

Optional properties

  • type - Defines if a VLAN or LAG will be created:

  • broadcast_domain - The layer-2 broadcast domain the port is associated with. The port will be placed in a broadcast domain if it is not specified. It may take several minutes for the broadcast domain to be assigned. During that period the port cannot host interfaces.

  • network port ifgrp create

  • network port vlan create

Parameters

Name Type In Required Description

return_records

boolean

query

False

The default is false. If set to true, the records are returned.

  • Default value:

Request Body

Name Type Description

_links

_links

broadcast_domain

broadcast_domain

Broadcast domain UUID along with a readable name. Either the UUID or both names may be provided on input.

discovered_devices

array[discovered_devices]

Discovered devices

enabled

boolean

interface_count

integer

Number of interfaces hosted. This field is only applicable for cluster administrators. No value is returned for SVM administrators. If the node hosting a port is not healthy no value will be returned.

lag

lag

mac_address

string

metric

metric

The most recent sample of I/O metrics for the port.

mtu

integer

MTU of the port in bytes. Set by broadcast domain.

name

string

Portname, such as e0a, e1b-100 (VLAN on Ethernet), a0c (LAG/ifgrp), a0d-200 (VLAN on LAG/ifgrp), e0a.pv1 (p-VLAN, in select environments only)

node

node

rdma_protocols

array[string]

Supported RDMA offload protocols

reachability

string

Reachability status of the port. Enum value "ok" is the only acceptable value for a PATCH request to repair a port.

reachable_broadcast_domains

array[reachable_broadcast_domains]

Reachable broadcast domains.

speed

integer

Link speed in Mbps

state

string

Operational state of the port. The state is set to 'down' if the operational state of the port is down. The state is set to 'up' if the link state of the port is up and the port is healthy. The state is set to 'up' if the link state of the port is up and configured to ignore health status. The state is 'degraded' if the link state of the port is up, and the port is not healthy.

statistics

statistics

The real time I/O statistics for the port.

type

string

Type of physical or virtual port

uuid

string

Port UUID

vlan

vlan

Example request
{
  "_links": {
    "self": {
      "href": "/api/resourcelink"
    }
  },
  "broadcast_domain": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "ipspace": {
      "name": "ipspace1"
    },
    "name": "bd1",
    "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
  },
  "discovered_devices": [
    {
      "capabilities": [
        "router",
        "switch"
      ],
      "chassis_id": "string",
      "ip_addresses": [
        "192.168.100.24",
        "192.168.100.26"
      ],
      "name": "ETY-R1S4-510Q13.datacenter.example.com",
      "platform": "93180YC-EX",
      "protocol": "cdp",
      "remote_port": "FastEthernet0/12",
      "system_name": "string",
      "version": "Cisco Nexus Operating System (NX-OS) Software, Version 8.1"
    }
  ],
  "interface_count": 0,
  "lag": {
    "active_ports": [
      {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "name": "e1b",
        "node": {
          "name": "node1"
        },
        "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
      }
    ],
    "distribution_policy": "string",
    "member_ports": [
      {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "name": "e1b",
        "node": {
          "name": "node1"
        },
        "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
      }
    ],
    "mode": "string"
  },
  "mac_address": "01:02:03:04:05:06",
  "metric": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "duration": "PT15S",
    "status": "ok",
    "throughput": {
      "read": 200,
      "total": 1000,
      "write": 100
    },
    "timestamp": "2017-01-25 06:20:13 -0500"
  },
  "mtu": 1500,
  "name": "e1b",
  "node": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "name": "node1",
    "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
  },
  "rdma_protocols": [
    "roce"
  ],
  "reachability": "ok",
  "reachable_broadcast_domains": [
    {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "ipspace": {
        "name": "ipspace1"
      },
      "name": "bd1",
      "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
    }
  ],
  "speed": 1000,
  "state": "string",
  "statistics": {
    "device": {
      "link_down_count_raw": 3,
      "receive_raw": {
        "discards": 100,
        "errors": 200,
        "packets": 500
      },
      "timestamp": "2017-01-25 06:20:13 -0500",
      "transmit_raw": {
        "discards": 100,
        "errors": 200,
        "packets": 500
      }
    },
    "status": "ok",
    "throughput_raw": {
      "read": 200,
      "total": 1000,
      "write": 100
    },
    "timestamp": "2017-01-25 06:20:13 -0500"
  },
  "type": "string",
  "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412",
  "vlan": {
    "base_port": {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "name": "e1b",
      "node": {
        "name": "node1"
      },
      "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
    },
    "tag": 100
  }
}

Response

Status: 201, Created
Name Type Description

_links

_links

num_records

integer

Number of records

records

array[port]

Example response
{
  "_links": {
    "next": {
      "href": "/api/resourcelink"
    },
    "self": {
      "href": "/api/resourcelink"
    }
  },
  "num_records": 1,
  "records": [
    {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "broadcast_domain": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "ipspace": {
          "name": "ipspace1"
        },
        "name": "bd1",
        "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
      },
      "discovered_devices": [
        {
          "capabilities": [
            "router",
            "switch"
          ],
          "chassis_id": "string",
          "ip_addresses": [
            "192.168.100.24",
            "192.168.100.26"
          ],
          "name": "ETY-R1S4-510Q13.datacenter.example.com",
          "platform": "93180YC-EX",
          "protocol": "cdp",
          "remote_port": "FastEthernet0/12",
          "system_name": "string",
          "version": "Cisco Nexus Operating System (NX-OS) Software, Version 8.1"
        }
      ],
      "interface_count": 0,
      "lag": {
        "active_ports": [
          {
            "_links": {
              "self": {
                "href": "/api/resourcelink"
              }
            },
            "name": "e1b",
            "node": {
              "name": "node1"
            },
            "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
          }
        ],
        "distribution_policy": "string",
        "member_ports": [
          {
            "_links": {
              "self": {
                "href": "/api/resourcelink"
              }
            },
            "name": "e1b",
            "node": {
              "name": "node1"
            },
            "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
          }
        ],
        "mode": "string"
      },
      "mac_address": "01:02:03:04:05:06",
      "metric": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "duration": "PT15S",
        "status": "ok",
        "throughput": {
          "read": 200,
          "total": 1000,
          "write": 100
        },
        "timestamp": "2017-01-25 06:20:13 -0500"
      },
      "mtu": 1500,
      "name": "e1b",
      "node": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "name": "node1",
        "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
      },
      "rdma_protocols": [
        "roce"
      ],
      "reachability": "ok",
      "reachable_broadcast_domains": [
        {
          "_links": {
            "self": {
              "href": "/api/resourcelink"
            }
          },
          "ipspace": {
            "name": "ipspace1"
          },
          "name": "bd1",
          "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
        }
      ],
      "speed": 1000,
      "state": "string",
      "statistics": {
        "device": {
          "link_down_count_raw": 3,
          "receive_raw": {
            "discards": 100,
            "errors": 200,
            "packets": 500
          },
          "timestamp": "2017-01-25 06:20:13 -0500",
          "transmit_raw": {
            "discards": 100,
            "errors": 200,
            "packets": 500
          }
        },
        "status": "ok",
        "throughput_raw": {
          "read": 200,
          "total": 1000,
          "write": 100
        },
        "timestamp": "2017-01-25 06:20:13 -0500"
      },
      "type": "string",
      "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412",
      "vlan": {
        "base_port": {
          "_links": {
            "self": {
              "href": "/api/resourcelink"
            }
          },
          "name": "e1b",
          "node": {
            "name": "node1"
          },
          "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
        },
        "tag": 100
      }
    }
  ]
}

Headers

Name Description Type

Location

Useful for tracking the resource location

string

Error

Status: Default

ONTAP Error Response Codes

Error Code Description

1376361

Port is already a member of a LAG.

1376857

Cannot create a VLAN on a port that is a member of a LAG.

1377609

The update is partially complete. Updating broadcast domain attributes on this port has failed.

1966189

Port is the home port or current port of an interface.

1966466

VLAN ID must be a number from 1 to 4094.

1967083

The specified type is not valid.

1967084

The specified node UUID is not valid.

1967085

The specified node name is not valid.

1967086

Node name and UUID must match if both are provided.

1967087

The specified broadcast domain UUID is not valid.

1967088

The specified broadcast domain name does not exist in the specified IPspace.

1967089

The specified broadcast domain UUID, name, and IPspace name do not match.

1967090

The specified VLAN base port UUID is not valid.

1967091

The specified VLAN base port name and node name are not valid.

1967092

The specified node does not match the node specified for the VLAN base port.

1967093

The specified VLAN base port UUID, name, and VLAN base port node name do not match.

1967094

The specified LAG member port UUID is not valid.

1967095

The specified LAG member port name and node name combination is not valid.

1967096

The specified node does not match the specified LAG member port node.

1967097

The specified LAG member ports UUID, name, and node name do not match.

1967098

VLAN POST operation has failed because admin status could not be set for the specified port.

1967099

Partial success of the VLAN POST operation. Verify the state of the created VLAN for more information.

1967100

LAG POST operation failed because admin status could not be set.

1967101

Partial success of the LAG POST operation. Verify the state of the created LAG for more information.

1967102

POST operation might have left the configuration in an inconsistent state. Check the configuration.

1967148

Failure to remove port from broadcast domain.

1967149

Failure to add port to broadcast domain.

1967175

VLANs cannot be created on ports in the Cluster IPspace.

1967190

Missing or incomplete VLAN specification.

1967191

Missing or incomplete lag specification.

Also see the table of common errors in the Response body overview section of this documentation.

Name Type Description

error

returned_error

Example error
{
  "error": {
    "arguments": [
      {
        "code": "string",
        "message": "string"
      }
    ],
    "code": "4",
    "message": "entry doesn't exist",
    "target": "uuid"
  }
}

Definitions

See Definitions

href

Name Type Description

href

string

Name Type Description

self

href

ipspace

Name Type Description

name

string

Name of the broadcast domain's IPspace

broadcast_domain

Broadcast domain UUID along with a readable name. Either the UUID or both names may be provided on input.

Name Type Description

_links

_links

ipspace

ipspace

name

string

Name of the broadcast domain, scoped to its IPspace

uuid

string

Broadcast domain UUID

discovered_devices

Name Type Description

capabilities

array[string]

The list of the capabilities of the discovered device.

chassis_id

string

Identifier associated with this specific discovered device, useful for locating the device in a data center.

ip_addresses

array[string]

The IP addresses on the discovered device.

name

string

Name of the discovered device.

platform

string

Hardware platform of the discovered device.

protocol

string

The protocol used to identify the discovered device. This can have a value of CDP or LLDP.

remaining_hold_time

integer

The number of seconds until the discovered device entry expires and is removed.

remote_port

string

The name of the remote port on the discovered device. The format is dependent on the reporting device.

system_name

string

Additional name used to identify a specific piece of equipment.

version

string

The version of the software running on the discovered device.

node

Name Type Description

name

string

Name of node on which the port is located.

active_ports

Port UUID along with readable names. Either the UUID or both names may be supplied on input.

Name Type Description

_links

_links

name

string

node

node

uuid

string

member_ports

Port UUID along with readable names. Either the UUID or both names may be supplied on input.

Name Type Description

_links

_links

name

string

node