H3C S3100-52P Ethernet Switch Command Manual-Release 1500(V1.01)

HomeSupportSwitchesH3C S3100 Switch SeriesReference GuidesCommand ReferencesH3C S3100-52P Ethernet Switch Command Manual-Release 1500(V1.01)
34-DNS Command
Title Size Download
34-DNS Command 58 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: Display the DNS suffixes dynamically configured by DHCP or other protocols.

Description

Use the display dns domain command to display the DNS suffixes.

Related command: dns domain.

Example

# Display DNS suffixes

<H3C> display dns domain

No         Domain-name

0          aaa.com

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

Field

Description

No

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.

The dynamic domain name resolution caches resent mappings between names and IP addresses. For the same domain name query, the DNS Client would not send to the DNS Server if it is stored in the cache.

Example

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

<H3C> display dns dynamic-host

No  Domain-name           IpAddress            TTL      Alias

0   www.baidu.com         202.108.249.134      63000

1   www.yahoo.akadns.net  66.94.230.39         24

2   www.hotmail.com       207.68.172.239       3585

3   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

Domain-name

IpAddress

IP address for the corresponding domain name

TTL

Time for storing in the cache memory (s).

Alias

Alias for the domain name, maximum 4

 

1.1.3  display dns server

Syntax

display dns server [ dynamic ]

View

Any view

Parameter

Dynamic: Display the DNS Server information configured by 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.

<H3C> display dns server

Domain-server        IpAddress

     0               169.254.65.125

     1               169.254.66.15

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

Servers with IPv4 or IPv6 addresses are numbered respectively.

IpAddress

IPv4 address of the DNS Server

Ipv6Address

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.

<H3C> 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 name

Age

Time to live. 0 means the static list is never outdated.

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

Flags

Mapping types between host names and IP addresses.

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 60 characters, including 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.

 

&  Note:

The domain name resolution function supported by S3100-52P switch should be used together with a domain name server. Different domain name server may have differences in DNS implementation. For example, the S3100-52P supports a domain name which includes “_”, while a Windows 2000 Server may not able to resolve the “_”.

 

Example

# Configure com as a DNS suffix.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] 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.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] 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.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] 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 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.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] ip host aaa 10.110.0.1

1.1.9  nslookup type

Syntax

nslookup type { ptr ip-address | a domain-name }

View

Any view

Parameter

ptr ip-address: Resolves the corresponding DNS domain name for an IP address.

a domain-name: Resolves the corresponding IP address for a DNS domain name. The domain name which is a string up to 30 characters supports automatic domain name completing.

Description

Use the nslookup type command to display the results of DNS resolution. It can resolve the corresponding IP address for a specified domain name or resolve the corresponding domain name for a specified IP address.

Example

# Display the corresponding domain name for 192.168.3.2.

<H3C> nslookup type ptr 192.168.3.2

Trying DNS server (10.72.66.36)

Name:    www.h3c.com

Address:  192.168.3.2

# Display the corresponding IP address for www.h3c.com.

<H3C> nslookup type a www.h3c.com

Trying DNS server  (10.72.66.36)

Name:    www.h3c.com

Address:  192.168.3.2

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

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