17 IP Address Reservation for IP Network
A reservation of a NAT IPv4 address, which can be associated to one or more virtual NICs for routing outside of an IP network or IP network exchange using NAT.
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.
ip-address-reservation add
Creates an IP address reservation for used in IP networks. Reserves a NAT IPv4 address, which you can associate with one or more virtual NICs for routing traffic outside an IP network or an IP network exchange using NAT.
To reserve an IP address for an instance that you have created in the flat network, see ip-reservation add.
Reserve an IP address from one of the following IP pools:
-
A pool of public IP addresses. An IP address from this pool is accessible over the public Internet.
-
A pool of cloud IP addresses. An IP address from this pool is accessible to other IP networks in the Oracle cloud. You can use these IP addresses to communicate with other Oracle services.
When you reserve an IP address from a specified IP pool, an IPv4 address is allocated for your use. A public IP address or a cloud IP address can be associated with only one vNIC at a time. However, a single vNIC can have a maximum of two NAT IP addresses, one from each IP pool.
After reserving an IP address, you can and associate the IP address with a vNIC on your instance. See ip-address-association add.
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 ip-address-reservation add name [--ip-address-pool ip_address_pool_name] [--description description] [--tags tags]
Example
opc -f json compute ip-address-reservation add /Compute-acme/jack.jones@example.com/ipreservation1 --ip-address-pool /oracle/public/public-ippool
Sample Output
{ "name": "/Compute-acme/jack.jones@example.com/ipreservation1", "uri": "https://api-z999.compute.us0.oraclecloud.com/network/v1/ipreservation/Compute-acme/jack.jones@example.com/ipreservation1", "description": null, "tags": [], "ipAddress": "10.252.152.90", "ipAddressPool": "/oracle/public/public-ippool" }
ip-address-reservation list
Retrieves details of the IP address reservations that are available in the specified container. This request is for IP address reservations used in IP networks.
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 ip-address-reservation list container
Example
opc -f json compute ip-address-reservation list /Compute-acme/jack.jones@example.com
Sample Output
Some lines have been truncated with ellipses (...
) for readability. When you run the command in your environment, you'll see the full output.
{ "result":[ { "name": "/Compute-acme/jack.jones@example.com/ipreservation1", "uri": "https://api-z999.compute.us0.oraclecloud.com/network/v1/ipreservation/Compute-acme/jack.jones@example.com/ipreservation1", "description": null, "tags": [], "ipAddress": "10.252.152.90", "ipAddressPool": "/oracle/public/public-ippool" }, { "name": "/Compute-acme/jack.jones@example.com/ipreservation2", "uri": "https://api-z999.compute.us0.oraclecloud.com/network/v1/ipreservation/Compute-acme/jack.jones@example.com/ipreservation2", "description": null, "tags": [], "ipAddress": "10.252.152.52", "ipAddressPool": "/oracle/public/cloud-ippool" } ] }
ip-address-reservation get
Retrieves details of the specified IP address reservation for IP networks.
You can use the get
command to verify whether add
and update
operations were completed successfully.
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 ip-address-reservation get name
Example
opc -f json compute ip-address-reservation get /Compute-acme/jack.jones@example.com/ipreservation1
Sample Output
{ "name": "/Compute-acme/jack.jones@example.com/ipreservation1", "uri": "https://api-z999.compute.us0.oraclecloud.com/network/v1/ipreservation/Compute-acme/jack.jones@example.com/ipreservation1", "description": null, "tags": [], "ipAddress": "10.252.152.90", "ipAddressPool": "/oracle/public/public-ippool" }
ip-address-reservation update
Updates the specified IP address reservation which is used in IP Networks. You can update values for ip-address-pool
, description
, and tags
parameters.
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 ip-address-reservation update name [--ip-address-pool ip_address_pool_name] [--description description] [--tags tags]
Example
This following example demonstrates how you can update the description of the /Compute-acme/jack.jones@example.com/ipreservation1
IP address reservation for use in an IP network. You can also change the ip-address-pool
from /oracle/public/public-ippool
to /oracle/public/cloud-ippool
to communicate with instances privately.
opc -f json compute ip-address-reservation update /Compute-acme/jack.jones@example.com/ipreservation1 --ip-address-pool /oracle/public/cloud-ippool --description 'updated description for IP reservation'
Sample Output
{ "name": "/Compute-acme/jack.jones@example.com /ipreservation1", "uri": "https://api-z999.compute.us0.oraclecloud.com/network/v1/ipreservation/Compute-acme/jack.jones@example.com /ipreservation1", "description": "updated description for IP reservation", "tags": [], "ipAddress": "10.252.152.90", "ipAddressPool": "/oracle/public/public-ippool" }
ip-address-reservation delete
Deletes the specified IP address reservation which is used in an IP network. 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 ip-address-reservation delete name
Example
opc compute ip-address-reservation delete /Compute-acme/jack.jones@example.com/ipreservation1