H3C S3600 Series Ethernet Switches Command Manual-Release 1510(V1.04)

HomeSupportSwitchesH3C S3600 Switch SeriesReference GuidesCommand ReferencesH3C S3600 Series Ethernet Switches Command Manual-Release 1510(V1.04)
42-DNS Command
Title Size Download
42-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: Displays the DNS suffixes dynamically obtained through 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 fields of the display dns domain command

Field

Description

No

Sequence number

Domain-name

DNS 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 information in the dynamic domain name cache.

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 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 fields of the display dns dynamic-host command

Field

Description

No

Sequence number

Domain-name

Domain name

IpAddress

IP address of the corresponding domain name

TTL

Time for which an entry is cached in seconds.

Alias

Alias for the domain name. There can be four aliases at most.

 

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.

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

IpAddress

IP address of the DNS Server

 

1.1.4  display ip host

Syntax

display ip host

View

Any view

Parameter

None

Description

Use the display ip host command to display mappings between host names and IP addresses in the static DNS database.

Example

# Display mappings between host names and IP addresses in the static DNS database.

<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 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 indicates static mapping between host names and IP addresses

Address

IP address of a host

 

1.1.5  dns domain

Syntax

dns domain domain-name

undo dns domain [ domain-name ]

View

System view

Parameter

domain-name: DNS suffix, a string of 1 to 60 characters which can be letters, numbers, hyphens (-), underscores (_), and dots (.).

Description

Use the dns domain command to configure a DNS suffix.

Use the undo dns domain command to delete the configured DNS suffix.

No DNS suffix is configured by default.

You can configure a maximum of 10 DNS suffixes. You must enter the DNS suffix before deleting it. Otherwise, all statically configured DNS suffixes are deleted.

Related command: display dns domain.

 

&  Note:

The DNS feature supported by S3600 serial Ethernet switches should be used together with a DNS server. DNS implementations vary with DNS servers. For example, S3600 serial Ethernet switches support a domain name containing “_”, while a Windows 2000 Server may not be able to resolve the domain name.

 

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 for the DNS Server.

Use the undo dns server to remove the IP address of the DNS server.

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

You can configure a maximum of 6 DNS Servers.

Related command: display dns server.

Example

# Configure 172.16.1.1 for a DNS Server.

<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, a string of 1 to 20 characters which can be 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 DNS database.

Use the undo ip host command to remove the mapping.

No mappings are created by default.

Each host name can correspond to only one IP address. When IP addresses are configured for the same host for multiple times, only the IP address configured last time is valid.

Related command: display ip host.

Example

# Configure the IP address 10.110.0.1 for the 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 domain name for an IP address.

a domain-name: Resolves the corresponding IP address for a DNS domain name. A domain name consists of a string of up to 30 characters. Automatic domain name addition is supported.

Description

Use the nslookup type command to display DNS resolution result, namely, the domain name for a specified IP address or IP address for a specified domain name.

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 information in the dynamic domain name cache.

Related command: display dns dynamic-host.

Example

# Clear the information in the dynamic domain name 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
新华三官网