---
# System prepended metadata

title: How to check Domain Server's IP?
tags: [network]

---

# How to check Domain Server's IP?
###### tags: `network`

# Terminal command "nslookup"
By using **nslookup** you can check the ip of a specific domain. Let's take **yahoo.com.tw** as example.

We do not know it's ip, so we use **nslookup** and input the domain (yahoo.com.tw). This one returns:

The Gateway(The one that helps you link to internet)
>Server:		172.20.10.1
Address:	172.20.10.1#53[color=lightblue]

3 Different Servers that Yahoo is using:
> Name:	yahoo.com.tw
Address: 74.6.136.150
Name:	yahoo.com.tw
Address: 212.82.100.150
Name:	yahoo.com.tw
Address: 98.136.103.23[color=lightblue]

```java=
MacBook-Pro-6:~ claudiajulieta$ nslookup
> yahoo.com.tw
Server:		172.20.10.1
Address:	172.20.10.1#53

Non-authoritative answer:
Name:	yahoo.com.tw
Address: 74.6.136.150
Name:	yahoo.com.tw
Address: 212.82.100.150
Name:	yahoo.com.tw
Address: 98.136.103.23
```

**Note:**
Gateway will not automatically find the ip for yahoo.com.tw, it will have to ask upper stream to get it. And depending on the case, it might take too long.
So we sometimes, just decide which server we might want to ask directly by using **server ip**. We can notice that the server returned will be 8.8.8.8 instead of our original gateway.

```java=
> server 8.8.8.8
Default server: 8.8.8.8
Address: 8.8.8.8#53
> yahoo.com.tw
Server:		8.8.8.8
Address:	8.8.8.8#53

Non-authoritative answer:
Name:	yahoo.com.tw
Address: 98.136.103.23
Name:	yahoo.com.tw
Address: 212.82.100.150
Name:	yahoo.com.tw
Address: 74.6.136.150
```

**Note:**
DNS protocol uses UDP, so it just send request; if timeout happens it will just resend.
DNS usually uses port 53(#53)
