AR100, AR120, AR150, AR160, AR200, AR1200, AR2200, AR3200, and AR3600 V200R010 Command Reference
DNS Configuration Commands
- ddns apply policy
- display ddns interface
- display ddns policy
- display dns configuration
- display dns domain
- display dns dynamic-host
- display dns forward table
- display dns statistics
- display dns server
- display ip host
- ddns policy
- dns domain
- dns forward retry-number
- dns forward retry-timeout
- dns proxy enable
- dns proxy sip-info insert-mode decompression-domain-name
- dns relay enable
- dns resolve
- dns server
- dns server vpn-instance
- dns server source-ip
- dns-server-select-algorithm
- dns spoofing
- interval (DDNS policy view)
- ip host
- method (DDNS policy view)
- name-server (DDNS policy view)
- reset ddns policy
- reset dns dynamic-host
- reset dns forward table
- reset dns statistics
- ssl-policy (ddns-policy-view)
- url (DDNS policy view)
- dns resolve policy a
- rule (DNS resolution policy view)
ddns apply policy
Function
The ddns apply policy command allows you to apply DDNS policies on interfaces.
The undo ddns apply policy command deletes the configuration.
By default, no DDNS policy is bound to an interface.
Parameters
Parameter | Description | Value |
---|---|---|
policy-name | Specifies a DDNS policy name. | The value must be the name of an existing DDNS policy. |
fqdn domain-name | Specifies domain name updated by the DDNS. | The value is a string of 1 to 128 case-sensitive characters without spaces. |
Usage Guidelines
Usage Scenario
DNS provides static mappings between domain names and IP addresses. When IP addresses of interfaces change, DNS cannot dynamically update mappings. After the specified DDNS policy is applied on an interface, if the IP address of the interface changes, the DDNS policy updates mapping between the specified Fully Qualified Domain Name (FQDN) and the IP address.
If a DDNS policy with the same name is bound to an interface repeatedly and different FQDNs are specified, only the latest configuration takes effect and a DDNS update is initiated.
Prerequisites
To apply the policy on an interface, you need to create the DDNS policy first, also the DDNS policy, including DDNS Server domain-name, DDNS Client domain-name, username and password, must be completely configured.
display ddns interface
Function
The display ddns interface command displays information about the interfaces to which DDNS policies are applied.
Parameters
Parameter | Description | Value |
---|---|---|
all | Indicates all interfaces. | - |
interface-type interface-number | Specifies the type and number of an interface. | - |
Usage Guidelines
To view information about the interfaces to which DDNS policies are applied, run the display ddns interface command.
Example
# Display the configuration of DDNS policies applied to Eth2/0/0.
<Huawei> display ddns interface ethernet 2/0/0 Policies applied on interface Ethernet2/0/0 : ------------------------------------------------------------------------------ Policy name : 123 Server : ns.huawwei.com User name : - Password : - Update method : ddns Update interval : 3600 seconds Current status : START Client FQDN : 123 Client IP : 0.0.0.0 Server IP : - Last update time : 2015-10-27 10:30:28 Last update result : Update failed
Item |
Description |
---|---|
Policy name |
DDNS policy name. |
Server |
Domain name of a DDN service provider. |
User name |
User name used for access to a DDNS service provider. |
Password |
Password used for access to a DDNS service provider. |
Update method |
DDNS update method:
|
Update interval |
Interval at which a DDNS client initiates a DDNS update, in seconds. |
Current status |
Status of an applied DDNS policy:
|
Client FQDN |
Domain name of a DDNS client. |
Client IP |
IP address of a DDNS client. |
Server IP |
IP address of a DDNS server. |
Last update time |
Last update time. |
Last update result |
Last update result:
|
display ddns policy
Parameters
Parameter | Description | Value |
---|---|---|
policy-name | Displays information about a specified DDNS policy |
The DDNS policy name must exist. |
Usage Guidelines
You can run the display ddns policy command to view DDNS policy information. If no policy-name is specified, all DDNS policies information is displayed.
Example
# Display current DDNS policy information.
<Huawei> display ddns policy test Policy name : test Server : oray://username:password@phddnsdev.oray.net User name : - Password : - Update method : vendor-specific Update interval : 3600 seconds Apply interface : Ethernet2/0/0
Item |
Description |
---|---|
Policy name |
DDNS policy name. |
Server |
Domain-name of a DDNS service provider |
User name |
User name for accessing a DDNS service provider |
Password |
Password for accessing a DDNS service provider |
Update method |
Update mode of the DDNS Client.
|
Update interval |
Interval for which the DDNS client initiates DDNS updates, in second. |
Apply interface |
Interface that applies this policy |
display dns configuration
Example
# Display the global DNS configurations.
<Huawei> display dns configuration ------------------------------------------------------------------------------- Dns resolve : Disabled DNS-server-select-algorithm : Auto Dns server source ip address : - Dns server source ipv6 address : - Dns proxy : Disabled Dns IPv6 proxy : Disabled Dns relay : Disabled Dns IPv6 relay : Disabled Dns spoofing : - Dns IPv6 spoofing : - Dns forward retry-number : 2 Dns forward retry-timeout : 3 Dns server vpn-instance : vpn1 -------------------------------------------------------------------------------
Item |
Description |
---|---|
Dns resolve |
Whether dynamic DNS resolution is enabled. The value can
be:
To enable dynamic DNS resolution, run the dns resolve command. |
DNS-server-select-algorithm |
Algorithm for selecting a destination DNS server. The value
can be:
To specify an algorithm for selecting a destination DNS server, run the dns-server-select-algorithm command. |
Dns server source ip address |
Source IP address of the local device for communication. To set the source IP address of the local device, run the dns server source-ip command. |
Dns server source ipv6 address |
Source IPv6 address of the local device for communication. To set the source IPv6 address of the local device, run the dns server ipv6 source-ip command. |
Dns proxy |
Whether DNS proxy is enabled. The value can be:
To enable DNS proxy, run the dns proxy enable command. |
Dns IPv6 proxy |
Whether IPv6 DNS proxy is enabled. The value can be:
To enable DNS proxy, run the dns proxy ipv6 enable command. |
Dns relay |
Whether DNS relay is enabled. The value can be:
To enable DNS relay, run the dns relay enable command. |
Dns IPv6 relay |
Whether IPv6 DNS relay is enabled. The value can be:
To enable IPv6 DNS relay, run the dns relay ipv6 enable command. |
Dns spoofing |
IP address that spoofs Reply packets. To enable DNS spoofing and specify the IP address that spoofs Reply packets, run the dns spoofing command. |
Dns IPv6 spoofing |
IPv6 address that spoofs Reply packets. To enable DNS spoofing and specify the IPv6 address that spoofs Reply packets, run the dns spoofing ipv6 command. |
Dns forward retry-number |
Number of times for retransmitting query messages to the destination DNS server. To set the number of times for retransmitting query messages to the destination DNS server, run the dns forward retry-number command. |
Dns forward retry-timeout |
Retransmission timeout period that the device sends query messages to the destination DNS server. To set the retransmission timeout period that the device sends query messages to the destination DNS server, run the dns forward retry-timeout command. |
Dns server vpn-instance |
Name of the VPN instance that the DNS server belongs to. If the VPN instance that the DNS server belongs to is not specified, this parameter is not displayed. To configure the name of the VPN instance that the DNS server belongs to, run the dns server vpn-instance command. |
display dns domain
Function
The display dns domain command displays the configuration and sequence of domain name suffixes.
Parameters
Parameter | Description | Value |
---|---|---|
verbose | Displays the detail information of domain name suffixes. | - |
Usage Guidelines
You can run the display dns domain command to view the configuration and sequence of domain name suffixes.
Example
# Display the list of domain name suffixes.
<Huawei> display dns domain
Type:
D:Dynamic S:Static
NO. Type Domain name TTL
1 S com -
2 S net -
Item |
Description |
---|---|
NO. |
Domain name suffix numbers, that is, the configuration sequence of domain name suffixes. |
Type |
Domain name suffixes type, including dynamic and static domain name suffix. |
Domain name |
Configured domain name suffix. In this example, two domain name suffixes are displayed. During DNS resolution, the first suffix "com" is added and sent to the DNS server. If the DNS server gives no response, the query message is resent. If the DNS server still gives no response, the query message is resent for a third time. If the DNS server still does not respond, the second suffix "net" is added and sent to the DNS server for searching for the mapped address. |
TTL |
Domain name suffix TTL. |
display dns dynamic-host
Function
The display dns dynamic-host command displays dynamic DNS entries saved in the domain name cache.
Parameters
Parameter |
Description |
Value |
---|---|---|
ip |
Specifies the Class-A and PTR query dynamic DNS entries. |
- |
naptr |
Specifies the NAPTR query dynamic DNS entries. |
- |
srv |
Specifies the SRV query dynamic DNS entries. |
- |
domain-name |
Specifies the dynamic DNS entries of a domain name. |
The value must be an existing domain name suffix. |
Usage Guidelines
You can run the display dns dynamic-host command to view dynamic DNS entries saved in the domain name cache and check whether domain names match the mapping entries.
Example
# Display the dynamic DNS entries saved in the domain name cache.
<Huawei> display dns dynamic-host
Host TTL Type Address
sipx.autosrv.com 114 IP 192.168.1.1
sip.autosrv.com 237 IP 192.168.1.2
sip.autonaptr.com 117 IP 192.168.1.3
_sip._tcp.autosrv.com 55 SRV 0 0 0 sipx.autosrv.com
0 0 0 sip.autosrv.com
autonaptr.com 0 NAPTR 101 10 A SIP+D2T sip.autona
Total : 5
Item |
Description |
---|---|
Host |
Domain name.
|
TTL |
Time left before dynamic DNS entries saved in the cache age out, in seconds. |
Type |
Query type:
|
Address |
IP address mapping the domain name.
|
display dns forward table
Function
The display dns forward table command displays the DNS forwarding table, including the mapping entry of the source IP address in a specified DNS query message.
Usage Guidelines
After DNS proxy or DNS relay is enabled, you can run the display dns forward table command to view the DNS table of IP addresses.
When the device receives DNS request packets from the client but does not receive DNS reply packets from the server, you need to run the display dns forward table command to view the DNS forwarding table.
Example
# Display the DNS table on the DNS proxy or DNS relay.
<Huawei> display dns forward table Domain name : www.domain.com Source IP : 10.136.128.53 Source port : 2055 Source packet id : 3562 Forward packet id : 60669 Query type : 1 VPN-Instance : vpna
Item |
Description |
---|---|
Domain name |
Domain name. |
Source IP |
IP address of the client. |
Source port |
Port number of the client. |
Source packet id |
ID of the request packet from the client. |
Forward packet id |
ID of the forwarded packet, which corresponds to the ID of the request packet from the client. |
Query type |
Query type:
|
VPN-Instance | Name of the VPN instance that the DNS client belongs to. |
display dns statistics
Usage Guidelines
You can use this command to check statistics on DNS packets, including the DNS IPv4 and IPv6 addresses.
Example
# Display statistics on DNS packets.
<Huawei> display dns statistics
SumFromDNSv4Client : 0
SumToDNSv4Client : 0
SumFromDNSv4Server : 0
SumToDNSv4Server : 0
SumFromDNSv6Client : 0
SumToDNSv6Client : 0
SumFromDNSv6Server : 0
SumToDNSv6Server : 0
RetryFromClient : 0
NotQueryFromClient : 0
ParseFailFromClient : 0
TooLongFromClient : 0
LocalQueryFromClient : 0
NotStandardQueryFromClient : 0
NotRespFromServer : 0
NoAnswerFromServer : 0
ParseFailFromServer : 0
TooLongFromServer : 0
ErrorRespFromServer : 0
NotStandardQueryFromServer : 0
ResolvePolicyRuleDeny : 0
Item |
Description |
---|---|
SumFromDNSv4Client |
Total number of packets sent from IPv4 DNS clients. |
SumToDNSv4Client |
Total number of packets sent to IPv4 DNS clients. |
SumFromDNSv4Server |
Total number of packets sent from IPv4 DNS servers. |
SumToDNSv4Server |
Total number of packets sent to IPv4 DNS servers. |
SumFromDNSv6Client |
Total number of packets sent from IPv6 DNS clients. |
SumToDNSv6Client |
Total number of packets sent to IPv6 DNS clients. |
SumFromDNSv6Server |
Total number of packets sent from IPv6 DNS servers. |
SumToDNSv6Server |
Total number of packets sent to IPv6 DNS servers. |
RetryFromClient |
Number of packets retransmitted from clients. |
NotQueryFromClient |
Number of non-query packets sent from clients. |
ParseFailFromClient |
Number of packets that failed to be parsed and are sent from clients. |
TooLongFromClient |
Number of packets longer than 512 bytes sent from clients. |
LocalQueryFromClient |
Number of query packets of which the source address is a local address and sent from clients. |
NotStandardQueryFromClient |
Number of nonstandard query packets sent from clients. |
NotRespFromServer |
Number of non-response packets sent from servers. |
NoAnswerFromServer |
Number of response packets of which the ANCOUNT field is 0 and sent from servers. |
ParseFailFromServer |
Number of packets that failed to be parsed and are sent from servers. |
TooLongFromServer |
Number of packets longer than 512 bytes sent from servers. |
ErrorRespFromServer |
Number of error response packets sent from servers. |
NotStandardQueryFromServer |
Number of nonstandard query packets sent from servers. |
ResolvePolicyRuleDeny |
Times of resolve policy rule deny. |
display dns server
Function
The display dns server command displays the configuration and sequence of the current DNS server.
Parameters
Parameter | Description | Value |
---|---|---|
verbose | Displays detailed information about the DNS server. | - |
Usage Guidelines
After configuring DNS, run the display dns server command to view the configuration and sequence of current DNS servers.
Example
# Display configurations of a DNS server.
<Huawei> display dns server
Type:
D:Dynamic S:Static
IPv4 DNS server :
NO. Type Status Used IP Address
0 S - Yes 10.1.1.1
1 S - Yes 10.1.1.2
2 D Up Yes 10.1.1.2
3 D Up Yes 10.1.1.3
IPv6 DNS servers :
NO. Type Status Used IPv6 Address Interface
0 S - Yes FC00:1::1 -
1 D - Yes FC00:1::1 -
2 D - Yes FC00:1::2 -
Item |
Description |
---|---|
Type |
Configuration type of the DNS server IP address, including dynamic and static. |
IPv4 DNS server |
IPv4 DNS server configuration. |
NO. |
DNS server number, indicating the order in which they were configured. |
Status |
DNS server status. |
Used |
Indicates whether the DNS server is used. |
IP Address |
IPv4 address of the DNS server. |
IPv6 Address |
IPv6 address of the DNS server. |
IPv6 DNS servers |
IPv6 DNS server configuration. |
Interface |
Name of the outbound interface communicating with the DNS server. |
display ip host
ddns policy
Function
The ddns policy command creates a DDNS policy and enters the DDNS policy view.
The undo ddns policy command deletes a DDNS policy.
By default, no DDNS policy is created in the system.
Parameters
Parameter | Description | Value |
---|---|---|
policy-name | Specifies the name of the DDNS policy. | The value is a string of 1 to 32 case-sensitive characters without spaces. |
Usage Guidelines
DNS provides static mappings between domain names and IP addresses. When IP addresses of nodes change, DNS cannot dynamically update mappings. If a DNS client uses the original domain name to access the node, the DNS client will fail to access the node because the IP address mapping the domain name is incorrect. The DDNS updates the mappings between the domain name and the IP address on the DNS server to ensure that the IP address can be resolved correctly. The device can function as a DDNS client. When the IP address of the interface that provides services changes, the device sends a request of updating the domain name entry to the DDNS server. After receiving the request, the DDNS server updates the domain name entry.
dns domain
Function
The dns domain command configures a domain name suffix of a server or a host on a DNS client that the DNS client wants to access.
The undo dns domain command deletes a configured domain name suffix from a DNS client.
By default, no domain name suffix is configured on a DNS client.
Parameters
Parameter | Description | Value |
---|---|---|
domain-name | Specifies a domain name suffix on a DNS Client. | The value is a string of 1 to 64 characters, spaces not supported. The string is a combination of digits, letters, underscores (_), dots (.), and hyphen (-). |
Usage Guidelines
Application Scenario
- If the entered domain name does not carry dots (.), for example, "huawei", the system first adds the suffix com.cn to the domain name and sends a domain name request of "huawei.com.cn" to the DNS server to find the IP address corresponding to the domain name. If the DNS client does not receive any response from the server, it sends a domain name request of "huawei" to the DNS server to find the IP address corresponding to the domain name.
- If the entered domain name carries dots (.), for example, "ilite.huawei", the system first sends a domain name request of "ilite.huawei" to the DNS server to find the IP address corresponding to the domain name. If the DNS client does not receive any response from the server, it adds the suffix com.cn to the domain name and sends a domain name request of "ilite.huawei.com.cn" to the DNS server to find the IP address corresponding to the domain name.
Precautions
A DNS client supports a maximum of 10 domain name suffixes. To configure multiple domain name suffixes, you can run the dns domain command repeatedly.
If the name of the suffix to be deleted is specified, the specified suffix is deleted. Otherwise, all the suffixes are deleted.
dns forward retry-number
Function
The dns forward retry-number command sets the number of times for the device to retransmit query requests to the destination DNS server.
The undo dns forward retry-number command restores the default retransmission count.
By default, the retransmission count is 2.
Usage Guidelines
The mode for a device to select the destination DNS server can be auto and fixed. For how a device sends DNS request packets to the destination DNS server in each mode and the corresponding precautions, see dns-server-select-algorithm.
If the number of times for the device to retransmit DNS request packets to each destination DNS server is relatively large and the packet retransmission timeout period is relatively long, the time for the DNS client to wait for the response from the DNS server is too long. However, the request timeout period of the DNS client is shorter, so that the DNS client fails to properly receive response packets from the server. To enable the DNS server to rapidly respond DNS request packets, you can run the dns forward retry-number and dns forward retry-timeout commands to adjust the number of times for the device to retransmit DNS request packets to each DNS server and the packet retransmission timeout period for ensuring that the DNS client can properly receive response packets from the server.
- When the mode for a device to select the destination DNS server is auto, the query timeout period of a DNS device is calculated as follows: (Number of retransmission times + 1) x Retransmission timeout period
- When the mode for a device to select the destination DNS server is fixed, the query timeout period of a DNS device is calculated as follows: (Number of retransmission times + 1) x Retransmission timeout period x Number of DNS servers
dns forward retry-timeout
Function
The dns forward retry-timeout command sets the retransmission timeout period that the device sends Query packets to the destination DNS server.
The undo dns forward retry-timeout command restores the default retransmission timeout period.
By default, the retransmission timeout period for which the device sends DNS query requests to the destination DNS server is 3 seconds.
Usage Guidelines
The mode for a device to select the destination DNS server can be auto and fixed. For how a device sends DNS request packets to the destination DNS server in each mode and the corresponding precautions, see dns-server-select-algorithm.
If the number of times for the device to retransmit DNS request packets to each destination DNS server is relatively large and the packet retransmission timeout period is relatively long, the time for the DNS client to wait for the response from the DNS server is too long. However, the request timeout period of the DNS client is shorter, so that the DNS client fails to properly receive response packets from the server. To enable the DNS server to rapidly respond DNS request packets, you can run the dns forward retry-number and dns forward retry-timeout commands to adjust the number of times for the device to retransmit DNS request packets to each DNS server and the packet retransmission timeout period for ensuring that the DNS client can properly receive response packets from the server.
- When the mode for a device to select the destination DNS server is auto, the query timeout period of a DNS device is calculated as follows: (Number of retransmission times + 1) x Retransmission timeout period
- When the mode for a device to select the destination DNS server is fixed, the query timeout period of a DNS device is calculated as follows: (Number of retransmission times + 1) x Retransmission timeout period x Number of DNS servers
dns proxy enable
Function
The dns proxy enable command enables DNS proxy.
The undo dns proxy enable command disables DNS proxy.
By default, DNS proxy is disabled.
Usage Guidelines
DNS proxy is used to forward DNS requests and reply packets between the DNS client and DNS server. The DNS client sends a DNS request packet to the device on which DNS proxy is enabled. The device sends the request packet to the DNS server and sends the reply packet to the DNS client. The device functions as the DNS proxy to provide services of the DNS server. Users do not need to interact with the DNS server directly. This function simplifies route deployment and improves performance and security of the DNS server.
dns proxy sip-info insert-mode decompression-domain-name
Function
The dns proxy sip-info insert-mode decompression-domain-name command inserts SIP server information to DNS response packets in domain name decompression mode when the device functions as a DNS proxy.
The undo dns proxy sip-info insert-mode decompression-domain-name command restores the default insert mode.
By default, the domain name decompression mode is not used.
Format
dns proxy sip-info insert-mode decompression-domain-name
undo dns proxy sip-info insert-mode decompression-domain-name
Usage Guidelines
This command applies only to the Branch Exchange Survivable Telephony (BEST) solution. In the BEST solution, the phone functions as the DNS client and the device functions as the DNS proxy. When the DNS client initiates an SRV query, the device inserts SIP server information to the DNS response packet. For example, when a Cisco phone is used and the dns proxy sip-info insert-mode decompression-domain-name command is not used to insert SIP server information to DNS response packets in domain name decompression mode, the phone cannot resolve DNS response packets that have SIP server information inserted.
dns relay enable
Function
The dns relay enable command enables DNS relay.
The undo dns relay enable command disables DNS relay.
By default, DNS relay is disabled.
Usage Guidelines
DNS relay is used to forward DNS requests and reply packets between the DNS client and DNS server. The DNS client sends a DNS request packet to the device on which DNS relay is enabled. The device sends the request packet to the DNS server and sends the reply packet to the DNS client. The device functions as the DNS relay to provide services of the DNS server. Users do not need to interact with the DNS server directly. This function simplifies route deployment and improves performance and security of the DNS server.
dns resolve
Function
The dns resolve command enables dynamic DNS resolution.
The undo dns resolve command disables dynamic DNS resolution.
By default, the dynamic DNS resolution is disabled.
dns server
Function
The dns server command configures an IP address for a DNS server.
The undo dns server command deletes the DNS server IP address.
By default, no DNS server IP address is configured.
Parameters
Parameter |
Description |
Value |
---|---|---|
ip-address |
Specifies the IP address of a DNS server. |
The value is in dotted decimal notation. |
track nqa admin-name test-name |
Specifies the NQA test instance to be associated with the DNS server.
|
The value is a string of 1 to 32 case-sensitive characters without any space. |
Usage Guidelines
Usage Scenario
A maximum of six DNS servers can be specified on Router. During dynamic DNS resolution, query messages are sent to DNS servers based on the configuration sequence of DNS servers.
The system sends a query to the DNS server first configured. If no response is received in the specified period of time (which can be configured by running the command dns forward retry-timeout), it resends the query twice. If receiving no response for the specified times (which can be configured by running the command dns forward retry-number), the system sends the query to the DNS server second configured and so on.
Prerequisites
- Configuring and starting an NQA test instance of the DNS type
Run the system-view command to enter the system view.
Run the nqa test-instance admin-name test-name command to create an NQA test instance and enter the test instance view.
Run the test-type dns command to configure the test type to DNS.
Run the dns-server ipv4 ip-address command to configure the DNS server address.
Run the destination-address url urlstring command to configure the destination host name.
Run the frequency interval command to set the automatic test interval for the NQA test instance.
Run the start command to start the NQA test instance.
An NQA test instance can be started immediately, at a specified time, or after a specified delay.
Run the start now [ end { at [ yyyy/mm/dd ] hh:mm:ss | delay { seconds second | hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ] command to start the test instance immediately.
Run the start at [ yyyy/mm/dd ] hh:mm:ss [ end { at [ yyyy/mm/dd ] hh:mm:ss | delay { seconds second | hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ] command to start the test instance at a specified time.
Run the start delay { seconds second | hh:mm:ss } [ end { at [ yyyy/mm/dd ] hh:mm:ss | delay { seconds second | hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ] command to start the test instance after a specified delay.
- Configuring and starting an NQA test instance of the ICMP type
Run the system-view command to enter the system view.
Run the nqa test-instance admin-name test-name command to create an NQA test instance and enter the test instance view.
Run the test-type icmp command to configure the test type to ICMP.
Run the destination-address ipv4 ipv4-address command to configure the destination IP address.
Run the frequency interval command to set the automatic test interval for the NQA test instance.
Run the start command to start the NQA test instance.
An NQA test instance can be started immediately, at a specified time, or after a specified delay.
Run the start now [ end { at [ yyyy/mm/dd ] hh:mm:ss | delay { seconds second | hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ] command to start the test instance immediately.
Run the start at [ yyyy/mm/dd ] hh:mm:ss [ end { at [ yyyy/mm/dd ] hh:mm:ss | delay { seconds second | hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ] command to start the test instance at a specified time.
Run the start delay { seconds second | hh:mm:ss } [ end { at [ yyyy/mm/dd ] hh:mm:ss | delay { seconds second | hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ] command to start the test instance after a specified delay.
dns server vpn-instance
Function
The dns server vpn-instance command configures the device to send DNS query requests to the DNS server on a specified VPN network.
The undo dns server vpn-instance command disables the device from sending DNS query requests to the DNS server on a specified VPN network.
By default, the device can only send DNS query requests to the DNS server on a public network.
Parameters
Parameter | Description | Value |
---|---|---|
vpn-instance-name | Specifies a VPN instance name. | It must be the name of an existing VPN instance. |
Usage Guidelines
If an interface on the device and the DNS server have reachable routes to each other and the interface is on a VPN network, the device must use the DNS server on the VPN network for DNS query so that DNS packets can be exchanged properly.
Example
# Configure the device to send DNS query requests to the DNS server on the VPN network vpn1.
<Huawei> system-view [Huawei] ip vpn-instance vpn1 [Huawei-vpn-instance-vpn1] ipv4-family [Huawei-vpn-instance-vpn1-af-ipv4] quit [Huawei-vpn-instance-vpn1] quit [Huawei] dns server vpn-instance vpn1
dns server source-ip
Function
The dns server source-ip command configures the source IP address for the device to send and receive DNS packets.
The undo dns server source-ip command deletes the source IP address for the device to send and receive DNS packets.
By default, no source IP address is configured for the device.
Usage Guidelines
Usage Scenario
When the device sends and receives DNS packets, the administrator can specify a source IP address for the device to ensure the communication security. The route from the DNS server to the specified source IP address must be reachable. The DNS server uses the specified source IP address as the destination address and sends a DNS response packet to the local device.
When the device functions as a DNS proxy or relay, run the dns server source-ip ip-address command to configure the source IP address for communicating with the DNS server.
Precautions
To make the command take effect, pay attention to the following points:
Ensure that the source IP address is the IP address of an interface or logical interface on the device, and there are reachable routes between the interface and the DNS server.
Ensure that the source IP address and the IP address of the DNS server are on the same VPN or public network.
dns-server-select-algorithm
Function
The dns-server-select-algorithm command configures the DNS server selection mode of the device.
The undo dns-server-select-algorithm command restores the default setting.
By default, the device selects a DNS server in auto mode.
Usage Guidelines
- auto: The device uses the internal algorithm to calculate the priorities of all configured DNS servers (IP addresses of DNS servers can be configured by running the dns server command), and then sends a DNS query request to the DNS server with the highest priority. If no response is received within a specified period of time, the device retransmits the DNS query request. If the device still does not receive a response from the DNS server after sending query requests multiple times, the device sends the DNS query request to the next server in sequence until it receives a response or has sent to all of the configured DNS servers.
- fixed: The device sends a DNS query request to the first DNS server. If no response is received within a specified period of time, the device retransmits the DNS query request. If the device still does not receive a response from the DNS server after sending query requests multiple times, the device sends the DNS query request to the next server in sequence until it receives a response or has sent to all of the configured DNS servers.
This function is supported when the device functions as a DNS client or DNS proxy/relay.
This function is supported only for DNS query requests sent by IPSec, voice, PKI, or DDNS services.
- The DNS server selection mode is not supported for DNS query requests sent by other services. The device sends the requests according to the order in which DNS servers are configured. If no response is received, the device retransmits the requests according to the order in which DNS servers are configured.
dns spoofing
Function
The dns spoofing command enables DNS spoofing and specifies an IP address in response messages.
The undo dns spoofing command disables DNS spoofing.
By default, DNS spoofing is disabled.
Parameters
Parameter | Description | Value |
---|---|---|
ip-address | Specifies an IP address in response messages. | The value is in dotted decimal notation. |
Usage Guidelines
If the DNS server address or route to the DNS server is not configured on the DNS proxy or relay, you can enable DNS spoofing on the device to spoof a response message with the configured IP address. Currently, DNS spoofing takes effect for only Class-A query (IP address query based on domain names).
If you run the dns spoofing command multiple times, only the latest configuration takes effect.
interval (DDNS policy view)
Function
The interval command sets the interval for sending DDNS update requests after the DDNS update is enabled.
The undo interval command restores the default setting.
By default, the interval for sending DDNS update requests is 3600 seconds.
Parameters
Parameter | Description | Value |
---|---|---|
interval-time | Specifies interval for sending DDNS update requests. | The value is an integer that ranges from 60 to 31536000, in seconds. |
Usage Guidelines
Usage Scenario
After the interval for sending DDNS update requests is set in the configured DDNS policy, the device is triggered to send DDNS update requests at the specified intervals. All the mappings between IP addresses and domain names defined in the DDNS policy are updated.
Precautions
If you run the interval command multiple times, only the latest configuration takes effect.
Regardless of whether the interval is reached, the device sends DDNS update requests immediately as long as the primary IP address of the corresponding interface changes or the link status of the interface changes from Down to Up.
If the interval is changed, the device is triggered to send a DDNS update request immediately.
When a device is connected to the DDNS server supporting www.oray.cn, this command does not take effect and the device initiates a DDNS update request at a fixed interval of 60 seconds.
ip host
Function
The ip host command configures static DNS entries.
The undo ip host command deletes static DNS entries.
By default, no static DNS entries are configured.
Parameters
Parameter | Description | Value |
---|---|---|
host-name | Specifies the host name. |
The value is a string of 1 to 255 case-sensitive characters without spaces. |
ip-address | Specifies the IP address mapping the host name. |
The value is in dotted decimal notation. |
Usage Guidelines
Usage Scenario
A static domain name resolution table is manually set up using the ip host command, describing the mappings between host names and IP addresses. In addition, some common host names are added to the table. Then, static host name resolution can be performed according to the static domain name resolution table. When requiring the IP address corresponding to a host name, the client first searches the static host name resolution table for the specified host name and obtains the corresponding IP address. In this manner, the efficiency of host name resolution is improved.
Precautions
The ip host command configures a maximum of 50 static DNS entries. Each host name can be mapped to only one IP address. When multiple IP addresses are mapped to a host name, only the latest configuration takes effect.
method (DDNS policy view)
Function
The method command sets the update mode for the device functioning as a DDNS client.
The undo method command restores the default update mode for the device functioning as a DDNS client.
By default, the update mode is vendor-specific for the device functioning as the DDNS client.
Parameters
Parameter |
Description |
Value |
---|---|---|
ddns [ both ] |
Indicates that the update mode is ddns (defined by the RFC2136) for the device functioning as a DDNS client. If both is specified, both Class-A and PTR query records are updated. If both is not specified, only Class-A query records are updated
|
- |
http |
Indicates that the update mode is http for the device functioning as a DDNS client. After this parameter is specified, the DDNS client can communicate with a common DDNS server through HTTP. |
- |
vendor-specific |
Indicates that the update mode is vendor-specific for the device functioning as a DDNS client. After this parameter is specified, the DDNS client can communicate with the DDNS servers provided at www.3322.org, www.dyndns.com, and www.oray.cn. |
- |
Usage Guidelines
- DDNS update mode (defined by the RFC2136): The DDNS client dynamically updates the mapping between domain names and IP addresses on the DNS server. To configure this mode, specify the ddns parameter.
- Update mode implemented through the DDNS server: The DDNS client
sends the mapping between domain names and IP addresses to the DDNS
server with a specified URL. The DDNS server then informs the DNS
server to dynamically update the mapping between domain names and
IP addresses. To configure this mode, specify the http or vendor-specific parameter.
- To use the Siemens DDNS server or DDNS server provided at www.3322.org, www.dyndns.com, or www.oray.cn, specify the vendor-specific parameter.
- To use an HTTP-based common DDNS server, specify the http parameter.
Security risks exist if the update mode for the device functioning as a DDNS client is set to http or vendor-specific. It is recommended that you set the update mode to ddns.
Example
# Set the update mode of the device functioning as the DDNS client to DDNS, and update Class-A and PTR query records.
<Huawei> system-view [Huawei] ddns policy mypolicy [Huawei-ddns-policy-mypolicy] method ddns both
# Restore the default update mode for the device functioning as the DDNS client.
<Huawei> system-view [Huawei] ddns policy mypolicy [Huawei-ddns-policy-mypolicy] undo method
name-server (DDNS policy view)
Function
The name-server command configures a DNS server to receive update messages from a DDNS client when the device functions as the DDNS client and the update mode is DDNS.
The undo name-server command cancels the DNS server configured for receiving update messages from the DDNS client.
By default, no DNS server is configured to receive update messages from a DDNS client when the device functions as the DDNS client and the update mode is DDNS.
Parameters
Parameter |
Description |
Value |
---|---|---|
name-server |
Specifies the DNS server for receiving update messages from the DDNS client. |
The value is a string of 1 to 128 case-sensitive characters without spaces. The value can be a domain name or an IP address. |
vpn-instance vpn-instance-name |
Specifies the name of a VPN instance. |
The value is a string of 1 to 31 characters. The value must be the name of an existing VPN instance. |
Usage Guidelines
Usage Scenario
When the device functions as a DDNS client and the update mode is DDNS, you can run the name-server command to configure a DNS server to receive update messages from the DDNS client. After receiving the update request packets, the DNS server updates the mapping between the domain name and IP address of the DDNS client. When deploying a DNS server on a private network, you need to specify the name of the VPN instance to which the DNS server belongs.
Prerequisites
The update mode of the device functioning as a DDNS client has been set to DDNS using the method (DDNS policy view) command.
Example
# Configure the DNS server with the domain name ns.huawei.com to receive update messages from a DDNS client when the device functions as the DDNS client and the update mode is DDNS.
<Huawei> system-view [Huawei] ddns policy mypolicy [Huawei-ddns-policy-mypolicy] method ddns [Huawei-ddns-policy-mypolicy] name-server ns.huawei.com
reset ddns policy
reset dns dynamic-host
Function
The reset dns dynamic-host command deletes dynamic DNS entries saved in the domain name cache.
reset dns forward table
reset dns statistics
ssl-policy (ddns-policy-view)
Function
The ssl-policy command binds an SSL policy to a DDNS policy.
The undo ssl-policy command deletes an SSL policy from a DDNS policy.
By default, no SSL policy is bound to a DDNS policy.
Usage Guidelines
Usage Scenario
When the device functions as the DDNS client and communicates with a Siemens DDNS server, the device needs to encrypt packets using SSL. An SSL policy needs to be bound to the DDNS policy.
Prerequisites
An SSL policy has been created using the ssl policy policy-name [ type { client | server } ] command, and PKI domain to be used by the SSL policy has been configured using the pki-realm realm-name command.
A DDNS policy has been created using the ddns policy command and a URL has been configured for Siemens DDNS server using the url command.
Precautions
An SSL policy needs to be bound to the DDNS policy only when the device functions as the DDNS client and communicates with a Siemens DDNS server.
Example
# Bind an SSL policy to a DDNS policy.
<Huawei> system-view [Huawei] pki realm abc [Huawei] ssl policy siemens type client [Huawei-ssl-policy-siemens] pki-realm abc [Huawei-ssl-policy-siemens] quit [Huawei] ddns policy huawei [Huawei-ddns-policy-huawei] url https://192.168.36.67/nic/update?group=med&user=huawei_test&password=12345&myip=192.168.19.2 [Huawei-ddns-policy-huawei] ssl-policy siemens
url (DDNS policy view)
Function
The url command specifies the URL in DDNS update requests.
The undo url command deletes the URL in DDNS update requests.
By default, no URL is specified in DDNS update requests on the device.
Parameters
Parameter |
Description |
Value |
---|---|---|
request-url |
Specifies the URL in DDNS update requests. |
The value is a string case-sensitive characters without spaces and ranges from 20 to 256 characters.
|
username username password password |
Specifies the user name and password for logging in to the DDNS server. NOTE:
To ensure password security, you are advised to run the username username password password command to configure a user name and password. The password information in the configuration file is displayed in cipher text. |
|
Usage Guidelines
Usage Scenario
After a DDNS policy is created, enter the URL and specify a DDNS server in the URL.
- If username username password password is not specified,
- When the device uses HTTP to communicate with the DDNS server
provided at www.3322.org, the URL in a DDNS update request is:
http://username:password@members.3322.org/dyndns/update?system=dyndns&hostname=<h>&myip=<a>
- When the device uses HTTP to communicate with the DDNS server
provided at www.dyndns.com, the URL in a DDNS update request is:
http://username:password@update.dyndns.com/nic/update?hostname=<h>&myip=<a>
- When the device uses TCP to communicate with the DDNS server provided
at www.oray.cn, the URL in a DDNS update request is:
oray://username:password@phddnsdev.oray.net
- When the device uses HTTP to communicate with a common DDNS server,
the URL in a DDNS update request is:
http://username:password@merri.s.dnaip.fi/reg/h=<h>&a=<a>
In the preceding URLs, username and password indicate the user name and password for logging in to the DDNS server. For example, in http://huawei1:huawei2@merri.s.dnaip.fi/reg/h=<h>&a=<a>, huawei1 and huawei2 indicate the user name and password for logging in to the DDNS server.
- When the device uses HTTP to communicate with the DDNS server
provided at www.3322.org, the URL in a DDNS update request is:
- When username username password password is specified,
- When the device uses HTTP to communicate with the DDNS server
provided at www.3322.org, the URL in a DDNS update request is:
http://<username>:<password>@members.3322.org/dyndns/update?system=dyndns&hostname=<h>&myip=<a>
- When the device uses HTTP to communicate with the DDNS server
provided at www.dyndns.com, the URL in a DDNS update request is:
http://<username>:<password>@update.dyndns.com/nic/update?hostname=<h>&myip=<a>
- When the device uses TCP to communicate with the DDNS server provided
at www.oray.cn, the URL in a DDNS update request is:
oray://<username>:<password>@phddnsdev.oray.net
- When the device uses HTTP to communicate with a common DDNS server,
the URL in a DDNS update request is:
http://<username>:<password>@merri.s.dnaip.fi/reg/h=<h>&a=<a>
In the preceding URLs, <username> and <password> are fixed formats, which cannot be modified.
- When the device uses HTTP to communicate with the DDNS server
provided at www.3322.org, the URL in a DDNS update request is:
Where,
The URL uses the default port number. The default port number of the DDNS server provided at www.oray.cn is 6060, the default HTTP port number is 80 and the default HTTPS port number is 443.
The FQDN and IP address cannot be specified in the URL for the DDNS server provided at www.oray.cn. You can specify the FQDN when applying a DDNS policy on an interface. The IP address in the URL is the primary IP address of the interface to which a DDNS policy is applied.
To prevent configuration errors, you are advised not to change <h> or <a> in the URL. The device automatically fills in <h> and <a> based on the FQDN specified when a DDNS policy is bound to the interface.
If you run the url command multiple times, only the latest configuration takes effect.
Precautions
In a URL, the user name and password are separated using :, the password and domain name are separated using @, and the domain name ends with /. Pay attention to the following points when using special characters in a URL.
Example
# Specify the URL of the DDNS update request, in which the password is displayed in cipher text.
<Huawei> system-view [Huawei] ddns policy mypolicy [Huawei-ddns-policy-mypolicy] url "http://<username>:<password>@members.3322.org/dyndns/update?system=dyndns&hostname=<h>&ip=<a>" username steven password nevets
# Delete the specified URL of the DDNS update request.
<Huawei> system-view [Huawei] ddns policy mypolicy [Huawei-ddns-policy-mypolicy] undo url
dns resolve policy a
Function
The dns resolve policy a command enables the DNS resolution policy function for class-A query requests and displays the DNS resolution policy view.
The undo dns resolve policy a command disables the DNS resolution policy function for class-A query requests.
By default, the DNS resolution policy function for class-A query requests is disabled.
Usage Guidelines
Usage Scenario
To control access traffic, the administrator requires that users can access only some websites on which they can browse only texts or pictures. For example, in Wi-Fi connection scenarios such as in metro or on bus, passengers can access only specified websites. If they attempt to access other websites, their access requests are rejected or redirected to the specified websites.
The administrator can run the dns resolve policy a command to enable the DNS resolution policy function for class-A query requests. Then only some specified domain names can be resolved to meet the wireless connection requirements.
Follow-up Procedure
Run the rule (DNS resolution policy view) command to configure a DNS resolution rule.
rule (DNS resolution policy view)
Function
The rule command configures a DNS resolution rule.
The undo rule command deletes the DNS resolution rule.
By default, no DNS resolution rule is configured.
Format
rule rule-id [ if-match name hostname ] { deny | permit | spoofing ip-address }
undo rule rule-id
Parameters
Parameter |
Description |
Value |
---|---|---|
rule-id | Specifies the DNS resolution rule ID. A smaller value indicates a higher rule priority. |
The value is an integer that ranges from 0 to 127. |
if-match name hostname | Specifies the domain name matching the DNS resolution rule. If this parameter is not configured, the DNS resolution rule matches all domain names. |
The value is a string of 1 to 255 case-insensitive characters without spaces. It supports the digits 0-9, letters, and the following symbols: - _ . *. The symbol * indicates the wildcard that can only be prefixed to the domain name once. For example, *.example.com indicates that all host names in example.com are matched. |
deny | Rejects the domain name resolution request matching the DNS resolution rule. |
- |
permit | Allows the domain name resolution request matching the DNS resolution rule. |
- |
spoofing ip-address | Specified the IP address of the spoofing response to the domain name resolution request matching the DNS resolution rule. A spoofing response uses the configured IP address as the domain name resolution result to respond to the domain name resolution request. The IP address may be directed to the local homepage (providing resources such as website navigation, local videos, and applications). |
The value is in dotted decimal notation. |
Usage Guidelines
Usage Scenario
After the DNS resolution policy function is enabled, you need to configure a resolution rule in the DNS resolution policy view to implement domain name resolution, resolution prohibition, and spoofing response for a specified domain name.
The administrator can run the rule command to configure a specified DNS resolution rule.
Prerequisites
The DNS resolution policy function for class-A query requests has been enabled and the DNS resolution policy view has been displayed using the dns resolve policy a command.
Precautions
- If the rule ID specified in rule-id already exists, the new rule overwrites the original rule no matter whether the new and original rules conflict with each other.
- If the specified rule-id does not exist, create a rule using the specified rule-id and determine the rule insertion position based on the rule size.
Example
# Add a rule with rule-id as 0 to the DNS resolution policy, and configure address spoofing based on the DNS resolution request for www.huawei.com with the spoofing response address 192.168.1.1.
<Huawei> system-view [Huawei] dns resolve policy a [Huawei-dns-resolve-policy-a] rule 0 if-match name www.huawei.com spoofing 192.168.1.1
- ddns apply policy
- display ddns interface
- display ddns policy
- display dns configuration
- display dns domain
- display dns dynamic-host
- display dns forward table
- display dns statistics
- display dns server
- display ip host
- ddns policy
- dns domain
- dns forward retry-number
- dns forward retry-timeout
- dns proxy enable
- dns proxy sip-info insert-mode decompression-domain-name
- dns relay enable
- dns resolve
- dns server
- dns server vpn-instance
- dns server source-ip
- dns-server-select-algorithm
- dns spoofing
- interval (DDNS policy view)
- ip host
- method (DDNS policy view)
- name-server (DDNS policy view)
- reset ddns policy
- reset dns dynamic-host
- reset dns forward table
- reset dns statistics
- ssl-policy (ddns-policy-view)
- url (DDNS policy view)
- dns resolve policy a
- rule (DNS resolution policy view)