计算机网络Chapter5 Link Layer 链路层
# Link Layer 链路层
# error detection, correction 差错控制
# Error Detection Techniques 差错检查
Parity Check 奇偶校验码
奇偶校验,校验1的个数为奇数或偶数,符合则接受
只能检查出奇数个比特错误,检错能力为50%
Only an odd number of bits can be detected, and the error detection capability is 50%
# Checksum 校验和 ⭐️
运用反码运算求和:1s complement of the sum
反码算数运算:两个数进行二进制反码求和的运算很简单。它的规则是从低位到高位逐列进行计算。0和0相加是0,0和1相加是1,1和1相加是0,但要产生一个进位1,加到下一列。如果最高位相加后产生进位,则最后得到的结果要加1。
Cyclic Redundancy Check (CRC) 循环冗余码
# multiple access protocols 多址协议
# TDM(A) 时分多路复用
Time is divided into equal length TDM frames. Each TDM user occupies the time interval of fixed serial number in each TDM frame, and all users occupy the channel in turn.
# FDM(A) 频分多路复用
FDM users occupy different bandwidth resources at the same time.
# ALOHA 协议
# (pure) ALOHA 纯ALOHA协议 (PA)
No channel listening, no time slot, random retransmission, thoughts sent
Collision detection:
The receiver does not acknowledge the error, and the sender determines that an error occurs after a timeout
solve:
Wait a random time for retransmission after timeout
# Slotted ALOHA 时隙ALOHA协议 SA
Time is divided into several same time slices. All users access network information synchronously at the beginning of the time slice. If there is a collision, they must wait until the beginning of the next time slice
# 区别和相似
similarities:
Random access media access control. All users can randomly send information, which occupies all bandwidth.
均为随机访问介质访问控制,所有用户可随机发送信息,发送信息时占全部带宽
different:
- Pure ALOHA than time slot ALOHA throughput is lower and lower efficiency. 吞吐量,效率低
- Pure ALOHA sent anytime when it want to send it, time slot ALOHA can send only at the beginning of the time slice. ALOHA只有在时间片段开始时才能发,控制想发就发的随意性
# CSMA 载波监听多点接入 协议
**CSMA/CD ** 碰撞检测、CSMA/CA 碰撞避免
碰撞延迟/重传时机
# 令牌传递协议:循环访问介质访问控制 “Taking turns” MAC protocols
A special format MAC control frame that contains no information.
Control channel usage to ensure that only one node occupy the channel at a time.
# LANs 局域网
# Address Resolution Protocol (ARP)地址解析协议
ARP协议解决下一跳走哪的问题
# Ethernet 以太网
Ethernet provides connectionless, unreliable services.
# switches 局域网交换机
A network switch forwards data packets between devices. Switches send packets directly to devices
multiple simultaneous transmissions
网络交换机负责转发设备之间的数据包。交换机直接向设备发送多个同时传输的数据包