46 Virtual NIC Set
A Virtual NIC Set, or vNICset, is a collection of one or more vNICs. You must specify a vNICset when you create a route. When a vNICset containing multiple vNICs is used in a route, Equal Cost Multipath (ECMP) anycast routing is implemented. Traffic routed by that route is load balanced across all the vNICs in the vNICset. Using vNICsets with multiple vNICs also ensures high availability for traffic across the specified vNICs.
Before running the CLI commands described in this section, make sure that you've installed the CLI client and set up the required environment variables as described in Preparing to Use the CLI.
virtual-nic-set add
Adds a virtual NIC set to Compute Classic.
A Virtual NIC Set, or vNICset, is a collection of one or more vNICs. You must specify a vNICset when you create a route. When a vNICset containing multiple vNICs is used in a route, Equal Cost Multipath (ECMP) anycast routing is implemented. Traffic routed by that route is load balanced across all the vNICs in the vNICset. Using vNICsets with multiple vNICs also ensures high availability for traffic across the specified vNICs.
Required Role
To complete this task, you must have the Compute_Operations
role. If this role isn’t assigned to you or you’re not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
Syntax
opc compute virtual-nic-set add name [--vnics vnics] [--applied-acls acls] [--description description] [--tags tags]
For help with the parameters and options of this command, run the command with the -h
option.
Example 1: Creating a vNIC set while working with new instances
For new instances that you create in an IP network, create an empty vNIC set and then specify the multipart name of the empty vNIC set in the networking section of the orchestration or launch plan. For example, if you create a vNIC set with the name /Compute-acme/jack.jones@example.com/vnicset_new_instance
, then specify “vnicsets": ["/Compute-acme/jack.jones@example.com/vnicset_new_instance"]
in the networking
section of the orchestration or launch plan. When the instance is created, vNICs are automatically populated in the vNIC set that you mentioned in the orchestration or launch plan. When you delete the instance, the vNICs are automatically removed from the vNIC set.
opc -f json compute virtual-nic-set add /Compute-acme/jack.jones@example.com/vnicset_new_instance
Sample Output for Example 1
{ "name": "/Compute-acme/jack.jones@example.com/vnicset_new_instance", "uri": "https://api-z999.compute.us0.oraclecloud.com:443/network/v1/vnicset/Compute-acme/jack.jones@example.com/vnicset_new_instance", "vnics": [], "appliedAcls": [], "description": null, "tags": [], }
Example 2: Creating a vNIC set while working with existing instances
For existing instances that are available in the IP network, use the instance get command to get details of the virtual NICs of an instance, and then add the virtual NICs to a virtual NIC set. The following example demonstrates how you can create a virtual NIC set by specifying a comma-separated list of virtual NICs.
opc -f json compute virtual-nic-set add /Compute-acme/jack.jones@example.com/vnicset1 --vnics "/Compute-acme/jack.jones@example.com/inst2/4f0840bd-49dc-4d7f-bcc2-628c0cd5006b/eth1,/Compute-acme/jack.jones@example.com/inst1-vnic1-ipnet1"
Sample Output for Example 2
{ "name": "/Compute-acme/jack.jones@example.com/vnicset1", "uri": "https://api-z999.compute.us0.oraclecloud.com:443/network/v1/vnicset/Compute-acme/jack.jones@example.com/vnicset1", "vnics": [ "/Compute-acme/jack.jones@example.com/inst2/4f0840bd-49dc-4d7f-bcc2-628c0cd5006b/eth1", "/Compute-acme/jack.jones@example.com/inst1-vnic1-ipnet1" ], "appliedAcls": [], "description": null, "tags": [], }
virtual-nic-set list
Retrieves details of all the virtual NIC sets in the specified container.
Required Role
To complete this task, you must have the Compute_Monitor
or Compute_Operations
role. If this role isn’t assigned to you or you’re not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
Syntax
opc compute virtual-nic-set list container
For help with the parameters and options of this command, run the command with the -h
option.
Example
opc -f json compute virtual-nic-set list /Compute-acme/jack.jones@example.com
Sample Output
{ "result":[ { "name": "/Compute-acme/jack.jones@example.com/vnicset1", "uri": "https://api-z999.compute.us0.oraclecloud.com.com:443/network/v1/vnicset/Compute-acme/jack.jones@example.com/vnicset1", "vnics": [ "/Compute-acme/jack.jones@example.com/inst2/4f0840bd-49dc-4d7f-bcc2-628c0cd5006b/eth1", "/Compute-acme/jack.jones@example.com/inst1-vnic1-ipnet1" ] } ] }
virtual-nic-set get
Retrieves details of the specified virtual NIC set.
You can use the get
command to verify whether add
and update
operations were completed successfully. Use the -F
option (for example, -F name
) to filter the output for specific attributes.
Required Role
To complete this task, you must have the Compute_Monitor
or Compute_Operations
role. If this role isn’t assigned to you or you’re not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
Syntax
opc compute virtual-nic-set get name
For help with the parameters and options of this command, run the command with the -h
option.
Example
opc -f json compute virtual-nic-set get /Compute-acme/jack.jones@example.com/vnicset1
Sample Output
{ "name": "/Compute-acme/jack.jones@example.com/vnicset1", "uri": "https://api-z999.compute.us0.oraclecloud.com:443/network/v1/vnicset/Compute-acme/jack.jones@example.com/vnicset1", "vnics": [ "/Compute-acme/jack.jones@example.com/inst2/4f0840bd-49dc-4d7f-bcc2-628c0cd5006b/eth1", "/Compute-acme/jack.jones@example.com/inst1-vnic1-ipnet1" ] }
virtual-nic-set update
You can add or remove virtual NICs in a virtual NIC set.
This command updates values for all the parameters. If you don’t provide a value for a parameter, it is changed to null. Before updating a virtual NIC set, you can run the virtual-nic-set get command to retrieve all the values that are currently assigned to it, so that you can check which values you want to retain and which values you want to change.
Required Role
To complete this task, you must have the Compute_Operations
role. If this role isn’t assigned to you or you’re not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
Syntax
opc compute virtual-nic-set update name [--vnics 'comma-separated list of vnics'] [--applied-acls applied-acls] [--description description] [--tags tags]
For help with the parameters and options of this command, run the command with the -h
option.
Example
The following command shows how to add a virtual NIC /Compute-acme/jack.jones@example.com/inst3/a4138f96-31bc-4e28-8696-3eb0916f75f1/eth0
to an existing virtual NIC set /Compute-acme/jack.jones@example.com/vnicset1
which already contains two virtual NICs.
opc -f json compute virtual-nic-set update /Compute-acme/jack.jones@example.com/vnicset1 --vnics "/Compute-acme/jack.jones@example.com/inst2/4f0840bd-49dc-4d7f-bcc2-628c0cd5006b/eth1, /Compute-acme/jack.jones@example.com/inst1-vnic1-ipnet1, /Compute-acme/jack.jones@example.com/inst3/a4138f96-31bc-4e28-8696-3eb0916f75f1/eth0"
Sample Output
{ "name": "/Compute-acme/jack.jones@example.com/vnicset1", "uri": "https://api-z999.compute.us0.oraclecloud.com:443/network/v1/vnicset/Compute-acme/jack.jones@example.com/vnicset1", "vnics": [ "/Compute-acme/jack.jones@example.com/inst2/4f0840bd-49dc-4d7f-bcc2-628c0cd5006b/eth1", "/Compute-acme/jack.jones@example.com/inst1-vnic1-ipnet1", "/Compute-acme/jack.jones@example.com/inst3/a4138f96-31bc-4e28-8696-3eb0916f75f1/eth0" ], }
virtual-nic-set delete
Deletes the specified virtual NIC set. No response is returned.
Required Role
To complete this task, you must have the Compute_Operations
role. If this role isn’t assigned to you or you’re not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
Syntax
opc compute virtual-nic-set delete name
For help with the parameters and options of this command, run the command with the -h
option.
Example
opc compute virtual-nic-set delete /Compute-acme/jack.jones@example.com/vnicset1