Overview
This document describes how to obtain the private IP address of the instance and configure the private DNS.
Directions
Obtaining the private IP address of an instance
Obtain via instance metadata
2. On the instance management page, proceed according to the actually used view mode:
List view: select the target instance, move the cursor to the primary IP column, and click to copy the private IP as shown below:
Tab view: on the instance page, click after the private network address in "IP Address" to copy the private IP as shown below:
1. Log in to your CVM.
2. Access the instance metadata by using the cURL tool or an HTTP GET request.
Note:
The following operations use the cURL tool as an example.
Execute the following command to obtain the private IP.
curl http://metadata.tencentyun.com/meta-data/local-ipv4
The returned information is the private IP address, as shown below:
For more information about instance metadata, see Querying Instance Metadata. Configuring private network DNS
When a network resolution error occurs, you can manually configure the private network DNS based on your CVM operating system.
1. Log into the Linux CVM.
2. Execute the following command to open the /etc/grub.conf
file.
3. Press i to switch to the edit mode, and modify the DNS IP according to the corresponding region in the Private Network DNS list.
For example, change the private network DNS IP to an private network DNS server in the Beijing region. nameserver 10.53.216.182
nameserver 10.53.216.198
options timeout:1 rotate
4. Press Esc, enter :wq, save the file and return.
1. Log in to the Windows CVM.
2. On the operating system UI, open Control Panel > Network and Sharing Center > Change adapter settings.
3. Right-click Ethernet and select Properties to open the "Ethernet Properties" window.
4. In the "Ethernet Properties" window, double-click Internet Protocol Version 4 (TCP/IPv4) as shown below:
5. Select Use the following DNS server addresses and modify the DNS IP according to the corresponding region in the Private Network DNS list.
6. Click OK.
Was this page helpful?