Add and Delete Management Sub Interfaces

You can use the XCO CLI to add and delete management sub interfaces.

About this task

Follow this procedure to add or delete a management sub interface.

Procedure

  1. Run the following command to add a management sub interface:
    efa mgmt subinterface create [ --name sub | --vlan-id vlan-id | --ip-addr ip-addr --ipv6-address ipv6-addr ]
    1. Run the following command to show IPv6 routes:
      #efa mgmt subinterface show
      +------+-----------------+------+---------------+-------------+
      | Name | Parent Interface| Vlan |   IP Subnet   | IPv6 Subnet |
      +------+-----------------+------+---------------+-------------|
      | sub1 | ens160          | 100  | 10.10.10.1/24 |             |
      +------+-----------------+------+---------------+-------------+
      | sub2 | ens160          | 200  | 11.11.11.1/24 | 2000::1/64  |
      +------+-----------------+------+---------------+-------------+
      | sub3 | ens160          | 300  | 13.13.13.1/24 |             |
      +------+-----------------+------+---------------+-------------+
      | sub4 | ens160          | 400  | 14.14.14.1/24 | 3000::1/64  |
      +------+-----------------+------+---------------+-------------+
    • If a management network with the same name exists, the operation fails.
    • The changes made by this operation span three different components:
      • Sub interface creation under the physical NIC
      • Keepalived configuration changes (for high-availability deployments)
      • Ingress controller changes
    • If any operation to the component fails, it is marked as a failed operation and the configurations return to the previous state.
  2. Run the following commands to delete a management sub interface:
    efa mgmt subinterface delete --name <name>
    If a management network with the name exists, it is deleted. Otherwise, the correct response is provided in the command output.

Example

$ efa mgmt subinterface?
Management subinterface commands

Usage:
  efa mgmt subinterface [command]

Available Commands:
  create        Create sub-interface (sub-interface)
  delete        Delete sub-interface (sub-interface)
  show          List of sub-interfaces (sub-interfaces)

Use "efa mgmt subinterface [command] --help" for more information about a command.
$ efa mgmt subinterface create -h
Create management subinterface (sub-interface)
Usage:
  efa mgmt subinterface create [flags]
Flags:
      --name string         Name of the sub-interface
      --vlan-id int         VLAN Id of sub-interface
      --ip-address string   IP Address of sub-interface including subnet mask.
$ efa subinterface delete -h
Delete management subinterface (sub-interface)
Usage:
  efa mgmt subinterface delete [flags]
Flags:
      --name string   Name of the sub-interface
$ efa mgmt subinterface show -h
List of management sub-interfaces (sub-interfaces)

Usage:
  efa mgmt subinterface show [flags]
 Flags:
       --name string   Name of the sub-interface
$ efa mgmt subinterface create --name server1 --vlan-id 20 --ip-address
          20.20.20.2/24
Subinterface server1 created successfully
$ efa mgmt subinterface delete --name server1
Subinterface server1 deleted successfully
$ efa mgmt subinterface show
+------+------------------+------+-----------------+-------------+
| Name | Parent Interface | Vlan |   IP Subnet     | IPv6 Subnet |
+------+------------------+------+-----------------+-------------+
| sub1 | ens160           | 100  |  10.10.10.1/24  |             |
+------+------------------+------+-----------------+-------------+
| sub2 | ens160           | 200  |  11.11.11.1/24  | 2000::1/64  |
+------+------------------+------+-----------------+-------------+
| sub3 | ens160           | 300  |  13.13.13.1/24  |             |
+------+------------------+------+-----------------+-------------+
| sub4 | ens160           | 400  |  14.14.14.1/24  | 3000::1/64  |
+------+------------------+------+-----------------+-------------+
Management Subinterfaces Details
$ efa mgmt subinterface show --name server1
+---------------+------------------+------+---------------+
| Sub-Interface | Parent Interface | Vlan |   IP Subnet   |
+---------------+------------------+------+---------------+
| server1       | eth0             | 20   | 20.20.20.2/24 |
+---------------+------------------+------+---------------+
Management Subinterface Details