IBM Cloud Docs
Creating network interfaces with floating IP addresses

Creating network interfaces with floating IP addresses

You can reserve a floating IP address, then add it to a network interface to allow traffic from the internet to access your VPC public gateway, virtual server instance, or Bare Metal server.

Adding a floating IP address to a virtual server instance

To add a floating IP to a network interface to allow internet traffic to access your VSI, perform the following procedure:

  1. In the IBM Cloud console, go to Navigation Menu iconmenu icon > VPC Infrastructure VPC icon > Compute > Virtual server instances.

  2. Click the name of a virtual server instance that includes the network interface that you want to edit. Or you can add a new network interface to the virtual server instance.

  3. On the instance details page, find the Network interfaces section.

  4. If you are adding a floating IP address to the virtual server instance for the first time, identify the primary network interface in the Network interfaces section of the Instance details page.

    By default, the first interface is named eth0. Initially associating the floating IP address with the primary network interface helps establish the data path. Later, you can associate the floating IP to a different network interface if you desire.

  5. Click the pencil icon to edit the primary network interface.

  6. On the Edit network interface page, locate the Floating IP address field.

  7. You can select an existing floating IP address to add to the network interface, or you can reserve a new floating IP and add it to the network interface. To do so:

    1. Select Reserve a new floating IP.
    2. Enter your geography, region, and zone information.
    3. Provide the details for the floating IP, including its name and resource group.
    4. (Optional) Add any tags you want associated with the IP.
    5. (Optional) Add access management tags to resources to help organize access control relationships. The only supported format for access management tags is key:value. For more information, see Controlling access to resources by using tags.
    6. Select Reserve.
  8. After making your selections, click Save.

Adding a floating IP address to a Bare Metal server

To add your floating IP to a network interface to allow internet traffic to access your Bare Metal server, perform the following procedure:

To associate multiple floating IPs to a network interface, make sure that both Allow IP spoofing and Enable infrastructure NAT are disabled on the network interface.

  1. In the IBM Cloud console, go to Navigation Menu iconmenu icon > VPC Infrastructure VPC icon > Compute > Bare Metal server.

  2. Under the Network interfaces section of the Bare metal server details page, click the pencil icon of the interface you want to associate the floating IP with.

  3. On the Edit network interface page, locate the Floating IP address field.

  4. You can select an existing floating IP address to add to the network interface, or you can reserve a new floating IP and add it to the network interface. To do so:

    1. Select Reserve a new floating IP.
    2. Enter your geography, region, and zone information.
    3. Provide the details for the floating IP, including its name and resource group.
    4. Add any tags you want associated with the IP.
    5. Select Reserve.

    Associating a floating IP to the secondary network interface only works when you configure a default gateway to the secondary network interface within the operating system.

  5. After making your selections, click Save.

Creating a public gateway for VPC with a floating IP address

A public gateway allows all attached resources to communicate with the public internet. Your public gateway automatically assigns a floating IP to a subnet to allow internet traffic to access it.

To create a public gateway with a floating IP, refer to Creating public gateways.