DNSの基本
1導入
この
2階層的 で分散的 な名前空間
www.example.comのようにラベルをcomなどのexample.comなどの
DNSは
3資源 レコード
DNSが
| A | ドメイン |
AAAA | ドメイン |
CNAME | |
MX | メールを |
NS | ドメインの |
TXT |
したがって、DNSはドメインA recordまたはAAAA recordを
4リゾルバと権威 DNSサーバ
アプリケーションからDNS
5名前解決 とキャッシュ
www.example.comのアドレスを
- アプリケーションがスタブリゾルバへ
照会 を依頼 する。 - スタブリゾルバが
再帰 リゾルバへ照会 する。 再帰 リゾルバは、有効 なキャッシュがあれば、その回答 を返 す。必要 なキャッシュがなければ、ルート、TLD、権威 DNSサーバの委任関係 をたどって参照先 と回答 を取得 する。キャッシュされた委任情報 があれば、その途中 から開始 する。再帰 リゾルバが回答 をキャッシュし、スタブリゾルバへ返 す。
6DNSのトランスポート
DNSの
DNS
7名前解決 からWeb通信 へ
URLのホストがドメイン
8要点
- DNSは
階層的 かつ分散的 な名前空間 と資源 レコードの照会 システムである。 再帰 リゾルバは、キャッシュまたは権威 DNSサーバなどへの照会 から回答 を取得 する。- キャッシュはTTLの
期間 に回答 を再利用 し、遅延 と負荷 を低減 する。 - DNS
通信 はIPネットワーク上 でUDP、TCP、または暗号化 された方式 を使用 する。
9次 に進 む講義
data/lecture/information/networks/http-basics.lecture.n.md
DNS Fundamentals
data/lecture/information/networks/tcp-and-ip-basics.lecture.n.md1Introduction
This lecture explains how the
2A Hierarchical, Distributed Namespace
A www.example.com, consists of hierarchically joined labels. The DNS namespace has a root at its top, followed by com and lower domains such as example.com.
DNS does not store all information on one server. It is a distributed system that delegates management of parts of the namespace to multiple organizations and servers.
3Resource Records
The units of information stored by DNS are called
| Type | Role |
|---|---|
| A | Associates a domain name with an IPv4 address |
AAAA | Associates a domain name with an IPv6 address |
CNAME | Associates an alias with a canonical name |
MX | Specifies a server that receives email |
NS | Specifies an authoritative name server for a domain |
TXT | Stores textual information |
DNS therefore does more than convert domain names to IP addresses. Address retrieval through an A record or AAAA record is one important use.
4Resolvers and Authoritative Name Servers
A
An authoritative name server supplies the official resource records for a delegated portion of the namespace. A recursive resolver performs iterative queries to multiple name servers on behalf of a client and returns the final answer to the client.
5Resolution and Caching
Retrieving an address for www.example.com conceptually proceeds as follows.
- An application requests a query through its stub resolver.
- The stub resolver queries a recursive resolver.
- If the recursive resolver has a valid cached answer, it returns that answer.
- If the required information is not cached, it follows delegations involving root, TLD, and authoritative name servers to obtain referrals and an answer. Cached delegation information can allow it to begin partway through this process.
- The recursive resolver caches the answer and returns it to the stub resolver.
A resource record has a
6DNS Transport
Traditional DNS communication normally uses UDP or TCP on port 53. UDP is widely used for ordinary queries, while TCP is used when a UDP response is truncated or an operation requires TCP.
DNS queries themselves operate over IP networks. DNS must therefore not be interpreted as a separate process that occurs before TCP/IP.
7From Resolution to Web Communication
When a URL host is written as a domain name, a client uses DNS to obtain one or more IP addresses and selects a destination. It then establishes a TCP connection for HTTP/1.1 or HTTP/2. HTTP/3 instead uses
8Key Points
- DNS is a hierarchical, distributed namespace and resource-record query system.
- A recursive resolver obtains an answer from its cache or through queries involving authoritative name servers.
- Caches reuse answers during their TTLs to reduce latency and load.
- DNS communication operates over IP using UDP, TCP, or encrypted alternatives.