"Computer Network - top down" Notes - Chapter 5 - link layer

Link layer

Services provided by the link layer

Implements link layer, the network adapter ** body portion (Network Interface Card) in **.

  • Framing (framing): talk network layer datagrams transmitted seal play framing, frame structure depends on the link layer protocol
  • Link Access: Media Access Control (Medium Access Control, MAC) protocol specifies the frame propagation rules on the link
  • Reliable delivery
  • Error detection and correction

Error detection and correction technology

Error detection of the three technologies:

  • Parity
  • And test methods
  • Shen Yu loop detection

Multiple access protocol

In the links in the network, point to point transmission (point to point link) is very simple, but many-transmission (referred to as a broadcast link ), due to the possible cause collisions (Collide) , how to coordinate them? That problem is called multiple access problem. Accordingly, the network to resolve such issues through multiple access protocol.

agreement type

  • Channel is divided Protocol
  • Random access protocol
  • Turns agreement

An ideal protocol should have the characteristics

  • When only one node transmits data, which is equal to the throughput of a certain channel
  • When a plurality of nodes sending data, its fair share certain channel
  • Protocol is distributed, and does not damage one node crashes
  • Protocol is a simple and low cost

# Switched LAN

Link layer addressing and ARP

Link-layer address as the link layer through the MAC addresses which, instead of the IP address of the network layer, the main purpose is to ensure that the individual layers each principle, and, not only for IP LAN network and the Internet.

Address Resolution Protocol (ARP)

Because the link layer processing is the MAC address, the network layer (IP protocol) datagram sent down with only the IP addresses, thus requiring the IP address and MAC address conversion, as to why not use the IP address, see above.

Each host or device maintained in its memory with an ARP table for recording the IP address corresponding to MAC address mapping

When a node wants to send packets to another node (which may be a host or router) Process:

Subnet:

  1. A special ARP packet sender will be constructed, which contain IP and MAC addresses of the sender, and the IP address of the destination.
  2. Adapter will seal an ARP packet node in the link layer frame, and by indicating the destination MAC address of FF-FF-FF-FF-FF-FF, once broadcast
  3. The host checks the received broadcast their own IP address, if it matches sends an ARP response packet, to inform its own MAC address
  4. To give a sender MAC address, and recording in their ARP table

Off-subnet: the destination node from the node becomes a default router in the subnet, the router forwarding to the network, the ultimate destination node to reach the subnet, the above steps.

Ethernet

Ethernet frame structure

  • Data Field
  • Destination address
  • source address
  • Type: indicates which upper-layer protocol, for multiplexing and decomposition
  • CRC: cyclic redundancy check for detecting whether a frame error
  • Preamble: to "wake up" to accept the adapter

Link layer switch

Forwarding and filtering

By switch table , the switch will do:

  • Forward: a decision will be guided frame which interface
  • Filter: a frame is decided to be forwarded or discarded

Self-learning characteristics of the switch

principle:

  1. Switch table is initially empty
  2. For each frame received, stored thereon:
    • Source MAC address
    • Interface arrival time
    • current time
  3. After a period of time does not receive a frame of a host, which is deleted from the switch MAC address table

nature

  • Plug and Play
  • Eliminating the multiple collision caused by the possible exchange
  • Heterogeneous links: isolation of the different links, so that different links may run on different media
  • Management function

Reproduced in: https: //juejin.im/post/5cf853916fb9a07ee742ce8c

Guess you like

Origin blog.csdn.net/weixin_34186931/article/details/91427209
Recommended