Change the DNS Server Address on the Cisco Ethernet Switch
This procedure describes how to change the DNS server address on the Cisco
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.
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 10.7.7.2
Switch(config)# no ip name-server 129.148.5.4
Switch(config)# no ip name-server 10.8.160.2
Switch(config)# end
Switch# write memory
Building configuration...
Compressed configuration from 2603 bytes to 1158 bytes [OK ]
5. 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 name-server 10.7.7.3
Switch(config)# ip name-server 129.148.5.5
Switch(config)# ip name-server 10.8.160.1
Switch(config)# write memory
Building configuration...
Compressed configuration from 2603 bytes to 1158 bytes [OK ]
6. Verify the changes.
Switch# show running-config
The following is an example of the output from the command:
Building configuration...
...
ip domain-name example.com
ip name-server 192.168.10.2
ip name-server 192.168.10.3
ip name-server 192.168.10.4
...
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
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




