H3C S3600 Command Manual-Release 1602(V1.02)

HomeSupportSwitchesH3C S3600 Switch SeriesReference GuidesCommand ReferencesH3C S3600 Command Manual-Release 1602(V1.02)
43-DNS Command
Title Size Download
43-DNS Command 41.12 KB

DNS Configuration Commands

display dns domain

Syntax

display dns domain [ dynamic ]

View

Any view

Parameters

dynamic: Displays DNS suffixes dynamically assigned through DHCP or other protocols.

Description

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

Related commands: dns domain.

Examples

# Display DNS suffixes

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

Sequence number

Domain-name

DNS suffix

 

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

Examples

# Display the information in the dynamic domain name cache.

<Sysname> display dns dynamic-host

No Domain-name           --->    Ipaddress       TTL     Alias

1  lm.test.h3c                   172.1.223.1     3564

 

No Domain-name           <---    Ipaddress       TTL     Alias

1  aaaa                          172.1.223.2     3594  

Table 1-2 Description on the 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.

--->

<---

DNS resolution has two types:

Forward resolution: domain name--->IP address

Reverse resolution: IP address--->domain name

 

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

 

IPv4 DNS Servers :

Domain-server Type IP Address

     1        S    192.168.0.4

 

IPv6 DNS Servers :

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

Field

Description

Type

Type of the DNS server. S indicates the DNS server is specified manually, while D indicates the DNS server information is obtained dynamically through DHCP or other protocols.

IPv4 DNS Servers

IPv4 DNS server

IPv6 DNS Servers

IPv6 DNS server

Domain-server

Number of the DNS server, which is assigned automatically by the system and starts from 1. Such numbering for IPv4 DNS servers is independent of that for IPv6 ones.

 

For details about IPv6 DNS, refer to IPv6 Management Command.

 

display ip host

Syntax

display ip host

View

Any view

Parameters

None

Description

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

Examples

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

<Sysname> display ip host

Host                           Age        Flags  Address

host.com                       0          static 192.168.0.38

Table 1-4 Description on the 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

 

dns domain

Syntax

dns domain domain-name

undo dns domain [ domain-name ]

View

System view

Parameters

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. 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 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 configured DNS suffixes are deleted.

Related commands: display dns domain.

 

The DNS feature supported by S3600 series 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.

 

Examples

# Configure com as a DNS suffix.

<Sysname> system-view

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

[Sysname] dns domain com

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

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

[Sysname] dns resolve

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 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, including those with IPv6 addresses.

Related commands: display dns server.

Examples

# Configure 172.16.1.1 for a DNS Server.

<Sysname> system-view

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

[Sysname] dns server 172.16.1.1

ip host

Syntax

ip host hostname ip-address

undo ip host hostname [ ip-address ]

View

System view

Parameters

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 commands: display ip host.

Examples

# Configure IP address 10.110.0.1 for host aaa.

<Sysname> system-view

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

[Sysname] ip host aaa 10.110.0.1

nslookup type

Syntax

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

View

Any view

Parameters

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

a domain-name: Displays the corresponding IP address for a DNS domain name. A domain name is 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.

Examples

# Display the corresponding domain name for 192.168.3.2.

<Sysname> nslookup type ptr 192.168.3.2

Trying DNS server (10.72.66.36)

Name:    www.host.com

Address:  192.168.3.2

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

<Sysname> nslookup type a www.host.com

Trying DNS server  (10.72.66.36)

Name:    www.host.com

Address:  192.168.3.2

reset dns dynamic-host

Syntax

reset dns dynamic-host

View

User view

Parameters

None

Description

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

Related commands: display dns dynamic-host.

Examples

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