02-IP Services Volume

HomeSupportSwitchesH3C S7500E Switch SeriesReference GuidesCommand ReferencesH3C S7500E Series Ethernet Switches Command Manual(Release 6300 series V1.03)02-IP Services Volume
04-DNS Commands
Title Size Download
04-DNS Commands 43.35 KB

 

This document only covers IPv4 DNS configuration commands. For introduction to IPv6 DNS configuration commands, refer to IPv6 Basics Commands in the IP Services Volume.

 

DNS Configuration Commands

display dns domain

Syntax

display dns domain [ dynamic ]

View

Any view

Default Level

1: Monitor level

Parameters

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

Description

Use the display dns domain command 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-1 display dns domain command output description

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 dynamic-host

Syntax

display dns dynamic-host

View

Any view

Default Level

1: Monitor level

Parameters

None

Description

Use the display dns dynamic-host command to display the information of the dynamic domain name resolution cache.

Examples

# Display the information of the dynamic domain name resolution cache.

<Sysname> display dns dynamic-host

No. Host                  IP Address           TTL

1   www.baidu.com         202.108.249.134      63000

2   www.yahoo.akadns.net  66.94.230.39         24

3   www.hotmail.com       207.68.172.239       3585

4   www.eyou.com          61.136.62.70         3591

Table 1-2 display dns dynamic-host command output description

Field

Description

No

Sequence number

Host

Domain name

IP Address

IP address for the corresponding domain name

TTL

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

 

A domain name in the display dns dynamic-host command contains 21 characters at most. If a domain name consists of more than 21 characters, only the first 21 characters are displayed.

 

display dns proxy table

Syntax

display dns proxy table

View

Any view

Default Level

1: Monitor level

Parameters

None

Description

Use the display dns proxy table command to display the DNS proxy table.

Examples

# Display the DNS proxy table.

<Sysname> display dns proxy table

Total entries: 1

Source IP          Source Port  Trans ID     Server IP          Aging

192.168.0.98       1030         24580        192.168.111.244    35

Table 1-3 display dns proxy table command output description

Field

Description

Source IP

Source IP address of the DNS request, that is, the IP address of the DNS client.

Source Port

Source port number of the DNS request

Trans ID

Transaction ID of the DNS request

Server IP

IP address of the DNS server

Aging

Aging time of the DNS proxy table entry in seconds

 

display dns server

Syntax

display dns server [ dynamic ]

View

Any view

Default Level

1: Monitor level

Parameters

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

Description

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

Related commands: dns server.

Examples

# Display the DNS server information.

<Sysname> display dns server

 Type:

  D:Dynamic    S:Static

 

DNS Server  Type  IP Address

    1       S     172.16.1.1

 

Table 1-4 display dns server command output description

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 represents a statically configured DNS server, and D represents a DNS server obtained dynamically through DHCP.

IP Address

IP address of the DNS server

 

display ip host

Syntax

display ip host

View

Any view

Default Level

1: Monitor level

Parameters

None

Description

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

Examples

# Display the host names and corresponding IP 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 1-5 display ip host command output description

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 IP addresses.

Flags

Indicates the mapping type.

Static represents static domain name resolution.

Address

Host IP 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 the dns domain command to configure a domain name suffix. The system can automatically add the suffix to part of the domain name you entered for resolution.

Use the undo dns domain command 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, that is, only the provided domain name is resolved.

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 the dns proxy enable command to enable DNS proxy.

Use the undo dns proxy enable command 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 the dns resolve command to enable dynamic domain name resolution.

Use the undo dns resolve command to disable dynamic domain name resolution.

Dynamic domain name resolution is disabled by default.

Examples

# Enable dynamic domain name resolution.

<Sysname> system-view

[Sysname] dns resolve

dns server

Syntax

dns server ip-address

undo dns server [ ip-address ]

View

System view

Default Level

2: System level

Parameters

ip-address: IP address of the DNS server.

Description

Use the dns server command to specify a DNS server.

Use the undo dns server to remove DNS server(s).

No DNS server is specified by default.

You can configure a maximum of six DNS servers, including those with IPv6 addresses.

Related commands: display dns server.

Examples

# Specify the DNS server 172.16.1.1.

<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 20 characters, including case-insensitive letters, numbers, hyphens (-), underlines (_), or dots (.). The host name must include at least one letter.

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

Description

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

Use the undo ip host command to remove a mapping.

No mappings are created by default.

You can configure only one mapping for a host name. A mapping newly configured for 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 dynamic-host

Syntax

reset dns dynamic-host

View

User view

Default Level

2: System level

Parameters

None

Description

Use the reset dns dynamic-host command to clear the dynamic domain name resolution information.

Related commands: display dns dynamic-host.

Examples

# Clear the dynamic domain name resolution information.

<Sysname> reset dns dynamic-host

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