Moving a Secondary Private IP Address to a Different VNIC

Move a secondary private IP address to another VNIC in the same subnet.

    1. Open the navigation menu and click Compute. Under Compute, click Instances.
    2. Click the name of the instance to open its details page.
    3. Under Resources, click Attached VNICs.
    4. Click the VNIC that you're interested in.
    5. Under Resources, click IPv4 Addresses.
      The VNIC's associated IP addresses are listed in tabular form.
    6. Click Assign Secondary Private IP Address and enter assignment information:
      • Private IP Address: The secondary private IP address you want to move.
      • Unassign if already assigned to another VNIC: Select this checkbox to move the secondary IP address from the VNIC it's assigned to.
      • Hostname: (Optional) The hostname to use for DNS in the cloud network. Only available if the VCN and subnet both have DNS labels. See DNS in Your Virtual Cloud Network.
      • Public IP Type: (Optional) Only available if the VNIC is in a public subnet. See Public IP Addresses.
  • Use the vnic assign-private-ip command and required parameters to move a secondary private IP address from one VNIC to another:

    oci network vnic assign-private-ip --ip-address IP_address --unassign-if-already-assigned VNIC_OCID
    --vnic-ip-id destination_VNIC_OCID ... [OPTIONS]

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the UpdatePrivateIp operation to move a private IP address from one VNIC to another.