H3C S5500-SI Series Ethernet Switches Command Manual(V1.01)

HomeSupportSwitchesH3C S5500 Switch SeriesReference GuidesCommand ReferencesH3C S5500-SI Series Ethernet Switches Command Manual(V1.01)
26-DNS Commands
Title Size Download
26-DNS Commands 43 KB

Chapter 1  DNS Configuration Commands

 

&  Note:

This document only covers IPv4 DNS configuration commands. For introduction to IPv6 DNS configuration commands, refer to IPv6 Commands

 

1.1  DNS Configuration Commands

1.1.1  display dns domain

Syntax

display dns domain [ dynamic ]

View

Any view

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 Description on fields of the 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

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 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 that a mapping can be stored in the cache (in seconds).

 

&  Note:

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.

 

1.1.3  display dns proxy table

Syntax

display dns proxy table

View

Any view

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

Source IP          Source Port  Trans ID     Server IP          Aging

192.168.0.98       1030         24580        192.168.111.244    35

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

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

 

1.1.4  display dns server

Syntax

display dns server [ dynamic ]

View

Any view

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     169.254.65.125

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

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

 

1.1.5  display ip host

Syntax

display ip host

View

Any view

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 Description on fields of the display ip host command

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 mappings between host names and IP addresses.

Flags

Indicates the mapping type, static or dynamic.

Static represents static domain name resolution.

Address

Host IP address

 

1.1.6  dns domain

Syntax

dns domain domain-name

undo dns domain [ domain-name ]

View

System view

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.

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

1.1.7  dns proxy enable

Syntax

dns proxy enable

undo dns proxy enable

View

System view

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

1.1.8  dns resolve

Syntax

dns resolve

undo dns resolve

View

System view

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

1.1.9  dns server

Syntax

dns server ip-address

undo dns server [ ip-address ]

View

System view

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.

Related commands: display dns server.

Examples

# Specify the DNS server 172.16.1.1.

<Sysname> system-view

[Sysname] dns server 172.16.1.1

1.1.10  ip host

Syntax

ip host hostname ip-address

undo ip host hostname [ ip-address ]

View

System view

Parameters

Hostname: Host name, consisting of 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 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

1.1.11  reset dns dynamic-host

Syntax

reset dns dynamic-host

View

User view

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