How to statically configure DNS servers on a Cisco router when the WAN interface uses DHCP?
- by Massimo
I have a Cisco router (model 887VA, IOS 15.4) used to connect a LAN to the Internet via ADSL. The WAN interface uses DHCP:
interface ATM0.1 point-to-point
ip address dhcp
I need the router to use a statically-defined DNS server for name resolution:
ip name-server A.B.C.D
However, the router insists on using the DNS servers supplied by the ISP via DHCP:
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
How can I tell the router to ignore the ISP-supplied DNS servers and only use the statically-configured one?