我有一台Cisco路由器(型号887VA,IOS 15.4),用于通过ADSL将LAN连接到Internet。 WAN接口使用DHCP:
interface ATM0.1 point-to-point ip address dhcp
我需要路由器使用静态定义的DNS服务器来parsing名称:
ip name-server ABCD
但是,路由器坚持使用DHCP提供的DNS服务器:
Router#ping www.google.com Translating "www.google.com"...domain server (<ISP DNS>) [OK] Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 173.194.116.208, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 44/45/48 ms
我怎么能告诉路由器忽略ISP提供的DNS服务器,只使用静态configuration的?
find了。
根据此页面 ,启用DHCP的接口上的命令no ip dhcp client request dns-nameserver指示路由器在configuration该接口时不向DHCP服务器请求DNS信息; 在接口ATM0.1上设置后,仍然从DHCP服务器接收到DNSconfiguration(可以在dhcp debug输出中看到),但忽略,路由器使用静态configuration的DNS服务器。
interface ATM0.1 point-to-point ip address dhcp no ip dhcp client request dns-nameserver