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

How to analyze data Link Protocol HDLC and PPP

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly analyzes how to analyze the relevant knowledge points of data link protocol HDLC and PPP, the content is detailed and easy to understand, the operation details are reasonable, and has a certain reference value. If you are interested, you might as well follow the editor and learn more about "how to analyze data link protocols HDLC and PPP".

1. Common data link protocols (HDLC, PPP)

(1) the idea of analyzing the protocol

Step 1: get an overview of the protocol and know the purpose and basic features of the protocol design.

Step 2: take the format of the protocol data unit (frame for the data link layer) as the main clue to study the specific implementation of the protocol.

Step 3: how does the agreement solve practical problems?

(II) HDLC protocol (high-level data link control protocol) (bit-oriented protocol)

HDLC protocol is a bit-oriented protocol, which mainly solves the data link layer link management, addressing, frame synchronization, error control, flow control, it has two characteristics of balanced system and unbalanced system.

1. The composition of HDLC:

Frame structure (syntax)

Discipline elements (syntax)

Rule type (semantic)

Using HDLC syntax, you can define a variety of link layer protocols with different operational characteristics.

2. Description of HDLC

HDLC puts forward three levels of concepts in his description:

(1) Classification of all nodes involved in communication (data station): primary station, secondary station, combined station.

In the previous centralized control of single-processor-centered multi-terminal online systems, primary and secondary stations appeared in pairs, while for the current distributed architecture (such as packet switching network), all sites are combined stations.

(2) Link type: balanced type, non-balanced type.

The centralized control belongs to the unbalanced type, while the distributed control belongs to the balanced type.

(3) Operation mode: normal response mode, asynchronous response mode, asynchronous balance mode.

For the balanced type, there is only asynchronous balance mode, that is, each site sends out communication independently, which is an autonomous system. For the unbalanced type composed of primary station and secondary station, there is a normal response mode, that is, the secondary station must be controlled by the primary station, and the data transmission can not be initiated actively without the permission of the primary station. In the asynchronous response mode, the secondary station can initiate data transmission actively.

3. Format of HDLC protocol data unit (frame format)

(1) Flag field: both the header field and the trailer field are composed of "01111110" in content, which is used to divide the start position and end position of the frame.

(2) address field: it has two defects: first, because it was designed for a single-processor-centered multi-terminal online system at that time, there is only one address (terminal address), which is not suitable for today's distributed computer systems. Second, the address is only 8 bits, that is, a maximum of 256 nodes can be represented.

(3) Information field: the user data part of the protocol data unit, the length is variable, but in general it is 1500 bytes.

(4) frame check sequence: use CRC check method.

(5) message frame: the sender uses a fixed-size sliding window protocol when sending data (the window size is fixed to 7).

4. Type of HDLC frame

Frame type: (1) Information frame: the frame used to transmit data for the upper entity.

(2) Monitoring frame: error control and flow control

(3) unordered frame: link management control, which is responsible for negotiating how the two parties communicate and how to use the channel.

(3) Agreement engineering design

1. Protocol specification (requirement analysis, function design): generally, there is no natural language description (redundancy, polysemy, poor structure). It is described by finite state machine (FSM), Petri net and so on.

2. Protocol verification (whether the working mode of the protocol takes into account all the problems encountered in the network environment and whether it can operate normally)

3. Protocol testing: conformance testing, interoperability testing, performance testing

4. Finite state machine: it believes that any protocol is to describe all kinds of states in the network, and the state is finite.

(1) the finite state machine is a quaternion.

S is the set of states, M is the set of labels, I is the set of states, T is the set of transitions.

The basic idea is that when a transition occurs, it will migrate from one state to another, and the reason for the change is the command from the user, the arrival of information, internal timeouts and other events.

(2) status example: simplex stopping and waiting protocol with channel error

State is represented by triple XYZ: XYZ

X: the frame sequence number being sent by the sender, which is 0 or 1

Y: the frame sequence number that the receiver is waiting for, which is 0 or 1

Z: Channel status: 0 (indicates that a frame with sequence number 0 is being transmitted)

1 (indicates that a frame with sequence number 1 is being transmitted)

A (the channel is transmitting the reply frame)

Or-(null) (indicates that the channel does not transmit data or the transmitted data is incorrect)

Its initial state is 000

(3) advantages: simplicity and accuracy

Disadvantages: for complex protocols, the number of events and states will increase, making it difficult to deal with.

5. Perti net

1) elements:

Position: describes the system state, represented by a circle

Transition: describes an event that modifies the state of the system, represented by a rectangle or line segment

Arc: describes the relationship between states and events, including input arcs and output arcs, represented by directed arcs.

Black dots: markers, which are current statu

As shown in the figure, the preti description of simplex stop and other protocols with errors is that three different states can be described separately.

(4) data link layer of Internet

1. Two main situations of point-to-point communication (the main situation of intenet work):

(1) Router to router:

(2) dial up the Internet through the modem, or connect to the access server

How to access INTERNET: dial-up access (if users want to connect to internet, there is a router or host connected to it, they must apply for access), Direct Connect access (the line is open in real time, and data transmission can be completed without application)

2. SLIP (Serial LINE IP Serial Line IP Protocol)

This protocol was proposed in 1984, sending the original IP packet, delimited by a 0Xc0, and using character filling technology. The main problems are not to provide error checking, can only support IP protocol and IP addresses can not be dynamically assigned, do not support authentication, multi-version incompatibility and other problems, are no longer used.

3. PPP (point-to-point Protocol) Protocol (RFC 1661 16621663)

(1) Features: provide error checking, support multiple protocols, allow dynamic IP addresses, and support identity authentication

(2) unlike SLIP, it does not send the original IP packet, but transmits it in frame bit units.

(3) in order to increase the adaptability and flexibility of the PPP protocol, the protocol is divided into two parts, one is the link control protocol LCP (LinkControl Protocol), which can establish and test a variety of physical layer services, so that this data link layer can support more types.

(4) PPPoE (Point to Point Protocol over Ethernet) is a point-to-point communication protocol based on Ethernet

(5) frame format: the frame format of PPP protocol is basically the same as that of HDLC protocol, but there are two differences: first, HDLC protocol is bit-oriented, while PPP protocol is character-oriented, which requires all communicating nodes to support the ASCII character set; second, PPP protocol is a simplified version of HDLC:

(1) the delimiters of the beginning and end of the frame are the same as those of the HDLC protocol (00111111)

(2) the address field retains 8 bits (8 1s) and does not require an address (the application environment is two segments corresponding to a link, no address is required)

(3) Control field (disordered frame)

(4) Protocol field: which application process is pointed to for processing after the processing is completed (IP/IPX. )

(5) net load field: default is 1500 bytes (6) checksum field: 2 or 4 bytes

This article mainly analyzes how to analyze the relevant knowledge points of data link protocol HDLC and PPP, the content is detailed and easy to understand, the operation details are reasonable, and has a certain reference value. If you are interested, you might as well follow the editor and learn more about "how to analyze data link protocols HDLC and PPP".

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