04-Layer 3 Command Reference

HomeSupportReference GuidesCommand ReferencesH3C WX Series Access Controllers Command References(R3308 R2308)-6W10704-Layer 3 Command Reference
04-DNS Commands
Title Size Download
04-DNS Commands 112.88 KB

display dns domain

Syntax

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

View

Any view

Default 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.

Description

Use display dns domain to display the domain name suffixes.

Related commands: dns domain.

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.

 

display dns host

Syntax

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

View

Any view

Default 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.

|: 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.

Description

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

Without any keyword specified, the dynamic DNS cache information of all query types will be displayed.

Related commands: reset dns host.

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

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 and IPv6.

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.

 

display dns server

Syntax

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

View

Any view

Default 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.

Description

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

Related commands: dns server.

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:

·     SA statically configured DNS server.

·     DA DNS server obtained dynamically through DHCP.

IP Address

IPv4 address of the DNS server.

 

display ip host

Syntax

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

View

Any view

Default 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.

Description

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

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. 0 means that the static mapping will never age 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

Syntax

dns domain domain-name

undo dns domain [ domain-name ]

View

System view

Default 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.

Description

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).

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

 

 

NOTE:

·     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.

 

Related commands: display dns domain.

Examples

# Configure com as a DNS suffix.

<Sysname> system-view

[Sysname] dns domain com

dns proxy enable

Syntax

dns proxy enable

undo dns proxy enable

View

System view

Default level

2: System level

Parameters

None

Description

Use dns proxy enable to enable DNS proxy.

Use undo dns proxy enable to disable DNS proxy.

By default, DNS proxy is disabled.

Examples

# Enable DNS proxy.

<Sysname> system-view

[Sysname] dns proxy enable

dns resolve

Syntax

dns resolve

undo dns resolve

View

System view

Default level

2: System level

Parameters

None

Description

Use dns resolve to enable dynamic domain name resolution.

Use undo dns resolve to disable dynamic domain name resolution.

Dynamic domain name resolution is disabled by default.

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

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

View

System view, interface view

Default level

2: System level

Parameters

ip-address: IPv4 address of the DNS server.

Description

Use dns server to specify a DNS server.

Use undo dns server to remove DNS servers.

No DNS server is specified by default.

Note the following:

·     You can configure up to six DNS servers, including those with IPv6 addresses, in system view, and up to six DNS servers on all the interfaces of the 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 will delete all DNS servers configured in system view and interface view. Running the undo dns server ip-address command in system view or interface view will delete the specific DNS server in system view or interface view.

Related commands: display dns server.

Examples

# Specify the DNS server 172.16.1.1 in system view.

<Sysname> system-view

[Sysname] dns server 172.16.1.1

ip host

Syntax

ip host hostname ip-address

undo ip host hostname [ ip-address ]

View

System view

Default 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.

Description

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.

No mappings are created by default.

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

Related commands: display ip host.

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

reset dns host

Syntax

reset dns host [ ip | ipv6 ]

View

User view

Default 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.

Description

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

Without any keyword specified, this command clears the dynamic DNS cache information of all query types.

Related commands: display dns host.

Examples

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

<Sysname> reset 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
新华三官网