Home > other >  Computer network - the data link layer
Computer network - the data link layer

Time:09-18

First we want to know what is the network, the network including simple network and by the network of the Internet, the following will introduce the computer in the network data link layer,
1, the data link layer using channel mainly has the following two types:
Point-to-point channel, the channel using one-to-one point-to-point communication mode,
Broadcast channel, the channel using a one-to-many broadcast communication way, so the process is more complex, radio channel connected hosts many, therefore must use dedicated Shared channel protocol to coordinate these data to send,
Let's take a look at the data link layer of the simple model, as shown in the figure below:


Can see the figure in the process of host H1 H2 to send data, it is important to note that different link layer may adopt different data link layer protocol,
2, the data link another term, divided into physical link and logical link, data link layer frame, it ACTS like a digital pipelines, often in a data link layer between two peer out a digital pipeline, and on the pipeline transmission unit is frame, as shown in the figure below:

Data link layer need not consider details of how to realize the physical bit transmission, can even more easily imagine seems to be along the horizontal direction between the two data link layer frame directly sent to the other party,
There are many kinds of data link layer protocol, but there are three basic problems are common, three basic question is this: encapsulated into a frame, transparent transmission, error control,

? Encapsulated into a frame
Is encapsulated into a frame in a piece of data before and after adding first and tail respectively, and then form a frame, determine the boundaries of the frame,
At the end of the first and an important role is to frame and bound, as shown in the figure below:


When the data is made up of the printable ASCII text file, the frame and bound is the use of the special frame delimiter,
Frame start identifier: SOH, end of the frame: EOT,

? Transparent transmission
If the data of a certain bytes of the binary code just like SOH or EOT, data link layer is wrongly "find the boundary of the frame,"
Solution to the transparent transmission: byte filling or characters filling, sending the data link layer in the data control in the front of the characters' SOH 'or "EOT" insert an escape character "ESC" (its 16 system is 1 b), the data link layer at the receiving end before the data sent to the network layer to delete insert escape character, if the escape character also appear in the data, so should be in front of the escape character inserted an escape character ESC, when the receiver receive continuous two escape character, just delete one front,

See below bytes filling method for solving the problem of transparent transmission example, as shown in the figure below:


? Error detection
During transmission may produce bit error: may become 0, 0 May become 1, for a period of time, the transmission error of the total number of transmission bit by bit ratio called BER BER, bit error rate and signal to noise ratio has much to do, in order to guarantee the reliability of data transmission in a computer network to transmit data, measures must be used in a variety of error detection,

Here is a kind of detection: cyclic redundancy method,
Principle is in the sending end, the data are divided into groups, first assumes that no group k bits,
Redundancy computing cases, as shown in the figure below:


More than just about computer network in data link layer, you can learn or reference,

  • Related