04-Layer 3 Command Reference

HomeSupportReference GuidesCommand ReferencesH3C WA Series Access Points Command References(R1507P09)-6W10104-Layer 3 Command Reference
08-DNS Commands
Title Size Download
08-DNS Commands 85.84 KB

display dns domain

Use display dns domain to display the domain name suffixes.

Syntax

display dns domain [ dynamic ] [ | { begin | exclude | include } regular-expression ]

Views

Any view

Default command level

1: Monitor level

Parameters

dynamic: Displays the domain name suffixes dynamically obtained through DHCP or other protocols.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Examples

# Display domain name suffixes.

<Sysname> display dns domain

 Type:

  D:Dynamic    S:Static

 

No.    Type   Domain-name

1      S      com

Table 1 Command output

Field

Description

No

Sequence number.

Type

Type of domain name suffix: S represents a statically configured domain name suffix, and D represents a domain name suffix obtained dynamically through DHCP.

Domain-name

Domain name suffix.

 

Related commands

dns domain

display dns host

Use display dns host to display the dynamic DNS cache information.

Syntax

display dns host [ ip | ipv6 | naptr | srv ] [ | { begin | exclude | include } regular-expression ]

Views

Any view

Default command level

1: Monitor level

Parameters

ip: Displays the dynamic cache information of type A queries. A type A query resolves a domain name to the mapped IPv4 address.

ipv6: Displays the dynamic cache information of type AAAA queries. A type AAAA query resolves a domain name to the mapped IPv6 address. For more information, see Layer 3 Configuration Guide.

naptr: Displays the dynamic cache information of NAPTR queries. A NAPTR query offers the replacement rule of a character string to convert the character string to a domain name.

srv: Displays the dynamic cache information of SRV queries. An SRV query offers the domain name of a certain service site.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Usage guidelines

If no parameter is specified, the dynamic DNS cache information of all query types is displayed.

Examples

# Display the dynamic DNS cache information of all query types.

<Sysname> display dns host

No.  Host                       TTL  Type  Reply Data

1    sample.com                 3132 IP    192.168.10.1

2    sample.net                 2925 IPv6  FE80::4904:4448

3    sip.sample.com             3122 NAPTR 100 10 u sip+E2U !^.*$!sip:info.se!i

4    website.tcp.sample.com     3029 SRV   10 10 8080 iis.sample.com

Table 2 Command output

Field

Description

No

Sequence number.

Host

Domain name for query.

TTL

Time that a mapping can be stored in the cache (in seconds).

Type

Query type, including IP, IPv6, NAPTR, and SRV.

Reply Data

Reply data concerning the query type:

·         For an IP query, the reply data is an IPv4 address.

·         For an IPv6 query, the reply data is an IPv6 address.

·         For a NAPTR query, the reply data comprises order, preference, flags, services, regular expression, and replacement.

·         For an SRV query, the reply data comprises the priority, weight, port, and target domain name.

 

Related commands

reset dns host

display dns server

Use display dns server to display the IPv4 DNS server information.

Syntax

display dns server [ dynamic ] [ | { begin | exclude | include } regular-expression ]

Views

Any view

Default command level

1: Monitor level

Parameters

dynamic: Displays the DNS server information dynamically obtained through DHCP or other protocols.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Examples

# Display the IPv4 DNS server information.

<Sysname> display dns server

 Type:

  D:Dynamic    S:Static

 

DNS Server  Type  IP Address

    1       S     169.254.65.125

Table 3 Command output

Field

Description

DNS Server

Sequence number of the DNS server, configured automatically by the device, starting from 1.

Type

Type of domain name server:

·         S—A manually configured DNS server.

·         D—A DNS server obtained dynamically through DHCP.

IP Address

IPv4 address of the DNS server.

 

Related commands

dns server

display ip host

Use display ip host to display the host names and corresponding IPv4 addresses in the static domain name resolution table.

Syntax

display ip host [ | { begin | exclude | include } regular-expression ]

Views

Any view

Default command level

1: Monitor level

Parameters

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Examples

# Display the host names and corresponding IPv4 addresses in the static domain name resolution table.

<Sysname> display ip host

Host         Age      Flags        Address

My           0        static       1.1.1.1

Aa           0        static       2.2.2.4

Table 4 Command output

Field

Description

Host

Host name.

Age

Time to live. The value of 0 means that the static mapping never ages out.

You can only manually remove the static mappings between host names and IPv4 addresses.

Flags

Indicates the mapping type.

Static represents static IPv4 domain name resolution.

Address

Host IPv4 address.

 

dns domain

Use dns domain to configure a domain name suffix. The system can automatically add the suffix to part of the domain name you entered for resolution.

Use undo dns domain to delete a domain name suffix (with a domain name suffix specified) or all domain name suffixes (with no domain name suffix specified).

Syntax

dns domain domain-name

undo dns domain [ domain-name ]

Default

No domain name suffix is configured. Only the provided domain name is resolved.

Views

System view

Default command level

2: System level

Parameters

domain-name: Domain name suffix, consisting of character strings separated by a dot (for example, aabbcc.com). Each separated string contains no more than 63 characters. A domain name suffix may include case-insensitive letters, digits, hyphens (-), underscores (_), and dots (.), with a total length of 238 characters.

Usage guidelines

The domain name suffix configured with the dns domain command is applicable to both IPv4 DNS and IPv6 DNS.

You can configure a maximum of 10 domain name suffixes.

Examples

# Configure com as a DNS suffix.

<Sysname> system-view

[Sysname] dns domain com

Related commands

display dns domain

dns resolve

Use dns resolve to enable dynamic domain name resolution.

Use undo dns resolve to disable dynamic domain name resolution.

Syntax

dns resolve

undo dns resolve

Default

Dynamic domain name resolution is disabled.

Views

System view

Default command level

2: System level

Usage guidelines

This command is applicable to both IPv4 DNS and IPv6 DNS.

Examples

# Enable dynamic domain name resolution.

<Sysname> system-view

[Sysname] dns resolve

dns server

Use dns server to specify a DNS server.

Use undo dns server to remove DNS servers.

Syntax

In system view:

dns server ip-address

undo dns server [ ip-address ]

In interface view:

dns server ip-address

undo dns server ip-address

Default

No DNS server is specified.

Views

System view, interface view

Default command level

2: System level

Parameters

ip-address: IPv4 address of the DNS server.

Usage guidelines

You can configure up to six DNS servers, including those with IPv6 addresses, in system view, and up to six DNS servers on all interfaces of a device.

A DNS server configured in system view has a higher priority than one configured in interface view. A DNS server configured earlier has a higher priority than one configured later in the same view. A DNS server manually configured has a higher priority than one dynamically obtained through DHCP.

Running the undo dns server command in system view deletes all DNS servers configured in system view and interface view. Running the undo dns server ip-address command in system view or interface view deletes the specified DNS server in system view or interface view.

Examples

# Specify the DNS server 172.16.1.1 in system view.

<Sysname> system-view

[Sysname] dns server 172.16.1.1

Related commands

display dns server

dns source-interface

Use dns source-interface to specify the source interface for DNS packets.

Use undo dns source-interface to restore the default.

Syntax

dns source-interface interface-type interface-number

undo dns source-interface

Default

No source interface for DNS packets is specified. The device uses the primary IP address of the output interface of the matching route as the source IP address of a DNS request.

Views

System view

Default command level

2. System level

Parameters

interface-type interface-number: Specifies the interface type and number.

Usage guidelines

The device uses the primary IP address of the specified source interface as the source IP address of a DNS request, which is still forwarded through the output interface of the matching route.

Examples

# Specify VLAN-interface 2 as the source interface of DNS requests.

<Sysname> system-view

[Sysname] dns source-interface vlan-interface2

ip host

Use ip host to create a host name to IPv4 address mapping in the static resolution table.

Use undo ip host to remove a mapping.

Syntax

ip host hostname ip-address

undo ip host hostname [ ip-address ]

Default

No mappings are created.

Views

System view

Default command level

2: System level

Parameters

hostname: Host name, consisting of 1 to 255 characters, including case-insensitive letters, numbers, hyphens (-), underscores (_), or dots (.). The host name must include at least one letter.

ip-address: IPv4 address of the specified host in dotted decimal notation.

Usage guidelines

Each host name can correspond to only one IPv4 address. The IPv4 address you last assign to the host name overwrites the previous one if there is any.

Examples

# Map the IP address 10.110.0.1 to the host name aaa.

<Sysname> system-view

[Sysname] ip host aaa 10.110.0.1

Related commands

display ip host

reset dns host

Use reset dns host to clear information of the dynamic DNS cache.

Syntax

reset dns host [ ip | ipv6 | naptr | srv ]

Views

User view

Default command level

2: System level

Parameters

ip: Clears the dynamic cache information of type A queries. A type A query resolves a domain name to the mapped IPv4 address.

ipv6: Clears the dynamic cache information of type AAAA queries. A type AAAA query resolves a domain name to the mapped IPv6 address. For more information, see Layer 3 Configuration Guide.

naptr: Clears the dynamic cache information of NAPTR queries. A NAPTR query offers the replacement rule of a character string to convert the character string to a domain name.

srv: Clears the dynamic cache information of SRV queries. An SRV query offers the domain name of a certain service site.

Usage guidelines

If no parameter is specified, this command clears the dynamic DNS cache information of all query types.

Examples

# Clear the dynamic DNS cache information of all query types.

<Sysname> reset dns host

Related commands

display dns host

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网