A computer network (C): a data link layer

A schematic view of data transmission

Here Insert Picture Description

The basic concept of the data link layer

Link & data link

Link : link is a point to point physical line segment, no intermediate switching nodes.
Data Link : In addition to the physical line, as well as control protocol to control the transmission of data.

frame

The data link layer is a frame transmission

Here Insert Picture Description

Data link layer to solve the three problems

Framing package

Here Insert Picture Description

Transparent transmission

When the transmission data included in the head or tail of the flag of the frame when the same code, we through byte padding escaping to implement transparent transmission mode problems.Here Insert Picture Description

Error detection

Only the data link layer is responsible for error-free acceptance of the received frame transmission right; direct wrong frame lost, no other processing
Here Insert Picture Descriptionerror detection mode

  • Cyclic redundancy check (CRC)

Two data link layer

Point to point data link layer (used for wide area network)

Most used protocols point to point data link layer protocol -PPP world Here Insert Picture Description
Here Insert Picture DescriptionLCP can be used for authentication and accounting
Here Insert Picture Description

Using a broadcast channel, a data link layer (used for local area network)

Ethernet: LAN networking technology in today's dominance. Using CSMA / CD protocol Ethernet LAN can be considered

Using a broadcast channel data link layer - with Collision Detection Carrier Sense Multiple Access protocol the CSMA / the CD Here Insert Picture Description > collision detection waits for a random time to re-transmit Here Insert Picture Description
backoff time algorithmHere Insert Picture Description

Two sublayers of the Data Link Layer

Two sublayers of the Data Link Layer

  • Logical link control layer LLC
  • Medium access control layer MAC Here Insert Picture Description

Medium access control layer MAC

Since the logical link control layer LLC has been canceled, the data link layer of the Ethernet MAC layer mainly

MAC address

  • I.e. physical address 48-bit binary composition, globally unique MAC address of each device.
  • Each manufacturer before 24MAC same address bits, i.e. 24 bits of the same manufacturer same MAC address.
  • MAC address of the computer is written in the card's chip can not be changed
  • But we can use the virtual MAC address of the virtual machine, change the MAC address to achieve the effect of

MAC frame

Here Insert Picture Description

  1. IP datagrams from the network layer plus, FCS (for error detection)
  2. Plus type, source and destination addresses: the address where bit MAC address.
  3. Frame encapsulation is completed, before adding the preamble and start frame delimiter (here not part of the frame)

Bridge and collision domains

  • Collision domains: Since only two computers connected within a LAN hub simultaneous communications, constituting a collision domain.
  • Hub: two collision domains connected to the hub, will form a larger collision domain.
  • Bridge: collision domain with bridge connection may be implemented separate collision domain, when two collision domains each bridge connection when the internal communication, the bridge will prevent another collision domain transfer source computer as to achieve collision domain separation.
  • Switch: Process computer development, can bridge interfaces more and more, and gradually developed into switches, bridges, that is, the predecessor of the switch, we now directly connected to a computer using a switch, there is no conflict. And a memory interface of the switch function can be achieved when a plurality of computers and computer A simultaneous communication, the queue manager at the A interface.
Released eight original articles · won praise 14 · views 465

Guess you like

Origin blog.csdn.net/qq_39304851/article/details/104697131