OcNOS SP : System Management Guide : DNS Command Reference : Domain Name System Commands
Domain Name System Commands
This chapter describes Domain Name System (DNS) commands. DNS translates easily-to-remember domain names into numeric IP addresses needed to locate computer services and devices. By providing a worldwide, distributed keyword-based redirection service, DNS is an essential component of the Internet.
The DNS database is hierarchical. When a client such as a Web browser gives a request that specifies a host name, the DNS resolver on the client first contacts a DNS server to determine the server's IP address. If the DNS server does not contain the needed mapping, it forwards the request to a different DNS server at the next higher level in the hierarchy. After potentially several forwarding and delegation messages are sent within the DNS hierarchy, the IP address for the given host eventually arrives at the resolver, that in turn completes the request over Internet Protocol (IP).
Note: The commands below are supported only on the “management” VRF.
The chapter contains these commands:
debug dns client
Use this command to display DNS debugging messages.
Use the no form of this command to stop displaying DNS debugging messages.
Command Syntax
debug dns client
no debug dns client
Parameters
None
Default
By default, disabled.
Command Mode
Exec mode, Privileged Exec mode, and Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#debug dns client
ip domain-list
Use this command to define a list of default domain names used to complete unqualified host names. Each domain in the list is to be tried in turn.
The ip domain-list command is similar to the ip domain-name command, except that with the ip domain-list command you can define a list of domains, each to be tried in turn.
If there is no domain list, the default domain name specified with the ip domain-name command is used. If there is a domain list, the default domain name is not used.
Use the no form of this command to remove a domain.
Command Syntax
ip domain-list (vrf (NAME|management)|) DOMAIN-NAME
no ip domain-list (vrf (NAME|management)|) DOMAIN-NAME
Parameters
management
Virtual Routing and Forwarding name
DOMAIN-NAME
Domain string (e.g. company.com)(Max Size 63)
NAME
Custom VRF
Default
No default is specified.
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3. Added parameter NAME in OcNOS version 6.5.3.
Examples
#configure terminal
(config)#ip domain-list mySite.com
ip domain-lookup
Use this command to enable DNS host name-to-address translation.
Use the no form of this command to disable DNS.
Command Syntax
ip domain-lookup (vrf management|)
no ip domain-lookup (vrf management|)
Parameters
management
Virtual Routing and Forwarding name
Default
No default is specified.
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#ip domain-lookup
ip domain-name
Use this command to set the default domain name used to complete unqualified host names (names without a dotted-decimal domain name).
The ip domain-list command is similar to the ip domain-name command, except that with the ip domain-list command you can define a list of domains, each to be tried in turn.
If a domain list has been created with ip domain-list, the default domain name is not used. If there is no domain list, the default domain name is used.
Use the no form of this command to disable DNS.
Command Syntax
ip domain-name (vrf (NAME|management)|) DOMAIN-NAME
no ip domain-name (vrf (NAME|management)|) DOMAIN-NAME
Parameters
management
Virtual Routing and Forwarding name
DOMAIN-NAME
Domain string (e.g. company.com)(Max Size 63)
NAME
Custom VRF
Default
No default is specified.
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3. Added parameter NAME in OcNOS version 6.5.3.
Examples
#configure terminal
(config)#ip domain-name company.com
ip host
Use this command to define static a hostname-to-address mapping in DNS. You can specify one mapping in a command.
Use the no form of this command remove a hostname-to-address mapping.
Command Syntax
ip host (vrf (NAME|management)|) WORD (X:X::X:X | A.B.C.D)
no ip host (vrf (NAME|management)|) WORD (X:X::X:X | A.B.C.D)
Parameters
management
Virtual Routing and Forwarding name
WORD
Host name, such as company.com
X:X::X:X
IPv6 address of the host
A.B.C.D
IPv4 address of the host
NAME
Custom VRF
Default
No default is specified.
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3. Added parameter NAME in OcNOS version 6.5.3.
Examples
#configure terminal
(config)#ip host company.com 192.0.2.1
ip name-server
Use this command to add a DNS server address that is used to translate hostnames to IP addresses.
Use the no form of this command to remove a DNS server address.
Note: If the hostname resolution takes time even after adding proper name-servers, check the list of name-servers added. Non-responsive name-servers take a long time to resolve the hostnames and result in utilities timeout and "Failed to resolve hostname" error. Ensure that the non-reachable/non-DNS name-servers are removed from the configured list.
Command Syntax
ip name-server (vrf (NAME|management)|) (X:X::X:X | A.B.C.D)
no ip name-server (vrf (NAME|management)|)(X:X::X:X | A.B.C.D)
Parameters
management
Virtual Routing and Forwarding name
A.B.C.D
IPv4 address of the host
X:X::X:X
IPv6 address of the host
NAME
Custom VRF
Default
No default is specified.
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3. Added parameter NAME in OcNOS version 6.5.3.
Examples
#configure terminal
(config)#ip name-server 123.70.0.23
show hosts
Use this command to display the DNS name servers and domain names.
Command Syntax
show hosts (vrf (NAME|management)|)
Parameters
vrf
management or all VRFs
NAME
Custom VRF
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3. Added parameter NAME in OcNOS version 6.5.3.
Example
The following is a sample output of this command displaying two name servers: 10.10.0.2 and 10.10.0.88.
#show hosts
VRF: management
 
DNS lookup is enabled
Default domain : .com
Additional Domain : .in .ac
Name Servers : 10.12.3.23
Host Address
---- -------
test 10.12.12.67
test 10::23
 
* - Values assigned by DHCP Client.
 
Table 1-1 explains the output fields.
 
Table 1-1: show hosts fields
Entry
Description
VRF: management
DNS configuration of specified VRF.
DNS lookup is enabled
DNS feature enabled or disabled.
Default domain
Default domain name used to complete unqualified host names (names without a dotted decimal domain name).
Additional Domain
A list of default domain names used to complete unqualified host names. Each domain in the list is to be tried in turn.
Name Servers
DNS server addresses that are used to translate hostnames to IP addresses.
Host
Static hostname-to-address mappings in DNS.
Test
Static hostname-to-address mappings in DNS.
* - Values assigned by DHCP Client.
Name-server indicates it has been learned dynamically.
 
show running-config dns
Use this command to show the DNS settings of the running configuration.
Command Syntax
show running-config dns (vrf management|)
Parameters
vrf
management
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#show running-config dns
ip domain-lookup vrf management
ip domain-name vrf management .com
ip domain-list vrf management .in
ip domain-list vrf management .ac
ip name-server vrf management 10.12.3.23
ip host vrf management test 10.12.12.67 10::23