Data Communication ch07 Data Link Control

Source: Internet
Author: User

Chapter 4 Data Link Control

Data Link Control Protocol

Traffic Control

Adjust the data stream transmission rate to prevent cache Overflow

Error Detection

Error Control

Re-transmission of damaged Frames

Advanced Data Link Control (HDLC)

Chapter 4 Data Link Control

Data Link Control

Provides data exchange control and management measures

Requirements and objectives of Data Link Control:

Frame Synchronization

It is sent and received in the form of data blocks, and the start and end can be identified.

Traffic Control

Error Control

Addressing

Multi-Point Link

Control information and data are on the same link

You do not want to set up an independent physical communication path for the control information.

Link Management

Manage the initialization of data exchange between a large number of nodes, maintain and terminate cooperation and cooperation

7.1 Traffic Control

Traffic Control

A technology that ensures that the data sent by the sending entity does not exceed the ability of the Receiving Entity to receive data

Prevent cache Overflow

Transmission Time

The time it takes for all bits of a frame to be sent to the media.

Propagation time

The time it takes for a bit to pass through the link from the source point to the end point.

 

7.1 traffic control frame transmission model

7.1 Traffic Control

Transmission latency-tframe

The time it takes to send all the bits of a frame to the transmitted media.

Is proportional to the frame length, and the link data rate is inversely proportional

Transfer Time = L/R

L = frame length in bits

Propagation latency-tprop

Time when a bit passes through the link

Propagation time = D/V

D = link length in meters

V = propagation speed in MB/s

7.1 Traffic Control

Traffic Control Method

Stop waiting

Send one frame at a time

Sliding Window

Send several frames at a time

Sliding Window is fixed size

 

7.1.1 stop pending Traffic Control

Send data frame from Origin Site

After receiving the frame, the destination site returns an ACK message.

The Origin Site waits and receives the ACK before sending the next frame.

The target station terminates the traffic by not sending ack messages.

It is better for a small number of relatively long Frames

7.1.1 stop pending Traffic Control

Sometimes big data blocks need to be divided into small data blocks.

Cache space limit

Early detection of transmission errors

Errors occur, and the retransmission data volume is also small.

Prevents a site from occupying transmission media for a long time

It is inappropriate to stop the wait.

 

7.1.1 stop pending Traffic Control

Link Utilization

Link bit length

B = r × (D/V)

R: data rate; D: link length; V: propagation rate

Meaning: How many bits are placed on the link from the time when a bit is placed on the link to the time when it reaches the receiving node.

7.1.1 stop pending Traffic Control

7.1.1 stop pending Traffic Control

7.1.1 stop pending Traffic Control

When a <1 and A> 1, there are:

Total time = 1 + 2a

U = 1/(1 + 2a)

7.1.2 Sliding Window Traffic Control

Allows continuous transmission of multiple frames

The receiver allocates a cache of W frames.

The sender can send W frames without confirmation

Each frame is identified by a serial number.

Ack includes the sequence number of the next frame to be received.

The serial number is limited.

The sequence number specified by the field size (k)

Number frames in 2 k Mode

Window Size: 2 k-1

 

7.1.2 Sliding Window Traffic Control

Sliding Window of sender:

When data is sent and sent, the sliding window starts to shrink from the left;

Sliding Window expands to the right when confirmation is received

Sliding Window of receiver B:

When data is received, the sliding window shrinks from the left;

Sliding Window expands to the right when sending confirmation

 

7.1.2 Sliding Window Traffic Control

Further improvement:

B can confirm the frame by not allowing to continue sending (receive not ready, RnR)

After that, you must send a normal confirmation to re-enable the sliding window.

For bidirectional transmission, piggybacking is used)

In addition to carrying the frame sequence number, the frame sequence number field is also included in the data frame.

If no data is sent, use the confirmation frame.

If you only send data without sending confirmation, resend a confirmation number.

 

7.2 Error Control

Error Control: used for error detection and Error Correction

Two types of errors

Frame loss

Frame damage

Most common technology

Error Detection

Confirm

Deny and re-transmit

Timeout retransmission

 

7.2 Error Control

Automatic retransmission request (ARQ)

Stop waiting for ARQ

Returns n arq.

Select to reject ARQ

 

7.2 Error Control-stop waiting for ARQ

Send a single frame from the Origin Site

Waiting for ACK confirmation

Use ack0 and ack1 Alternately

If the received frame is corrupted, the frame is discarded.

A has a timer.

If the Ack is not received after the timeout, re-upload the frame.

If Ack is damaged, A cannot identify

A re-transmits the frame

B receives two copies of the frame.

Discard duplicate frames

The third frame is lost or damaged, with no ACK

Timeout and retransmission

Ack0 loss

Timeout and retransmission

7.2 Error Control-stop waiting for ARQ

Advantages and disadvantages

Simple

Inefficient

 

7.2 Error Control -- Return N ARQ

Based on Sliding Window

Window control maximum number of unconfirmed Frames

No error. The end point is sure to confirm the received frame. Generally, the receiver is used to confirm the expectation for the next frame (RR = receive ready)

If an error occurs, send a denial (rej = rejection)

B. Discard the frame and subsequent frames until the wrong frame is correctly received.

The sender must re-transmit frames with errors and all subsequent frames.

7.2 Error Control -- Return N ARQ

Frame damage

Frame I error detected by B

(1) A continues to send frame I + 1

B receives the I + 1 frame and finds that the order is incorrect.

B sends rej-I

A receives rej-I

A re-transmits frame I and all subsequent Frames

(2) A does not continue sending, B does not receive any frames, and no response is returned.

Counter A times out, transmitting RR frames, where p bit = 1

B receives the RR, and the returned RR indicates the next frame that he wants to receive

A receives the RR from B and retransmits the frame I

7.2 Error Control -- Return N ARQ

Rr damage

B receives the I and sends the RR (I + 1), but it is lost during transmission.

(1) The next RR (I + n) arrives before frame I timeout

(2) A's timer times out, transmits an RR, P bit = 1, and sets a p bit Timer

If no response is received, the P-bit timer of A times out and repeats the process.

This process will be repeated several times

 

7.2 Error Control -- Return N ARQ

Rej damage

For example, the second case of frame damage

 

7.2 Error Control -- Return N ARQ

An example of returning n arq Frames

Due to the transmission delay of the line, when rr-I or rej-I returns to the sender, the sender has sent frame I + 1 and subsequent Frames

4th frames damaged or lost

5th and 6th frames arrive, discarded due to out-of-order

The receiver immediately sends the REJ-4 when 5th frames arrive

The sender receives the REJ-4 and retransmits 5th, 6 Frames

Rr 7 damaged or lost

Timeout. Send the RR with p bits set to 1.

 

7.2 Error Control-select to reject ARQ

Select to reject ARQ and execute the selected retransmission policy

Only retransmits the denied frame and the time-out frame.

Received and cached for frames arriving in order

Advantages:

The number of retransmitted frames is minimized.

Disadvantages:

The receiver must maintain a large enough Cache

The sender also needs more complex logic that can send time series frames.

 

7.2 select to reject ARQ

4th frames damaged or lost

The receiver returns the SREJ-4 and receives subsequent Frames

The sender receives the SREJ-4 and retransmits 4th Frames

The receiver receives 4th frames and inserts them into the buffer in the appropriate order.

Lost RR-1

The sender timer times out and sends RR (P = 1)

Receiver sends RR-3 and prepares to receive 3rd Frames

 

7.2 Error Control-select to reject ARQ

Select the size of the window for rejecting ARQ

The size limit of the selected rejected window is stricter than that of the n arq returned

Consider a window of 7 (23-1)

The sender sends 0th to 6th frames to the receiver.

The receiver receives all seven frames and cumulative confirmation with RR7. The receiving window has been adjusted to receive 7th, 0, 1, 2, 3, 4, and 5 frames.

RR7 loss due to burst noise

The sender times out and retransmits 0th Frames

At this time, the receiver mistakenly assumes that the 0 frame is the new 0 frame, and the 7th frame is lost.

The preceding problem is that the sending and receiving windows overlap.

To overcome this problem, the maximum window size should not be half of the serial number range.

 

7.3 Advanced Data Link Control-site type

Main Site

Responsible for controlling Link Operations

The sent frame is called a command.

Maintain an independent Logical Link for each slave station on the Link

Slave Station

Operate under the control of the main site

The sent frame is called a response.

Hybrid sites

The sent frame can be a command or response.

7.3 Advanced Data Link Control-link settings

Unbalanced settings

One master station and one or more slave stations

Support full-duplex or half-duplex transmission

Balance settings

Composed of two hybrid sites

Support full-duplex or half-duplex transmission

7.3 Advanced Data Link Control

Data Transmission Mode

Normal response (NRM)

Asynchronous balancing (ABM)

Asynchronous response (ARM)

 

7.3 Advanced Data Link Control-Data Transmission Mode

Normal response (NRM)

Unbalanced settings

Data transmission from the master station initialization to the slave station

The slave station transmits data to respond to the commands of the master station.

Used for Multi-Point lines

Connect multiple terminals to one master computer

Terminal as slave station

The main site collects data through polling

 

7.3 Advanced Data Link Control-Data Transmission Mode

Asynchronous balancing (ABM)

Balance settings

Both hybrid sites can initialize data transmission without permission

Most widely used

No additional overhead for round-robin, effectively utilizing full-duplex point-to-point links

7.3 Advanced Data Link Control-Data Transmission Mode

Asynchronous response (ARM)

Unbalanced settings

The master site does not explicitly allow the slave site to initialize the transmission.

However, the main site is still solely responsible for the line

Rarely used

7.3.2 Frame Structure

Synchronous Transmission

All transmissions are in the frame format.

An independent frame format can fully meet various types of data and control switching

 

7.3.2 Frame Structure-flag field

01111110 Mode

It is bound at both ends of the frame.

It may be both the end mark of a frame and the start mark of the next frame.

Receiver search flag sequence used for frame start Synchronization

Fill 01111110 of data in bits to avoid confusion with the flag field.

5: 1: insert an additional 0.

If the receiver finds that there are 5 1 modes, check the next bit.

If it is 0, delete

If it is 1 and 7th bits are 0, the combination is considered as a flag field

If both the following bits are 1, the sender specifies that the exception is aborted.

7.3.2 Frame Structure-address field

Indicates the slave station that transmits the frame or is preparing to receive the frame.

Usually 8 bits

The extended format can be used. The actual address length is a multiple of 7 bits.

The priority of each eight-bit group is 1 or 0, depending on whether it is the last eight-bit Group of the field.

Eight-bit group address 11111111, broadcast frame, all slave stations can receive

7.3.2 Frame Structure-Control Field

Different types of frames have different control fields.

The following frame types are available:

Information Frame-data transmitted to users

Traffic control and error control data are included in the information frame.

Monitoring frame-ARQ mechanism is provided when the monitoring frame is not used

Unnumbered frame-added Link Control Function

The first or two digits in a field are marked as frame types.

7.3.2 Frame Structure -- Control Field Format

 

7.3.2 Frame Structure-Information Field

Only information frames and unnumbered frames are available.

An integer must contain eight digits.

Variable Length

 

7.3.2 Frame Structure-FCs

Frame verification sequence

16-bit CRC

32-bit CRC

HDLC Running Mode

Information frames, monitoring frames, and unnumbered frames are exchanged between two sites.

Three Phases

Initialization

Data Transmission

Split connections

Initialization

The initialization can be requested by either party by issuing one of the six location commands.

These commands have three functions:

Request Initialization

Specify one of the three required transmission modes

NRM, ABM, arm

Specifies whether the sequence number is 3 bits or 7 bits.

Peer response

Accept the request and send a unnumbered confirmation (UA) frame to the initiator.

Reject the request and send it back to the initiator with a split-chain (DM) frame.

Data Transmission

After the request is initialized and accepted, both parties establish a logical connection

Both parties can start sending user data in the Information Frame. the frame number starts from 0.

The N (s) and N (r) Fields of Information frames are serial numbers that support traffic control and error control.

The sequence number of the information frame is in the order of 8 or 128, depending on whether it is a 3-bit sequence number or an 8-bit sequence number.

Monitoring frames (RR, RnR, rej, srej) are also used for traffic control and error control.

 

Chain splitting

Any HDLC module of either party can initiate chain splitting.

If a fault occurs, initiate it by yourself.

Or, based on high-level user requests

Send a disc frame to announce connection termination

The remote entity uses an UA frame to answer the request and notifies the third-level user that the connection has been terminated.

Any unconfirmed frames may be lost, and its recovery is the responsibility of the senior management.

 

Summary of this Chapter

Data Link Control Protocol

Traffic Control

Adjust the data stream transmission rate to prevent cache Overflow

Error Detection

Error Control

Re-transmission of damaged Frames

Advanced Data Link Control (HDLC)

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.