Updated on 2024-03-05 GMT+08:00

Accessing a Virtual IP Address Using an EIP

Required Tools

Postman or JMeter

Prerequisites

You have configured the ECS networking based on Networking and ensure that the ECS has been bound with a virtual IP address.

Involved APIs

The following APIs are invoked:

No.

Method

URI

Description

1

POST

/v3/auth/tokens

Obtain a token.

2

POST

/v2.0/floatingips

Assign an EIP.

Procedure

  1. Obtain a token.

    Method

    POST

    URL

    IAM address: Port number/v3/auth/tokens

    Body (Example)

    {

    "auth":{

    "identity":{

    "methods": ["password"],

    "password":{

    "user":{

    "name": "user_name",

    "domain":{

    "name":"domain_name"

    },

    "password":"user_password"

    }

    }

    },

    "scope":{

    "project":{

    "name":"project_name"

    }

    }

    }

    }

  2. Assigns an EIP and binds it to a virtual IP address.

    Method

    POST

    URL

    VPC address: Port number/v2.0/floatingips

    Body (Example)

    {

    "floatingip": {

    "floating_network_id": "${admin_external_net}",

    "port_id": "4b9246da-aa12-4959-b17e-84038b8a0a96"

    }

    }

    Description

    The port_id parameter in the body is the ID of the virtual IP address port corresponding to the virtual IP address bound to the ECS.