Connect to the ASA, log in and go to enable mode, and then global configuration mode.
ASA> enable
Password: **********
ASA# configure terminal
( inside and outside are the name of the interfaces)
ASA(config)# dns domain-lookup outside
a) ASA(config)# dns name-server 4.2.2.2 8.8.8.8
ASA(config)# exit
b) ASA(config)# dns server-group DefaultDNS
ASA(config-dns-server-group)# name-server 4.2.2.2
ASA(config-dns-server-group)# name-server 8.8.8.8
ASA(config-dns-server-group)# exit
ASA# ping www.google.com
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 173.194.34.83, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/20/20 ms
Enable DNS Lookups on Cisco IOS Device
Below I'll setup DNS lookups on a Cisco Router, but the process is the same for a Catalyst switch.1. Connect to the device, log in and go to enable mode, and then global configuration mode. By default DNS lookups are enabled, (you would disable with a no ip domain-lookup command). But let's make sure.
R1(config)#ip domain-lookup
R1(config)#ip name-server 4.2.2.2
R1(config)#ip name-server 8.8.8.8
R1#ping www.google.com
Translating "www.google.com"...domain server (4.2.2.2) [OK]
Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 173.194.34.84, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 24/28/36 ms
Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 173.194.34.84, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 24/28/36 ms