计算机网络系列(5)之应用层Domain Name System (DNS)

来源:互联网 发布:java入门经典 pdf 编辑:程序博客网 时间:2024/06/05 19:58

1. Domain name system
1.1. Domain name
For convenience to users, a domain name system (DNS) uses domain names to represents IP addresses.

1.2. Resolve domain names
Before communication, a domain name must be resolved into its corresponding IP address.

1.3. Domain name server
If an organization manages its domain and domain names, it operates a domain name server (DNS server) to store these domain names and their corresponding IP addresses.

1.4. DNS server hierarchy
The top is a root DNS server

1.5. Speeding up DNS server
Replication (fast processing and fast communication)
Caching

2. Network address translation (NAT)
Nowadays many IP addresses are already occupied. An organization may not be able to get enough IP addresses for its computers.

2.1. NAT
Use some private addresses for internal communications. And share one real IP address for external communication.

3. Questions
Q1: What information should a DNS server store?
binding information (i.e., domain name – ip address table) that the DNS servers are responsible for.
IP address of the root DNS server.
IP address of the DNS servers that are one-level lower in the DNS hierarchy.

Q2: A student is using the university DNS server. If he wants to resolve the domain name www.mcgill.ca, draw the steps involved in the following DNS server hierarchy.

这里写图片描述

step1: student DNS server
step2: student DNS server -> root DNS server
step3: student DNS server -> ca DNS server
step4: student DNS server -> McGill DNS server

Q3: A company is given one IP address 158.183.1.1 by an ISP, its computers use NAT to share this IP address, and it plans to run a web server as follows:
- The web server uses TCP and port number 80.
- The web server is run on a computer with private IP address 192.168.0.1
How should the NAT router be configured?

Port number: 80
Static private address: 192.168.0.1

4. 总结
重点1:DNS的步骤上,首先访问当前的DNS服务器,解析相应域名的IP地址,如果解析不了,该DNS服务器会直接访问root DNS服务器,灾后该DNS服务器再在通过Root DNS服务器的总表,逐层地向下进行访问,直到找到相应的目标DNS服务器。

重点2: NAT表的配置上不要画蛇添足,具体视功能而定,通常主要需要配置源静态IP地址就可以了,以及源端口,就可以了。