H3C S5500-SI Series Ethernet Switches Command Manual-Release 1205-(V1.03)

HomeSupportSwitchesH3C S5500 Switch SeriesReference GuidesCommand ReferencesH3C S5500-SI Series Ethernet Switches Command Manual-Release 1205-(V1.03)
25-DNS Command
Title Size Download
25-DNS Command 56 KB

Chapter 1  DNS Configuration Commands

1.1  DNS Configuration Commands

1.1.1  display dns domain

Syntax

display dns domain [ dynamic ]

View

Any view

Parameter

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 command: dns domain.

Example

# Display domain name suffixes.

<Sysname> display dns domain

 Type:

  D:Dynamic    S:Static

 

No.    Type   Domain-name

1      S      net

2      S      com

Table 1-1 Description on fields of display dns domain command

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

 

1.1.2  display dns dynamic-host

Syntax

display dns dynamic-host

View

Any view

Parameter

None

Description

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

After a successful domain name resolution, the DNS Client saves the result in the cache. In the case of a repeated domain name resolution request, the DNS Client first searches the cache for the mapping between the domain name and the IP address. If the mapping is cleared because of timeout, the DNS Client sends the domain name resolution request to the DNS server.

Example

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

<Sysname> display dns dynamic-host

No  Domain-name           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 Description on the field of the display dns dynamic-host command

Field

Description

No.

Sequence number

Domain-name

Domain name

IP Address

IP address for the corresponding domain name

TTL

Time for storing in the cache memory (s).

 

&  Note:

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

 

1.1.3  display dns server

Syntax

display dns server [ dynamic ]

View

Any view

Parameter

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 command: dns server.

Example

# Display the DNS Server information.

<Sysname> display dns server

 Type:

  D:Dynamic    S:Static

 

IPv4 DNS Servers :

Domain-server Type  IP Address

     1        S     169.254.65.125

 

IPv6 DNS Servers :

Domain-server Type  IPv6 Address                              (Interface Name)

 

     1        S     3001::2

Table 1-3 Description on fields of the display dns server command

Field

Description

Domain-server

Number of the DNS Server. Configured automatically by the device, starts from 1.

Servers with IPv4 or IPv6 addresses are numbered respectively.

Type

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

IP Address

IPv4 address of the DNS Server

IPv6 Address

IPv6 address of the DNS Server

Interface Name

Only available when the DNS Server is configured with an IPv6 address.

 

1.1.4  display ip host

Syntax

display ip host

View

Any view

Parameter

None

Description

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

Example

# Display the host names and corresponding IP addresses in the static domain name resolution resolving list.

<Sysname> display ip host

Host         Age     Flags       Address

My           0       static      1.1.1.1

Aa           0       static      2.2.2.4

Table 1-4 Description on fields of the display ip host command

Field

Description

Host

Host

Age

Time to live. 0 means that a static entry is never outdated.

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

Flags

Indicates the type of mappings between host names and IP addresses, static or dynamic.

Static is the type for static domain name resolution

Address

Host IP addresses

 

1.1.5  dns domain

Syntax

dns domain domain-name

undo dns domain [ domain-name ]

View

System view

Parameter

domain-name: DNS suffixes, comprises 1 to 238 characters, including case-insensitive letters, numbers, hyphens (-), underscores (_), and dots (.).

Description

Use the dns domain command to configure the DNS suffixes.

Use the undo dns domain command to delete the DNS suffixes.

No DNS suffixes are configured by default.

You can configure maximum 10 DNS suffixes. You must input the suffix name to delete it, otherwise, all the statically configured suffixes are deleted.

Related command: display dns domain.

Example

# Configure com as a DNS suffix.

<Sysname> system-view

[Sysname] dns domain com

1.1.6  dns resolve

Syntax

dns resolve

undo dns resolve

View

System view

Parameter

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.

Example

# Enable dynamic domain name resolution.

<Sysname> system-view

[Sysname] dns resolve

1.1.7  dns server

Syntax

dns server ip-address

undo dns server [ ip-address ]

View

System view

Parameter

ip-address: IP address of the DNS Server.

Description

Use the dns server command to configure an IP address to the DNS Server.

Use the undo dns server to remove IP addresses.

No IP address is configured to the DNS Server by default.

You can configure maximum 6 DNS Servers.

Related command: display dns server.

Example

# Configure a DNS Server address to 172.16.1.1.

<Sysname> system-view

[Sysname] dns server 172.16.1.1

1.1.8  ip host

Syntax

ip host hostname ip-address

undo ip host hostname [ ip-address ]

View

System view

Parameter

Hostname: Host name, comprises 1 to 20 characters, including case-insensitive letters, numbers, hyphens (-), 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 mapping between host name and IP address in the static resolving list.

Use the undo ip host command to remove the mapping.

No mappings are created by default.

You can configure only one mapping between IP address to host name. For example, a new mapping configured will overwrite the old one if there is any.

Related command: display ip host.

Example

# Configure IP address 10.110.0.1 to a host named aaa.

<Sysname> system-view

[Sysname] ip host aaa 10.110.0.1

1.1.9  reset dns dynamic-host

Syntax

reset dns dynamic-host

View

User view

Parameter

None

Description

Use the reset dns dynamic-host command to clear the cache.

Related command: display dns dynamic-host.

Example

# Clear the cache.

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