计算机网络 --- DNS协议

什么是DNS

  • 一个将域名转换为IP地址的directory service
  • A distributed and hierarchical database implemented in a hierarchy of DNS servers
  • An application-layer protocol that allows hosts to query the distributed database
  • DNS protocol runs over UDP and uses port 53

DNS工作原理

Overview

Step 1: the application, such as browser, will invoke the client side of DNS, specifying the hostname that needs to be translated (use gethostbyname())

Step 2: DNS in the user’s host then takes over, sending a query message into the network. (using UDP and port 53)

Step 3: After a delay, DNS in the user’s host receives a DNS reply message that provides the desired mapping and passed to the invoking application.

Three Classes of DNS servers

1: Root servers

  • 13 root servers managed by 13 different organizations
  • provide the IP addresses of the TLD servers

2: top-level domain DNS servers

  • For each of the top-level domains (com, .org, .uk, .fr, .cn) has a TLD server
  • provide IP addresses for authoritative DNS server.

3: authoritative DNS servers

  • Every organization with publicly accessible hosts on the internet has an authoritative DNS server.
  • The organization can build its own DNS server or pay to use third-party DNS server.

Local DNS server (ISP server)

  • Each ISP—such as a residential ISP or an institutional ISP—has a local DNS server (also called a default name server).
  • When a host makes a DNS query, the query is sent to the local DNS server, which acts a proxy, forwarding the query into the DNS server hierarchy

Two Types of Query

Iterative query

Recursive query (usually used)

在这里插入图片描述

DNS Caching

Each time the local DNS server dns.nyu.edu receives a reply from some DNS server, it can cache any of the information contained in the reply. If a hostname/IP address pair is cached in a DNS server and another query arrives to the DNS server for the same hostname, the DNS server can provide the desired IP address.

DNS安全

DNS劫持

DNS欺骗

DDos攻击

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值