display dns host

Use display dns host to display information about domain name-to-IP address mappings.

Syntax

display dns host [ ip | ipv6 ] [ vpn-instance vpn-instance-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

ip: Specifies type A queries. A type A query resolves a domain name to the mapped IPv4 address.

ipv6: Specifies type AAAA queries. A type AAAA query resolves a domain name to the mapped IPv6 address.

vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. To display domain name-to-IP address mappings for the public network, do not use this option.

Usage guidelines

If you do not specify the ip or ipv6 keyword, this command displays domain name-to-IP address mappings of all query types.

Examples

# Display domain name-to-IP address mappings of all query types.

<Sysname> display dns host
Type:
  D: Dynamic    S: Static

Total number: 3
No.  Host name         Type  TTL        Query type   IP addresses
1    sample.com        D     3132       A            192.168.10.1
                                                     192.168.10.2
                                                     192.168.10.3
2    zig.sample.com    S     -          A            192.168.1.1
3    sample.net        S     -          AAAA         FE80::4904:4448

Table 23: Command output

Field

Description

No.

Sequence number.

Host name

Domain name.

Type

Domain name-to-IP address mapping type:

  • S—A static mapping configured by the ip host or ipv6 host command.

  • D—A mapping dynamically obtained through dynamic domain name resolution.

TTL

Time in seconds that a mapping can be stored in the cache.

For a static mapping, a hyphen (-) is displayed.

Query type

Query type, type A or type AAAA.

IP addresses

Replied IP address:

  • For type A query, the replied IP address is an IPv4 address.

  • For type AAAA query, the replied IP address is an IPv6 address.

Related commands