The nat dns-mapping command configures a static mapping entry that contains a DNS domain name, a private IP address, and a public IP address, which is used to translate between public and private IP addresses.
The undo nat dns-mapping command deletes a static mapping entry that contains a DNS domain name, a private IP address, and a public IP address.
By default, no static mapping entry that contains a DNS domain name, and a private IP address is configured.
This command is supported only on the NetEngine 8000 F1A.
Parameter | Description | Value |
---|---|---|
global-address global-address |
Specifies a public IP address. |
The value is expressed in dotted decimal notation. |
inside-address inside-address |
Specifies a private IP address. |
The value is expressed in dotted decimal notation. |
domain domain-name |
Specifies a DNS domain name. |
The value is a string of 1 to 255 case-sensitive characters. It cannot contain spaces. If double quotation marks are used at both ends of a string, the string can contain spaces. |
Usage Scenario
To configure mappings between public and private IP addresses with a specified DNS domain name, run the nat dns-mapping command. If a device on an enterprise network without a DNS server needs to use a DNS domain name to communicate with a service within the enterprise network, the communication can be implemented using a DNS server on a public network. The nat dns-mapping command configures a static DNS mapping entry, that contains a domain name, a public IP address, and a private IP address.
Configuration Impact
When a DNS packet arrives at a NAT device, the NAT device searches for a static entry based on the configured DNS mapping entry and translates the public IP address to the private IP address. Then the NAT device sends the private IP address that replaces the DNS domain name to the user. The user then can access the internal server.
<HUAWEI> system-view [~HUAWEI] nat instance cpe1 id 1 [*HUAWEI-nat-instance-cpe1] nat dns-mapping domain dnsmap1 global-address 192.168.1.1 inside-address 192.168.2.2