Obtaining a Public IP Address of the Instance
Last updated: 2018-06-27 10:43:21PDF
Obtaining the Address on the Console
- Log in to the CVM Console.
- The CVM list displays the instances under your account. Move the mouse cursor over the public IP of the CVM, and the "Copy" button will appear. Click the button to copy this IP address.
The public IP address is mapped to the private IP address through NAT. Therefore, if you view the attributes of a network interface within the instance (for example, by using the commands such as
ipconfig (Windows)), the public IP address is not displayed. To obtain the public IP address of an instance from within the instance, please see Obtain the Public IP Address of an Instance Using Instance Metadata.
Obtaining the Address Using API
&Nbsp; For more information, please see DescribeInstances API.
Obtaining the Address Using Instance Metadata
- Log in to the CVM instance. For more information, please see Log in to Linux Instance and Log in to Windows Instance.
- Enter the command:
If the returned value is in the following structure, you can see the public IP address:
For more information, please see Instance Metadata.