4.11.6 Change the DNS Server Address on the Cisco 4948 Ethernet Switch

This procedure describes how to change the DNS server address on the Cisco 4948 Ethernet switch.

  1. Access the switch using one of the following methods, based on the firmware release:
    • Firmware release 12.2 or later:

      Access the switch using SSH, and log in as the admin user with the administrator password.

      Note:

      If SSH has not been configured, then use Telnet to access the switch as the admin user.
    • Firmware earlier than release 12.2:

      Access the switch using Telnet, and log in as the administrator using the administrative password.

  2. Change to enable mode.
    Switch> enable
    
    When prompted for a password, use the administrator password.
  3. Review the current configuration.
    Switch# show running-config
    
  4. Erase the current DNS server information.
    Switch# configure terminal
    Enter configuration commands,one per line.End with CNTL/Z.
    Switch(config)# no ip name-server 192.0.2.2
    Switch(config)# no ip name-server 198.51.100.4
    Switch(config)# no ip name-server 203.0.113.2
    Switch(config)# end
    Switch# write memory
    Building configuration...
    Compressed configuration from 2603 bytes to 1158 bytes [OK ]
    

    Note:

    Each current DNS IP address to be changed needs to be erased. Invalid IP addresses must also be erased.
  5. Set the domain name and then configure up to three DNS servers, as shown in the following example:
    Switch# configure terminal
    Enter configuration commands,one per line.End with CNTL/Z.
    Switch(config)# ip domain-name example.com
    Switch(config)# ip name-server 192.0.2.3
    Switch(config)# ip name-server 198.51.100.5
    Switch(config)# ip name-server 203.0.113.1
    Switch(config)# end
    Switch# write memory
    Building configuration...
    Compressed configuration from 2603 bytes to 1158 bytes [OK ]
    
  6. Verify the changes.
    Switch# show running-config
    

    The command output should include entries for the new DNS servers.

    For example:

    Building configuration...
    ...
    ip domain-name example.com
    ip name-server 192.0.2.3
    ip name-server 198.51.100.5
    ip name-server 203.0.113.1
    ...
    
  7. Save the configuration.
    Switch# copy running-config startup-config
    Destination filename [startup-config]? 
    Building configuration...
    Compressed configuration from 14343 bytes to 3986 bytes[OK]
    
  8. Exit the session.
    Switch# exit