Data link layer of computer network revision

Source: Internet
Author: User

Data Link Layer

Group = Packet =ip Datagram

Start with the data link layer first

Channel types used by the data link layer

(1) Point-to-point channel: one-to-one point-to-point communication mode

1>

The network adapter includes the data link layer and the physical Layer two layer function

Protocol Data Unit: frame

2> Main steps:

A. The data link layer of the front node adds the packet of the network layer to the header and the tail package into frames.

B. The front node sends the encapsulated frame to the data link layer of the back node.

C. The post-node check frame error-free, then extract the packet from the network layer, otherwise discarded.

3> three basic questions:

A. Encapsulating into frames

Add the end and end without exceeding the MTU (Maximum Transfer Unit) before the addition.

Frame delimiter before->soh (hexadecimal encoded as 01) after->eot (hexadecimal encoded as 04)

B. Transparent transmission

is to add the control word match either in the data to an escape character ESC (the control character includes: SOH EOT ESC)--and the byte fill method.

C. Error detection

Bit error Rate: The ratio of bytes transmitted to the total number of transmitted bits

CRC (Cyclic redundancy check Cyclic redundancy check): Send end frame test sequence FCS generation and the receiving side of the CRC test is done with hardware, fast, and will not delay data transmission.

Note: The data link layer only uses CRC, can only achieve error-free acceptance of the frame. (Discard error frames only)

However, transmission errors are divided into two categories: bit error and frame loss, repetition, and disorder.

Therefore, increased frame numbering, confirmation, retransmission mechanism (due to the poor communication quality is less likely to cause errors, so the difference is treated. Good quality, the task of correcting mistakes is done by the upper layer such as: TCP; poor quality. Then confirm the retransmission mechanism)

4> most commonly used protocol: PPP (point-to-point Protocol) only supports full duplex

The reliable transport protocol that was used at the data link layer was HDLC (high-level data link control, high-level)

A.PPP protocol features (needs to be met):

• Simple receive frame->CRC checksum drop/receive (does not provide reliable transmission, reliable transmission is done by TCP)

• Encapsulate frames to specify special characters as frame delimiters

• Transparency

• Multiple network layer protocols and multiple link types can support multiple network layer protocols (such as IP,IPX) on the same physical link, and can be run on multiple types of links (e.g. serial parallel, asynchronous, high-speed, photoelectric)

• Error detection can be detected, but not corrected

• Detect connection status to detect if the link is working properly

• Maximum transmission unit The default value of the MTU is set for each type of point-to-point link

• Network Layer Address negotiation enables entities of two network layers to communicate to know each other or to configure each other's network layer address

B. Part Three

A method for encapsulating IP datagrams into a serial link

A link control protocol for establishing, configuring, and testing Data link connections LCP communication both parties negotiate some options

A set of network control Protocol NCP each protocol supports different network layer protocols

C. Frame format

IP datagram (variable length)
F A C Agreement Information fields Fcs F
0x7E 0xFF 0x03 The 0x0021 information field is an IP datagram Frame Check sequence of CRC 0x7E
Flag: Indicates start or end No meaning No meaning 0xc021 Information field is LCP
0x8021 Information field is NCP
1 1 1 2 No more than 1500 bytes 2 1

byte padding: Escape character esc->0x7d

0-bit padding: Five consecutive 1 fill in 0

D. Working status

Initialization: A user dials a connection to an ISP and establishes a physical connection. The user sends LCP groupings to the ISP to establish LCP connections. Then the network layer is configured, and the NCP assigns a temporary IP address to the newly accessed user. After the communication is complete, the NCP releases the physical layer connection and reclaims the previous IP address. LCP releases the data link layer connection. Finally, the physical layer connection is released.

The starting and ending states of a PPP link are "still" states.

(2) Broadcast channel: one-to-many broadcast communication mode

A. LAN uses broadcast channels.

LAN Benefits:

Can broadcast, host on LAN can share hardware and software resources

Facilitates system expansion and evolution with flexible device location

Improved system reliability (reliability), availability (availability), survivability (survivability)

Note: The level of the LAN is not only the data link layer and the physical layer.

B. How Ethernet shares the channel: Random Access (all users send messages randomly)

IEEE802 split the data link layer of the LAN into two sub-tiers:

Network layer

Logical Link Control LLC (Logical link controls) with access to the transport media-Agnostic put in LLC

Media access Controls Mac (Medium access control) with access to transfer media on Mac

Physical Layer

Adapter: is the network card, now basically embedded. Communication between the adapter and the LAN is serial, and the communication between the computers is parallel. So the adapter can be converted.

C.CSMA/CD Carrier-Listening multi-access/conflict detection

Total Linetype network, listening bus

Listen before sending

Idle send, side send side listening, after the collision, the adapter stops sending

D. Star topology Hub hub 10base-t twisted pair: 10mbit/s baseband signal T twisted-pair F Fiber

E. MAC layer of Ethernet

Hardware address = Physical Address =mac address because it is used in Mac frames. (Because the MAC address is fixed in the Rom of the adapter)

Identification System

MAC address like name, IP address like address, route like the gold map tells you how to go

Multiple adapters are multiple "first name"

48-bit (6-byte) or 16-bit (2-byte) mac-48=eui-48

First three bytes organization Unique identifier OUI representative vendor

After three bytes extended identifier Vendor self-assigns

The lowest bit 0 of the first byte (head 8 bit) of the MAC address segment is a unicast address

1 indicates a multicast address

FF:FF:FF:FF:FF:FF is the broadcast address.

The adapter has the filtering function when you receive a Mac frame after checking the destination address in the Mac frame. Sent to the site on the receipt, processing, otherwise discarded.

Hybrid mode (promiscuous mode) & Sniffer (Sniffer)

Mac frame Format (5 field) for Ethernet V2:

Destination Address (6 bytes) Source Address (6 bytes) Type field (2 bytes) Data fields (46~1500) Frame Check sequence FCS (4 bytes)

So the shortest 64 bytes, the longest 1518 bytes.

There will be a 8-byte (7-byte pre-sync code in front of the destination address used to synchronize the clock frequency; 1-byte frame start delimiter 10101011)

Summarize invalid Mac Frames:

(1) The length of the frame is not an integer number of bytes; not a multiple of 8bit

(2) FCS check error

(3) less than 64 or greater than 1518

(3) Extended Ethernet

Expansion through fiber and fiber modems at the physical layer

Extending through the Ethernet switch at the data link layer

Rely on forwarding to deliver

Spanning Tree Protocol STP Spanning-tree Protocol (prevents broadcast storms)

Virtual LAN Lan:vlan frames will have an explicit identifier

(4) Wireless LAN

WLAN (Wireless Local area Network)

Two main categories:

With fixed infrastructure

Center for Access Point APS (access points)

Where a LAN using the 802.11 series protocol is also called Wi-Fi (Wireless Fidelity, wireless fidelity)

The minimum component BSS (1* base station +n* Mobile station) base station is basically access point AP, the mobile station within the base station can communicate directly

A BBS can be connected to other BBS by connecting to the distribution system DS

Wireless Internet service provider WISP, user <-->wisp<-->internet

Without a fixed infrastructure

Ad-Set Networks

Removable devices find other removable devices near them and require communication with other mobile devices.

Frequency band highest data rate (Mbit/s)

802.11B 2.4GHz 11

802.11A 5GHz 54

802.11g 2.4GHz 54

802.11N 2.4 and 5 300

802.11AC 5GHz 500

MIMO (Multiple-input multiple-output) (Multi-entry multiple-out technology)

A plurality of transmitting antennas and receiving antennas are used at the transmitting and receiving ends to transmit and receive signals through the transmitting and receiving antennas, thereby improving the quality of communication.

Csma/ca Conflict Avoidance Protocol

802.11 Wireless LAN uses a stop waiting protocol, a reliable transport protocol.

Data link layer of computer network revision

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.