Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Protocol Analysis of data Link layer

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

The purpose of the data link layer is to achieve reliable data transmission over less reliable physical links through some data link layer protocols based on the physical layer. That is, the data link layer provides reliable data communication between neighboring nodes in the network.

The main function of the data link layer is to provide connection services for the network layer and to transmit frames over the data link connection. According to the function, it can be divided into two types: connected and unconnected. This lab uses a responsive, connectionless service. When there is no connection service, when the data link layer of the sender wants to send data, it sends the data frame directly. The data link layer of the receiver can accept the data frame, or the received frame is verified correctly, just as the source host data link layer sends the reply frame; when the frame cannot be accepted or the check of the received frame is incorrect, it returns a negative reply, and the sender either retransmits the original frame or enters the waiting state.

In the data link layer, it is mainly responsible for transmitting data. There are many protocols, most of which are Ethernet protocol in LAN, PPP protocol and HDLC protocol in wide area network.

The principle of grasping packets in Ethereal Software

1. First of all, the data will be encapsulated in the transport layer according to the application (for example, the WEB application uses the TCP protocol) to encapsulate the TCP message data, while the TCP message communicates according to the source and destination port, that is, this port number identifies which application in our computer application layer! For example, when our computer sends a HTTP connection, our computer will randomly take a port number, and the destination port will be sealed with 80 (if the destination WEB server uses the default port). If the target host receives this data, it will know that this data is given to my HTTP application!

two。 Once again, the network layer will be encapsulated, which will contain control bits to indicate which transport layer protocol is used for this data message, such as 0X06 for TCP, where there will be encapsulation of source and destination IP addresses.

3. Finally, the data link layer encapsulation, that is, layer 2, will have TYPE bytes to indicate which network layer protocol I encapsulated at the upper layer, for example, IP is 0X0800, and then the source and destination MAC address is encapsulated, which is used to address in the Ethernet network.

Such a packet is completed.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report