2016.6.13 Review points of computer network chapter III Data Link layer

Source: Internet
Author: User

* * The channel used by the data link layer mainly has the following two classes:

(1) Point-to-point channel: Use a one-to-one point-to-point communication method.

(2) Broadcast channel: Use a one-to-many broadcast communication mode. There are many hosts connected on the broadcast channel, so a dedicated shared channel protocol must be used to coordinate data transmission for these hosts.

3.1 Data Link layer using point-to-point channel

* * Link: is a physical line (wired or wireless) from one node to an adjacent node, without any other exchange nodes in the middle. A link is just a part of a path.

* * Data Link: When you need to transfer data on a line, in addition to a physical circuit, there must be some necessary communication protocols to control the transmission of these data. Adding the hardware and software that implements these protocols to the link constitutes a data link. The most common approach now is to use network adapters (both hardware and software) to implement these protocols.

(1) Protocol data Unit--frame

* * The Data link layer sends the data frame of the network layer to the link, and the data in the received frame is taken out and handed over to the network layer.

* * Three-layer model: Each node (between the host and router or two routers) has only the next three layers-the network layer, the data link layer, the physical layer.

* * The main steps of the data link layer of the point-to-point channel when communicating:

The data link layer of the ① node A adds the IP datagram that is delivered by the network layer to the header and tail package into frames.

② Node A sends the encapsulated frame to the data link layer of point B.

③ If there is no error in the frame received by the data link layer of Node B, the IP datagram is extracted from the received frame to the above network layer, otherwise this frame is discarded.

3.2 Three basic questions

(1) package into frame:

* * Encapsulation into frames is to add a header and a tail before and after a piece of data, thus constituting a frame. Once the receiver receives a bit stream from the physical layer, it is able to identify the beginning and end of the frame from the received bit stream based on the header and tail markings.

* * The frame length of a frame equals the length of the frame's data portion plus the frame header and frame tail.

* * The first and the end of an important role is to make frame delimitation (that is, to determine the bounds of the frame).

* * Each link layer protocol specifies the maximum length of the data portion of the frame that can be transmitted-the MTU of the largest transmission unit.

* * Frame delimitation can use special frame delimiters, SOH (frame start character) and EoT (frame Terminator), their hexadecimal codes are 01 and 04, respectively.

(2) Transparent transmission:

* * Transparent: something that actually exists does not seem to exist.

* * Transparently transmitting data at the data Link layer: Indicates that data in any combination of bits can pass through this data link layer. Thus, for the data being transmitted, the data is "invisible" to the data link layer for anything that interferes with data transmission.

* * byte padding (character padding): In order to solve the problem of transparent transmission, we must try to make the control characters "SOH" and "EOT" in the data can not be interpreted as control characters at the receiving end. The data link layer of the sending end inserts an escape character "ESC" in front of the control character "SOH" and "EOT" in the data, while the data link layer at the receiving end removes the inserted escape character before sending the data to the network layer.

(3) Error control:

* * Bit error: bits may cause errors during transmission: 1 May become 0, and 0 may become 1.

* * bit error rate ber: The ratio of bytes transmitted to the total number of transmit bits over time. If we try to improve the signal-to-noise ratio, we can reduce the BER.

① Cyclic redundancy Test CRC:

The **CRC operation is to add an n-bit redundancy code for error detection after the data m, and then make a frame to send out, sending (k+n) bits altogether.

* * This n-bit redundancy code can be obtained by using the binary modulo 2 operation for the operation of 2 N-multiplication m, which is equivalent to adding n 0 after M. The number of the obtained (K+N) bit divided by the pre-agreed length of the sending and receiving parties is (N+1) the divisor p, the quotient is Q and the remainder is R (n bit, one less than P). This remainder r is a redundant code that is stitched out behind the data m.

* * generation of polynomial P (X):

P (X) =x3+x2+1 expressed in p=1101

② Frame Inspection sequence FCS:

* * Redundant code added for error checking.

③ cyclic redundancy check CRC and Frame inspection sequence FCS is not the same concept:

**CRC is a method of error detection.

**fcs is added to the data behind the redundant code, the method can be used to check the wrong CRC, or the CRC can not be selected.

④ a method of error checking the received data at the receiving end:

* * If the remainder of the r=0, then judge that the frame is not wrong, accept.

* * If the remainder r is not equal to 0, then the frame is judged to have no errors (but it is not possible to determine which one has gone wrong) and it is discarded.

⑤ in the data link layer, if only using cyclic redundancy test CRC error detection technology, you can only do the error-free frame acceptance, that is: all the receiving end of the data link layer to accept the frame, we can be very close to 1 of the probability that these frames in the transmission process did not produce errors. The above mentioned can be approximated as: "There is no error in the frame accepted by the data link layer of the receiving end".

⑥ We do not now require the data link layer to provide a "reliable transmission" service to the network layer;

* * The so-called "reliable transmission": what is sent at the sending end of the data link layer and what is received at the receiving end.

* * Transmission errors can be divided into two major categories: bit error, the received frame is not error, but there is a frame loss, frame repetition or frame out of sequence.

* * Matchless Special error does not mean no transmission error. Using CRC testing at the Data link layer enables the transmission of error-free errors, but this is not a reliable transmission.

2016.6.13 Review points of computer network chapter III Data Link layer

Related Article

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.