Use these M4500 CLI commands to configure the DNS client, including static host entries, domain names, name servers, source interface, retries, and timeouts.
show hosts
This command displays the static host name-to-address mapping table.
Display Message
Example: The following shows examples of the CLI display output for the commands.
(M4500-48XF8C) #show hosts
Host name...................................... M4500-48XF8C
Default domain................................. Domain name is not configured
Default domain list............................ Domain Name List is not configured
Domain Name Lookup............................. Enabled
Number of retries.............................. 2
Retry timeout period........................... 3
Name servers (Preference order)................ 10.1.1.7, 10.1.1.6
Dns Client Source Interface.................... (not configured)
Configured host name-to-address mapping:
Host Addresses
------------------------ ----------------------
No host name is configured to IP address
Host Total Elapsed Type Addresses
---------------------- ------- ------- ---- --------------
No hostname is mapped to an IP address
ip host
This command creates a static entry in the DNS table that maps a host name to an IP address.
no ip host
Remove the corresponding name to IP address mapping entry.
clear host
This command clears the entire static host name-to-address mapping table.
ip domain-name
This command defines the default domain name to be appended to incomplete host names (i.e., host names passed from a client are not formatted with dotted notation).
no ip domain-name
This command removes the default domain name.
ip domain-list
This command defines the domain list of default domain names to complete unqualified names.
no ip domain-list
This command removes the default domain list.
ip name-server
This command specifies the address of one or more domain name servers to use for name-to-address resolution.
Note: The listed name servers are queried in the specified sequence until a response is received, or the end of the list is reached with no response.
no ip name-server
Remove the corresponding Domain Name Server entry from the table.
ip name-server source-interface
This command specifies the source address of dns client to use for name-to-address resolution.
no ip name-server source-interface
This command will reset the DNS source interface to the default settings.
ip domain-lookup
This command enables the IP Domain Naming System (DNS)-based host name-to-address translation.
no ip domain-lookup
This command disables the IP Domain Naming System (DNS)-based host name-to-address translation.
ip domain-retry
This command specifies the number of times to retry sending Domain Name System (DNS) queries.
no ip domain-retry
This command will reset the number of retry times to the default settings.
ip domain-retry-timeout
This command specifies the amount of time to wait for a response to a DNS query.
no ip domain-retry-timeout
This command will reset the timeout to the default setting.
ipv6 host
This command creates a static entry in the DNS table that maps a host name to an IPv6 address.
no ipv6 host
This command removes the corresponding host name from an IPv6 address mapping entry.