This document describes how to obtain the private IP address of the instance and configure the private DNS.
Please see DescribeInstances API.
Execute the following command to obtain the private IP.The following operations use the cURL tool as an example.
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 Instance Metadata.
When a network resolution error occurs, you can manually configure the private network DNS based on your CVM operating system.
/etc/grub.conf
file.vi /etc/resolv.conf
nameserver 10.53.216.182
nameserver 10.53.216.198
options timeout:1 rotate
Log in to the Windows CVM.
On the operating system interface, open Control Panel > Network and Sharing Center > Change adapter settings.
Right-click the Ethernet and select Properties to open the “Ethernet Properties” window.
In the “Ethernet Properties” window, double-click IP version 4 (TCP/IPv4), as shown below:
Select [Use the following DNS server address] and modify the DNS IP according to the corresponding region in the Private Network DNS list.
Click OK.
Was this page helpful?