I setup my name server based on this link: <https://www.digitalocean.com/community/tutorials/an-introduction-to-dns-terminology-components-and-concepts>

Normally the name server resolv.conf would contain `2` other available name server ip. But what if the resolv.conf just has 127.0.0.1 as the servername like this:

```
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1
#nameserver 172.31.0.2
#nameserver 127.0.0.53
search ec2.internal

```

Then on my custom name server, I input following command in terminal:

```
telnet www.yahoo.com 80
Trying 98.139.180.149...
Connected to fd-fp3.wg1.b.yahoo.com.
Escape character is '^]'.
GET / HTTP/1.1
Host: www.yahoo.com

```

I have test it and the name server works well.

Thus, I have two assumption:

**1:** if the resolv.conf file only contain 127.0.0.1, the name server will iterative query the 'root` server, then TLD name server, etc.

**2:** The name server, such as bind9, has the record of `root` server, thus it could send query directly without additional query.

If I am correct, where the name server record the root server address?

However, if I am wrong, what is the query flow for such situation? Thanks.

update
======

After using tcpdump track the query flow, the name server does query the root name server firtly. But why the root server return all the other root name server to me?

```
k.root-servers.net.domain > ip-172-31-8-42.55523: Flags [P.], cksum 0x8784 (correct), seq 1:1100, ack 31, win 229, options [nop,nop,TS val 1581998147 ecr 403293], length 109964020*- q: NS? . 14/0/27 . NS b.root-servers.net., . NS g.root-servers.net., . NS i.root-servers.net., . NS c.root-servers.net., . NS e.root-servers.net., . NS f.root-servers.net., . NS d.root-servers.net., . NS l.root-servers.net., . NS k.root-servers.net., . NS a.root-servers.net., . NS j.root-servers.net., . NS h.root-servers.net., . NS m.root-servers.net., . RRSIG ar: a.root-servers.net. A 198.41.0.4, b.root-servers.net. A 192.228.79.201, c.root-servers.net. A 192.33.4.12, d.root-servers.net. A 199.7.91.13, e.root-servers.net. A 192.203.230.10, f.root-servers.net. A 192.5.5.241, g.root-servers.net. A 192.112.36.4, h.root-servers.net. A 198.97.190.53, i.root-servers.net. A 192.36.148.17, j.root-servers.net. A 192.58.128.30, k.root-servers.net. A 193.0.14.129, l.root-servers.net. A 199.7.83.42, m.root-servers.net. A 202.12.27.33, a.root-servers.net. AAAA 2001:503:ba3e::2:30, b.root-servers.net. AAAA 2001:500:84::b, c.root-servers.net. AAAA 2001:500:2::c, d.root-servers.net. AAAA 2001:500:2d::d, e.root-servers.net. AAAA 2001:500:a8::e, f.root-servers.net. AAAA 2001:500:2f::f, g.root-servers.net. AAAA 2001:500:12::d0d, h.root-servers.net. AAAA 2001:500:1::53, i.root-servers.net. AAAA 2001:7fe::53, j.root-servers.net. AAAA 2001:503:c27::2:30, k.root-servers.net. AAAA 2001:7fd::1, l.root-servers.net. AAAA 2001:500:9f::42, m.root-servers.net. AAAA 2001:dc3::35, . OPT UDPsize=4096 DO (1097)

```

If the name server already has the record of all the root server, this step is meaningless.