Technology Encyclopedia Home >How to obtain the private IP address of a cloud server instance?

How to obtain the private IP address of a cloud server instance?

To obtain the private IP address of a cloud server instance, you can follow these steps:

  1. Access the Cloud Console: Log in to your cloud provider's management console.
  2. Navigate to the Instance List: Find the section where your virtual machines or server instances are listed.
  3. Select the Target Instance: Click on the specific instance you want to check.
  4. View Instance Details: Look for a "Details," "Network," or "Overview" tab, where the private IP address is typically displayed.

Alternatively, you can use command-line tools if you have access to the server:

  • Linux: Run ip addr show or ifconfig to list network interfaces and their assigned IP addresses. The private IP is usually under eth0 or a similar interface.
  • Windows: Use ipconfig in Command Prompt to display network details, including the private IP under the relevant adapter.

For example, in Tencent Cloud, after logging into the console, go to the CVM (Cloud Virtual Machine) section, select your instance, and check the "Basic Information" tab for the private IP. If you're managing instances via the Tencent Cloud CLI (tccli), you can use the command:

tccli cvm DescribeInstances --InstanceIds <instance-id>

The response will include the private IP address under the PrivateIpAddresses field.

If you're using Tencent Cloud's Virtual Private Cloud (VPC), the private IP is assigned within the subnet range you configured for the instance.