|
|
This chapter consists of these sections:
DNS is a distributed database with which you can map host names to IP addresses through the DNS protocol from a DNS server. When you configure DNS on the switch, you can substitute the host name for the IP address with all IP commands, such as ping, telnet, upload, and download.
To use DNS, you must have a DNS name server present on your network.
You can specify a primary DNS name server on the switch as well as two backup servers. The first server specified is the primary unless you explicitly identify the primary server. The switch sends DNS queries to the primary server first. If the query to the primary server fails, the backup servers are queried.
Table 22-1 shows the default DNS configuration.
| Feature | Default Value |
|---|---|
DNS enable state | Disabled |
DNS default domain name | Null |
DNS servers | None specified |
The following sections describe how to configure DNS:
To set up and enable DNS on the switch, perform this task in privileged mode:
| Task | Command |
|---|---|
Step 1 Specify the IP address of one or more DNS servers. | set ip dns server ip_addr [primary] |
Step 2 Set the domain name. | set ip dns domain name |
Step 3 Enable DNS. | set ip dns enable |
Step 4 Verify the DNS configuration. | show ip dns [noalias] |
This example shows how to set up and enable DNS on the switch and verify the configuration:
Console> (enable) set ip dns server 10.2.2.1 10.2.2.1 added to DNS server table as primary server. Console> (enable) set ip dns server 10.2.24.54 primary 10.2.24.54 added to DNS server table as primary server. Console> (enable) set ip dns server 10.12.12.24 10.12.12.24 added to DNS server table as backup server. Console> (enable) set ip dns domain corp.com Default DNS domain name set to corp.com Console> (enable) set ip dns enable DNS is enabled Console> (enable) show ip dns DNS is currently enabled. The default DNS domain name is: corp.com DNS name server status ---------------------------------------- ------- dns_serv2 dns_serv1 primary dns_serv3 Console> (enable)
To clear DNS servers from the DNS server table, perform this task in privileged mode:
| Task | Command |
|---|---|
Step 1 Remove one or all of the DNS servers from the table. | clear ip dns server [ip_addr | all] |
Step 2 Verify the DNS configuration. | show ip dns [noalias] |
This example shows how to clear a DNS server from the DNS server table:
Console> (enable) clear ip dns server 10.12.12.24 10.12.12.24 cleared from DNS table Console> (enable)
This example shows how to clear all of the DNS servers from the DNS server table:
Console> (enable) clear ip dns server all All DNS servers cleared Console> (enable)
To clear the default DNS domain name, perform this task in privileged mode:
| Task | Command |
|---|---|
Step 1 Clear the default DNS domain name. | clear ip dns domain |
Step 2 Verify the DNS configuration. | show ip dns [noalias] |
This example shows how to clear the default DNS domain name:
Console> (enable) clear ip dns domain Default DNS domain name cleared. Console> (enable)
To disable DNS, perform this task in privileged mode:
| Task | Command |
|---|---|
Step 1 Disable DNS on the switch. | set ip dns disable |
Step 2 Verify the DNS configuration. | show ip dns [noalias] |
This example shows how to disable DNS on the switch:
Console> (enable) set ip dns disable DNS is disabled Console> (enable)
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Tue Mar 30 16:04:01 PST 1999
Copyright 1989-1999©Cisco Systems Inc.