Ethernet and DNS

ethernet

The data link layer considers the transmission between two adjacent nodes (devices directly connected by network cable/optical fiber/wireless), and the most typical protocol in the data link layer is " Ethernet " .

The Ethernet protocol specifies the data link layer and also specifies the content of the physical layer. The network cable we use is also called "Ethernet cable" (a network cable that complies with the Ethernet protocol)

Ethernet frame format

Ethernet data frame = frame header + payload (complete IP datagram) + frame tail 

There are destination address , source address , and type in the frame header. The address here is not expressed by IP address, but by mac address (physical address), which is completely independent of IP address. Another set of address system

The IP address is used to describe the start and end of the entire transmission process, and the mac is used to describe the start and end of two adjacent nodes.

type

0800 Ordinary Ethernet data frame, the payload part is a complete IP datagram

0806 The payload part is an ARP packet

0835 The payload part is a RARP packet

The ARP protocol is a data link layer protocol. Through this protocol, a router/switch can recognize other devices in the LAN, and a table can be established in the switch/router through the ARP protocol. This table is equivalent to a hash table, which can Establish the mapping relationship between IP and mac.

MTU is a data link layer data frame that can carry the maximum length of data (payload length). The length of the payload is determined by the physical medium used and the protocol used by the data link layer. For example, Ethernet data frame, MTU is 1500 Byte.MTU will cause the IP protocol to perform packet grouping, so the packetization of the IP protocol is usually not divided according to the maximum IP length of 64K, usually the MTU of the data link layer is smaller than 64kb

DNS

DNS is an application layer protocol , also known as: domain name resolution system

A domain name is what we often call a website. If a server on the network wants to access a website, what it needs is the IP address corresponding to the website. What DNS does is, when we visit a domain name, it will automatically request the DNS server . The DNS server will help us query the IP address corresponding to the website to be accessed . If the DNS configuration of the computer is incorrect, or the DNS server is down, it may appear that the network is normal, but the webpage cannot be opened.

Each domain name corresponds to a specific IP address , so the domain name of the website cannot be repeated. We divide the domain names

For example, www.baidu.com, .com is the first-level domain name, com is the abbreviation of "company", similarly there are org, cn, us baidu is the second-level domain name, indicating the company Baidu, and www is the third-level domain name, indicating the World Wide Web .

If we want to register a website, apply for a domain name, and associate the domain name with the IP address of the server, we need to write the data to the DNS server. There are tens of thousands of DNS servers in the world, and the data of these servers come from the root The server, the root server is controlled by the United States, so this is also the reason for using IPv6 , which creates a new DNS system.

Guess you like

Origin blog.csdn.net/qq_62712350/article/details/130056201