version=pmwiki-2.2.130 ordered=1 urlencoded=1 agent=Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0 author=nixdork charset=UTF-8 csum=Fix typo ctime=1612420334 host=185.220.103.113 name=Dns.Dns rev=4 targets=Openbsd.IPv4,Openbsd.Ipv6,CloudFlare.Cons,Dns.Domain,Dns.Zonefile,Dns.Providers,Dns.Records,Openbsd.Nsd,Openbsd.Vhost,Openbsd.Dig,Openbsd.Host,Openbsd.Unbound text=(:title Domain Name System:)%0a%0a!! Too Many IPs%0a%0aThere are over 4 billion possible [[openbsd/IPv4|IP addresses]], and an astronomical number of [[openbsd/ipv6|IPv6 addresses]]. No human can memorize them all. So, instead of typing IPs like 192.168.0.1 into our web browser, we use hostnames like ircnow.org, which are far easier to remember. Our computers take these hostnames and tries to find their IP addresses; this process is called '''name resolution'''.%0a%0a!! How DNS works%0a%0aTo perform '''name resolution''', the client (such as a phone or a laptop) needs a '''name resolver'''. The name resolver then '''queries''' (requests information from) a '''name server'''. This name server could be run by your ISP or in a data center somewhere.%0a%0aDNS is '''distributed'''. This means that there is no single name server that knows about every single domain on the Internet. Instead, this information is spread out all across millions of servers all across the Internet.%0a%0aA distributed name system is more robust and more practical. Imagine if all the information were only put on a single name server: if that one name server went offline, the entire Internet would stop working.%0a%0aTo achieve this distributed system, name servers are '''delegated authority''' over their own '''zones'''. For example, you might be given authority over the zone username.ircnow.org. Your server can then provide data for that hostname and any other subdomains like mail.username.ircnow.org or www.username.ircnow.org. Your server would control all subdomains within that zone (anything that contains username.ircnow.org). However, you would not be in control of example.com. This zone is delegated to another name server elsewhere. You would not be able to set up subdomains like mail.example.com unless you were delegated authority by the owner of example.com.%0a%0aThis distributed design makes DNS more resilient and shares the workload and data storage across multiple servers. This makes it possible to scale up to the size of the global Internet.%0a%0aBecause DNS was designed to be distributed, we can and should run our own nameservers for our own zones. We don't want to depend upon [[CloudFlare/Cons|CloudFlare]] or other [[https://www.zdnet.com/article/how-surveillance-capitalism-will-totally-transform-the-domain-name-system/|non-free networks]] for DNS services.%0a%0a!! Domains%0a%0aLet's take a look at a hostname like example.ircnow.org:%0a%0aAt the very top is the '''root domain''', which is represented by just a single period @@.@@ The root domain is the very top of the DNS system. Next, you have top-level domains ('''TLDs''') such as com, net, and org. After this come the second-level domains like ircnow.org.%0a%0aUsually, when you purchase a domain, you are purchasing a second-level domain. For example, you might purchase coolchatclub.com for your team for $20USD per year. [[dns/domain|To purchase the domain]], you would go to a name registrar and pay a registration fee.%0a%0aOnce you purchase a (second-level) domain, you can then create your own subdomains free of charge. For example, if you own ircnow.org, you can create example.ircnow.org free of charge by setting up your own name server and [[dns/zonefile|zone file]]. [[dns/providers|Some providers]] will offer subdomains free of charge.%0a%0a!! Setting up name server%0a%0aIf you register your own domain, the registrar will let you specify your own name servers. They will probably offer you a web panel to put in the IP addresses. By convention, these nameservers are usually referred to as ns1 and ns2, so the hostnames will be ns1.example.com, ns2.example.com, and so forth. You'll need to provide [[dns/records|glue records]]. When someone on the Internet queries your domain name, these glue records provide the IP addresses for your nameservers, which then contain the actual data for your servers.%0a%0aFor the nameserver, we recommend using [[openbsd/nsd|nsd]] because it comes as part of OpenBSD's base system.%0a%0aSee Also:%0a%0a|| [[dns/records|DNS Records]] || [[dns/zonefile|DNS Zone Files]] || [[openbsd/vhost|vhost]] || [[openbsd/dig]] || [[openbsd/host]] ||%0a|| [[openbsd/unbound]] || [[openbsd/nsd|NSD]] || [[https://wiki.ircnow.org/index.php?n=Dns.BindResolver|BIND Resolver]] || time=1644478769 title=Domain Name System author:1644478769=nixdork csum:1644478769=Fix typo diff:1644478769:1644478718:=40c40%0a%3c || [[openbsd/unbound]] || [[openbsd/nsd|NSD]] || [[https://wiki.ircnow.org/index.php?n=Dns.BindResolver|BIND Resolver]] ||%0a\ No newline at end of file%0a---%0a> || [[openbsd/unbound]] || [[openbsd/nsd|NSD]] || [[https://wiki.ircnow.org/index.php?n=Dns.BindResolver||BIND Resolver]] ||%0a\ No newline at end of file%0a host:1644478769=185.220.103.113 author:1644478718=nixdork csum:1644478718=Fix typo diff:1644478718:1644478632:minor=40c40%0a%3c || [[openbsd/unbound]] || [[openbsd/nsd|NSD]] || [[https://wiki.ircnow.org/index.php?n=Dns.BindResolver||BIND Resolver]] ||%0a\ No newline at end of file%0a---%0a> || [[openbsd/unbound]] || [[openbsd/nsd|NSD]] || [[https://wiki.ircnow.org/index.php?n=Dns.BindResolve||BIND Resolver]] ||%0a\ No newline at end of file%0a host:1644478718=185.220.103.113 author:1644478632=nixdork csum:1644478632=Adding link to BINDResolve diff:1644478632:1612420334:minor=19,20c19,20%0a%3c Because DNS was designed to be distributed, we can and should run our own nameservers for our own zones. We don't want to depend upon [[CloudFlare/Cons|CloudFlare]] or other [[https://www.zdnet.com/article/how-surveillance-capitalism-will-totally-transform-the-domain-name-system/|non-free networks]] for DNS services.%0a%3c %0a---%0a> Because DNS was designed to be distributed, we can and should run our own nameservers for our own zones. We don't want to depend upon [[CloudFlare/Cons|CloudFlare]] or other non-free networks for DNS services.%0a> %0a40c40%0a%3c || [[openbsd/unbound]] || [[openbsd/nsd|NSD]] || [[https://wiki.ircnow.org/index.php?n=Dns.BindResolve||BIND Resolver]] ||%0a\ No newline at end of file%0a---%0a> || [[openbsd/unbound]] || [[openbsd/nsd|NSD]] ||%0a\ No newline at end of file%0a host:1644478632=185.220.103.113 author:1612420334=jrmu diff:1612420334:1612420334:=1,40d0%0a%3c (:title Domain Name System:)%0a%3c %0a%3c !! Too Many IPs%0a%3c %0a%3c There are over 4 billion possible [[openbsd/IPv4|IP addresses]], and an astronomical number of [[openbsd/ipv6|IPv6 addresses]]. No human can memorize them all. So, instead of typing IPs like 192.168.0.1 into our web browser, we use hostnames like ircnow.org, which are far easier to remember. Our computers take these hostnames and tries to find their IP addresses; this process is called '''name resolution'''.%0a%3c %0a%3c !! How DNS works%0a%3c %0a%3c To perform '''name resolution''', the client (such as a phone or a laptop) needs a '''name resolver'''. The name resolver then '''queries''' (requests information from) a '''name server'''. This name server could be run by your ISP or in a data center somewhere.%0a%3c %0a%3c DNS is '''distributed'''. This means that there is no single name server that knows about every single domain on the Internet. Instead, this information is spread out all across millions of servers all across the Internet.%0a%3c %0a%3c A distributed name system is more robust and more practical. Imagine if all the information were only put on a single name server: if that one name server went offline, the entire Internet would stop working.%0a%3c %0a%3c To achieve this distributed system, name servers are '''delegated authority''' over their own '''zones'''. For example, you might be given authority over the zone username.ircnow.org. Your server can then provide data for that hostname and any other subdomains like mail.username.ircnow.org or www.username.ircnow.org. Your server would control all subdomains within that zone (anything that contains username.ircnow.org). However, you would not be in control of example.com. This zone is delegated to another name server elsewhere. You would not be able to set up subdomains like mail.example.com unless you were delegated authority by the owner of example.com.%0a%3c %0a%3c This distributed design makes DNS more resilient and shares the workload and data storage across multiple servers. This makes it possible to scale up to the size of the global Internet.%0a%3c %0a%3c Because DNS was designed to be distributed, we can and should run our own nameservers for our own zones. We don't want to depend upon [[CloudFlare/Cons|CloudFlare]] or other non-free networks for DNS services.%0a%3c %0a%3c !! Domains%0a%3c %0a%3c Let's take a look at a hostname like example.ircnow.org:%0a%3c %0a%3c At the very top is the '''root domain''', which is represented by just a single period @@.@@ The root domain is the very top of the DNS system. Next, you have top-level domains ('''TLDs''') such as com, net, and org. After this come the second-level domains like ircnow.org.%0a%3c %0a%3c Usually, when you purchase a domain, you are purchasing a second-level domain. For example, you might purchase coolchatclub.com for your team for $20USD per year. [[dns/domain|To purchase the domain]], you would go to a name registrar and pay a registration fee.%0a%3c %0a%3c Once you purchase a (second-level) domain, you can then create your own subdomains free of charge. For example, if you own ircnow.org, you can create example.ircnow.org free of charge by setting up your own name server and [[dns/zonefile|zone file]]. [[dns/providers|Some providers]] will offer subdomains free of charge.%0a%3c %0a%3c !! Setting up name server%0a%3c %0a%3c If you register your own domain, the registrar will let you specify your own name servers. They will probably offer you a web panel to put in the IP addresses. By convention, these nameservers are usually referred to as ns1 and ns2, so the hostnames will be ns1.example.com, ns2.example.com, and so forth. You'll need to provide [[dns/records|glue records]]. When someone on the Internet queries your domain name, these glue records provide the IP addresses for your nameservers, which then contain the actual data for your servers.%0a%3c %0a%3c For the nameserver, we recommend using [[openbsd/nsd|nsd]] because it comes as part of OpenBSD's base system.%0a%3c %0a%3c See Also:%0a%3c %0a%3c || [[dns/records|DNS Records]] || [[dns/zonefile|DNS Zone Files]] || [[openbsd/vhost|vhost]] || [[openbsd/dig]] || [[openbsd/host]] ||%0a%3c || [[openbsd/unbound]] || [[openbsd/nsd|NSD]] ||%0a\ No newline at end of file%0a host:1612420334=198.251.81.119