Questions tagged [dns]

For questions pertaining to Domain Name System (DNS), a service that provides the resolution of host names to IP addresses. Use this tag when you are troubleshooting DNS issues, configuring a DNS resolver or server, or are trying to understand DNS's involvement in your situation.

Introduction

The Domain Name System (DNS) is a hierarchical decentralized naming system for computers, services, or any resource connected to the Internet or a private network. It associates various information with domain names assigned to each of the participating entities. Most prominently, it translates more readily memorized domain names to the numerical IP addresses needed for the purpose of locating and identifying computer services and devices with the underlying network protocols. By providing a worldwide, distributed directory service, the Domain Name System is an essential component of the functionality of the Internet.

The Domain Name System delegates the responsibility of assigning domain names and mapping those names to Internet resources by designating authoritative name servers for each domain. Network administrators may delegate authority over sub-domains of their allocated name space to other name servers. This mechanism provides distributed and fault tolerant service and was designed to avoid a single large central database.

The Domain Name System also specifies the technical functionality of the database service which is at its core. It defines the DNS protocol, a detailed specification of the data structures and data communication exchanges used in the DNS, as part of the Internet Protocol Suite. Historically, other directory services preceding DNS were not scalable to large or global directories as they were originally based on text files, prominently the HOSTS.TXT resolver. The Domain Name System has been in use since the 1980s.

Examples

IP addresses are hard to remember, especially in IPv6. DNS creates looks like a telephone book and converts text names to IP addresses. For example one can type on a browser www.luc.edu instead of 147.126.1.230.

One thing that DNS makes possible is changing the IP address while not changing the name. This allows moving the site to another provider, without requiring users to learn anything new. It is also possible to have several different DNS names resolve to the same IP address, and have the same http web server at that IP address handle the different names as different websites.

As already stated, DNS is hierarchical and distributed system. In looking up cs.luc.edu four different DNS servers may be required: for the so-called "DNS root zone", for edu, for luc.edu and cs.luc.edu. Searching hierarchy can be cumbersome, so DNS search results are usually cached locally.

Further reading

How can I resolve a hostname to an IP address in a Bash script?

How do I set my DNS when resolv.conf is being overwritten?

What DNS servers am I using?

External References

An Introduction to Computer Networks Peter L Dordal

DNS on Wikipedia

1471 questions
584
votes
27 answers

How can I resolve a hostname to an IP address in a Bash script?

What's the most concise way to resolve a hostname to an IP address in a Bash script? I'm using Arch Linux.
Eugene Yarmash
  • 14,675
  • 14
  • 50
  • 57
396
votes
14 answers

What DNS servers am I using?

How can I check which DNS server am I using (in Linux)? I am using network manager and a wired connection to my university's LAN. (I am trying to find out why my domain doesn't get resolved)
Grzenio
  • 5,747
  • 12
  • 32
  • 41
361
votes
18 answers

How do I set my DNS when resolv.conf is being overwritten?

Most of the info I see online says to edit /etc/resolv.conf, but any changes I make there just get overridden. $ cat /etc/resolv.conf # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND…
Seán Hayes
  • 4,511
  • 4
  • 15
  • 11
113
votes
4 answers

How to troubleshoot DNS with systemd-resolved?

How would you go about finding the DNS servers used by systemd-resolved, for troubleshooting purposes? Generally I can use dig and test the DNS servers shown in /etc/resolv.conf. (Or windows - ipconfig /all + nslookup). But that approach doesn't…
sourcejedi
  • 48,311
  • 17
  • 143
  • 296
110
votes
3 answers

Why does /etc/resolv.conf point at 127.0.0.53?

I tried to check what my DNS resolver is and I noticed this: user@ubuntu:~$ cat /etc/resolv.conf nameserver 127.0.0.53 options edns0 I was expecting 192.168.1.1, which is my default gateway, my router. I don't understand why it points at…
HelloWorld
  • 1,355
  • 2
  • 6
  • 11
105
votes
1 answer

Chrome: DNS requests with random DNS names: malware?

Over the years (since 2005), I have seen logs of strange random DNS requests done, on the multiple DNS / BIND servers I have maintained. May 7 12:13:50 1.1.1.1 named[63742]: client 1.1.1.2#24123 (verxkgiicjmcnxg): view internal: query:…
Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
101
votes
5 answers

What is the point of sshd “UseDNS” option?

I know what it does, but I don't know why. What attack(s) does it prevent? Is it relevant for all kind of authentication methods? (hostbased, password, publickey, keyboard-interactive ...)
user368507
  • 2,143
  • 4
  • 19
  • 17
84
votes
3 answers

How to configure systemd-resolved and systemd-networkd to use local DNS server for resolving local domains and remote DNS server for remote domains?

I'm connected to local area network with access to the Internet through gateway. There is DNS server in local network which is capable of resolving hostnames of computers from local network. I would like to configure systemd-resolved and…
Piotr Dobrogost
  • 4,116
  • 5
  • 35
  • 46
70
votes
2 answers

dig vs nslookup

Why do the commands dig and nslookup sometimes print different results? ~$ dig facebook.com ; <<>> DiG 9.9.2-P1 <<>> facebook.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6625 ;; flags: qr rd ra;…
pylover
  • 3,328
  • 6
  • 21
  • 26
57
votes
4 answers

How to read the local DNS cache contents?

I know that on Windows I can issue ipconfig /displaydns and I see the local DNS's cache content. How can I list the DNS's cache content in Linux? I would like to get as much as cross-distro solution as possible.
Hanan
  • 5,631
  • 4
  • 28
  • 30
55
votes
9 answers

Can I create override dns similar to writing in /etc/hosts without root access

I want to set a dns record that my browser will use, but I don't have root access, so I can't modify /etc/hosts. I need to do this for testing vhosts with apache, whose dns hasn't yet been set up. I have access to firefox, and chrome, so if there's…
xenoterracide
  • 57,918
  • 74
  • 184
  • 250
49
votes
3 answers

curl --resolve appears to do nothing

The --help output for curl lists a --resolve option, which states --resolve Force resolve of HOST:PORT to ADDRESS I'm not having any luck getting it to work though. The basic command I'm trying to run is curl --resolve…
tsuraan
  • 593
  • 1
  • 4
  • 5
49
votes
5 answers

How do I generate SSHFP records?

I need to setup SSHFP records in the DNS for my host. I have done some searching but I haven't found any good example. What are SSHFP records? What does SSHFP records look like? How do I create SSHFP records?
Mikael Dúi Bolinder
  • 3,982
  • 5
  • 18
  • 23
42
votes
3 answers

What is the purpose of /etc/hosts?

As I understand it, the hosts file is one of several system facilities that assists in addressing network nodes in a computer network. But what should be inside it? When I install Ubuntu by default 127.0.0.1 localhost will be there. Why? How…
MikiBelavista
  • 1,473
  • 8
  • 28
  • 38
36
votes
5 answers

Override Ubuntu 20.04 DNS using systemd-resolved

How do I configure an Ubuntu 20.04 system so it overrides the default DNS? It seems that by default there is a global and per-link DNS setting. I tried a couple of things that did not work: Edit /etc/systemd/resolved.conf with the DNS…
Serge Fonville
  • 461
  • 1
  • 4
  • 4
1
2 3
98 99