Managing vNET

A virtual network (vNET) is deployed in the scope of a service network or tenant network. vNET represents an IP subnet and defines an IP address range. You require a vEthernet to create a vNET.

add vnet

This command enables you to add a new virtual network for a tenant.

Note:

The tenant users can only add vNETs that are tied to IPoIB type vEthernets. However, if EoIB vNET is needed the Oracle Cloud Administrator must create it in the tenancy for the tenant user to use.

Syntax

oracle-compute add vnet name vethernet [--cidr] [--ipranges] [--description] [--global_ip_num]

Parameters and Options

The following parameters are specific to this command. You can also use the common options described in General Command Options.

Parameter Description
name A unique hierarchical name for a vNET . For example, /mytenant/public/myvnet.

Object names can contain only alphanumeric characters, hyphens, and periods. Object names are case-sensitive.

vethernet vEthernet to be associated with this vNET. For tenant user, only IPoIB vEthernet is supported.
--cidr (Optional) Specifies the subnet Classless Inter-Domain Routing (CIDR) for vNET. Optional for IPoIB network.

Format: ip_address/#. For example, 192.0.1.0/24

If cidr is not specified for IPoIB networks, then global_ip_num parameter must be specified.

--ipranges (Optional) IP address range for the vNET. It's a comma-separated list that can have individual IP addresses or ranges using “-“ as a separator. For example, 192.0.1.10, 192.0.1.20-192.0.1.30

If no IP range is provided, then the entire CIDR (from .1 to .254) is used for IP addresses.

--description (Optional) Description to correlate this vNET with an internal tenant schema
--global_ip_num (Optional) Specifies the number of IP addresses to be used from the global IP pool. Not valid for EoIB network.

If the global IP pool is enabled in Oracle Compute Cloud Service, using this option will create a vNET by allocating a specified number of IP addresses from the global pool of IP addresses to guarantee uniqueness. This option is mutually exclusive of cidr and ipranges options.

Example

$ oracle-compute add vnet /mytenant/public/IPoIB /mytenant/public/IPoIB --cidr 192.0.2.1/21

delete vnet

This command enables you to delete a specific vNET for a tenant. You cannot delete a vNET if it is used by any instance, or if there is an existing vNET Reservation associated with the vNET.

Syntax

oracle-compute delete vnet name

Parameters and Options

The following parameters are specific to this command. You can also use the common options described in General Command Options.

Parameter Description
name A unique hierarchical name for a vNET . For example, /mytenant/public/myvnet

Example

$ oracle-compute delete vnet /mytenant/public/IPoIB-service-manager-c2

update vnet

This command enables you to update information for a specific tenant vNET.

Note:

The tenant users can only update vNETs that are tied to IPoIB vEthernets.

Syntax

oracle-compute update vnet name [--cidr] [--ipranges] [--gateway] [--description] [--global_ip_num]

Parameters and Options

The following parameters are specific to this command. You can also use the common options described in General Command Options.

Parameter Description
name A unique hierarchical name for a vNET . For example, /mytenant/public/myvnet .
--cidr (Optional) Specifies the subnet Classless Inter-Domain Routing (CIDR) for vNET. Optional for IPoIB network.

Format: ip_address/#. For example, 192.0.1.0/24

--ipranges (Optional) IP address range for the vNET. It is a comma separated list that can have individual IP addresses or ranges using “-“ as a separator. For example, 192.0.1.10, 192.0.1.20-192.0.1.30

If no IP range is provided, then the entire CIDR (from .1 to .254) is used for IP addresses.

--description (Optional) Description to correlate this vNET with the internal tenant schema
--global_ip_num (Optional) Specifies the number of IP addresses to be used from the global IP pool. Not valid for EoIB network.

If the global IP pool is enabled in Oracle Compute, using this option will create a vNET by allocating a specified number of IP addresses from the global pool of IP addresses to guarantee uniqueness. This option is mutually exclusive of cidr and ipranges options.

Example

$ oracle-compute update vnet /mytenant/public/IPoIB --ipranges 192.0.10.1-192.0.10.10

Retrieve vNET Details

You can retrieve vNET details by using the CLI.

Note:

You can view the details of any vNET in your own tenancy, as well as vNETs you have been given access to by the Oracle Cloud Administrator.

discover vnet

This command enables you to discover a list of configured vNETs in a specific container or subcontainer.

Syntax

oracle-compute discover vnet container

Parameters and Options

The following parameters are specific to this command. You can also use the common options described in General Command Options.

Parameter Description
container Hierarchical name-space for vNET. For example, /mytenant/public/.

Example

$ oracle-compute discover vnet /mytenant/public/

Sample Output

$ oracle-compute discover vnet /mytenant/public/
entry
/mytenant/public/IPoIB-private-c2
/mytenant/public/eth-admin
$

get vnet

This command enables you to retrieve information for a specific vNET.

Syntax

oracle-compute get vnet name

Parameters and Options

The following parameters are specific to this command. You can also use the common options described in General Command Options.

Parameter Description
name An unique hierarchical name for a vNET . For example, /mytenant/public/IPoIB

Example

$ oracle-compute get vnet /mytenant/public/IPoIB

Example

$ oracle-compute get vnet /mytenant/public/IPoIB   -F name,vethernet,cidr
name                      vethernet               cidr          
/mytenant/public/IPoIB   /mytenant/public/IPoIB   10.128.38.0/23 
$

list vnet

This command enables you to retrieve information for all the vNETs in a specific container.

Syntax

oracle-compute list vnet container

Parameters and Options

The following parameters are specific to this command. You can also use the common options described in General Command Options.

Parameter Description
container Hierarchical name-space for vNET. For example, /mytenant/public/myVNET

Example

$ oracle-compute list vnet /cloud/public/

Example

$ oracle-compute list vnet  /cloud/public/ -F name,vethernet,cidr,ipranges
name                                    vethernet                            cidr             ipranges
/cloud/public/EoIB-OMS               /cloud/public/EoIB-OMS               10.196.38.0/23   10.196.38.101-10.196.38.245
/cloud/public/EoIB-management        /cloud/public/EoIB-management        10.196.36.0/23   10.196.36.55, 10.196.36.56, 10.196.36.58
/cloud/public/IPoIB-instance-storage /cloud/public/IPoIB-instance-storage 10.196.0.0/16    10.196.0.2-172.38.255.254
/cloud/public/IPoIB-ldap-internal    /cloud/public/IPoIB-ldap-internal    192.168.120.0/24 192.168.120.1-192.168.120.254
/cloud/public/IPoIB-load-balancer    /cloud/public/IPoIB-load-balancer    192.168.127.0/24 192.168.127.1-192.168.127.254
/cloud/public/IPoIB-management       /cloud/public/IPoIB-management       192.168.90.0/24  192.168.90.43, 192.168.90.44, 192.168.90.45
/cloud/public/IPoIB-service-manager  /cloud/public/IPoIB-service-manager  192.168.126.0/24 192.168.126.1-192.168.126.254
/cloud/public/vnet-EoIB-vlan3072     /cloud/public/veth-EoIB-vlan3072     10.196.206.0/23  10.196.206.74-10.196.206.93