Domain Name System (DNS) is an Internet service that translates domain names into IP addresses or vice versa.
|Estimated completion time||5m|
Method #1: Router's Webgui Status Page (Recommended for all users)
You can use router's web gui page to find out dns server IP address assigned by your ISP.
- First, open a web browser (use your computer’s web browser such as Firefox, Google Chrome, or Internet Explorer).
- Type the router's IP address on the Address bar on top then press Return ([Enter] key] on your keyboard. In most cases the router's default IP address is 192.168.1.1 (see how to find out router's IP address under MS-Windows and Unix like operating system).
- Enter your router's username and password when prompted.
- You should see router page like the one below (the page varies depending on the router make and model).
- Finally, click on Status to view dns address assigned by your ISP. You should see status page like one below (again page output varies on the router make and model but you should able to see dns server IP address)
Method # 2: MS-Windows Commands
Open a command prompt (click on Start > run > type cmd and press [enter] key to open a command prompt).
Type the nslookup command to check DNS resolution at the command prompt c:>
nslookup www.cyberciti.biz Server: dns2.mumbai.corp-lan.nixcraft.net.in Address: 10.0.80.11#53 Non-authoritative answer: Name: www.cyberciti.biz Address: 126.96.36.199
The first two lines are the dns server (10.0.10.11 or dns2.mumbai.corp-lan.nixcraft.net.in) you are using i.e. dns server IP address assigned by your ISP or network admin. 10.0.80.11 is our own dns server located inside our corporate network.
Say hello to ipconfig /all command
Another option is to type ipconfig /all command at the command prompt to get the same information:
In this example my DNS server is located at 192.168.1.2. This one is used by my computer, and it was passed on to my computer by ISP modem / router.
Method #3: Apple OS X or Unix / Linux Commands
Open the bash shell prompt and type the dig or host commands:
$ host -a www.cyberciti.biz | grep from
Received 229 bytes from 10.0.10.11#53 in 0 ms
OR use the dig command:
$ dig www.cyberciti.biz | grep SERVER
;; SERVER: 10.0.10.11#53(10.0.10.11)
However, a better approach is to go through /etc/resolv.conf file to see assigned dns server address to your computer. It was passed on to you by your modem / router:
$ cat /etc/resolv.conf
nameserver 10.0.80.11 nameserver 10.0.80.12 options single-request
Method #4: Dump and view traffic on a network (recommended for advanced users only)
You can use the tcpdump command to dump traffic on a network and view dns traffic. tcpdump command works on most Unix-like operating systems. tcpdump command analyzes network behavior, performance and applications that generate or receive network traffic including dns traffic. To view dns traffic only run tcpudmp as root user in a separate window:
# tcpdump udp and src port 53
# tcpdump udp and dst port 53
# tcpdump -n -s 1500 -i eth0 udp port 53
Open another window (terminal) and run host / dig commands to generate dns traffic:
$ host www.cyberciti.biz
In this example:
- You see all packets going in and out of my Linux system for udp port # 53.
- I ran host command from another windows.
- The output of tcpdump clearly indicate that my computer (IP:192.168.1.5) asking to dns server (IP:192.168.1.2) about the address of www.cyberciti.biz? In second line I got answer from dns server.
- 30 Cool Open Source Software I Discovered in 2013
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012
- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop