ST-CS120: Computer Network
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
OSI Model
- Metrics (性能与指标)
- Bandwidth (Throughput)
- Unit: bps, kbps, Mbps, Gbps, where
b
stands for bits
- Latency
- RTT: Round-Trip Time: calc the time of send and recieve. Local because of the avoidance of time shift between devices.
- 计算往返的时间,也就是本地从发出到收到的时间差。对应的,单程 (One-way Latency) = T2 - T1 or T3 -T2
- Latency = Transmit Delay + Propagation Delay + Queueing Delay
- Transmit Delay = TransferSize/Bandwidth
- Propagation Delay = Distance/SpeedofSignal
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- Effective Bandwidth (throyghput) = TransferSize/Latency
- tools: iperf, ping (https://networktools.he.net/)(https://ping.sx)
L1: Physical Layer
网线一类的东西
Upper bound of throughout
Shannon-Hartley Theorem
The theoretical throughput upper bound:
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Transmission Method
Baseband Transmission (Line Coding)
Passband Modulation
- 载波
- 并行
-
- Amplitude
- Frequency
- Phase
Frequency Shift Keying (FSK)
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Phase Shift Keying (PSK)
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Frequencty shift passing
Amplitude shift passing
Quadrature Amplitude Modulation
- ASK + PSK
- 传输更多的信息 (4 symbols)
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
总结: Baseband * coherence wave = Passband
纠错与恢复
analog goes wrong
- Bit error rate (BER) = error bits/transmitted bits
- High rate <-> Low reliability
2D Parity Check
是不是有偶数个 0
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- overhead
- 1,2,3 bit wrong OK to recover
- 4 bit may ERROR
Check sum
- TCP/IP header
- sum all, check sum
- 作为补码加起来
- 快但低能
多项式
https://users.ece.cmu.edu/~koopman/crc/
汉明码
多路复用
- 分时复用
- 分频复用 Frequency-division multiplexing (FDM)
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 分码复用
- 传输介质无法承载我们的传输
Rate Selection
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
ACK
🐱:喵
😺:喵
🐱:喵喵
😺:喵喵
Stop and Wait
http://www2.rad.com/networks/2004/sliding_window
规定时间内收不到就等,效率不高(利用 buffer 解决)
https://en.wikipedia.org/wiki/Bandwidth-delay_product
https://github.com/shadowsocks/shadowsocks/wiki/Optimizing-Shadowsocks
NACK (Negative ACK)
接收方定时把所有未收到的包序号通过反馈报文通知到发送方进行重传。
Sliding Window
- 不对等的传输
- Send buffer size: Delay Bandwidth
- Receive buffer size: Flow control
- 拥塞控制: 控制 buffer 大小
并行
Random Access
Transmit and Pray
Slotted ALOHA
- For each slot, the probability of successful transmission is
- is the probability of transmission. It is determined by the number of nodes in the network, when is large, should be small.
- The optimal p can be calculated by derivation
- So when , the probability of successful transmission is , when is large, it is close to . Thus the utilization of the channel is about
- Efficiency: 1/e
L2: 链路层,介质访问子层
Main function
Ethernet
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
WIFI and Cecullar
https://blog.csdn.net/qq_27847237/article/details/104098817
RTS/CTS
通过监听其它 client 之间的通讯来推测 server 与它的连接情况
- RTS/CTS does not solve hidden terminal and exposed terminal
completely
- Designing Wireless MAC is non-trivial
- overhead too large
IEEE 802.11 MAC

WIFI 包经过再打包走 Ethernet
- 3-Addr: A -> AP -> C
- 4-Addr: A -> B -> C -> D (mesh)
See https://github.com/SpacehuhnTech/esp8266_deauther for a security issue for WIFI
Switch
learning Bridge
L3: 网络层
Internet Protocal
多协议之间的网络通信
- Addressing Scalability
- Network Heterogeneity
IP Addressing

IP Forward
- Each router maintains a forwarding table
- if IP.network == Connected network
- forward to the host (How? ARP: IP->MAC)
- if IP.network != Connected network
IP jisuanqi
ipjisuanqi.com
IP Packet

Dynamic Host Configuration Protocol (DHCP)
分配 IP 地址并记录

Address Resolution Protocol (ARP)
- ARP table: each IP node (host, router) on LAN has table IP/MAC address mappings for some LAN nodes
- < IP address; MAC address; TTL>
- 200.155.11.3; 58-23-D7-FA-20-B0 200.155.11.5;
- 1A-2F-BB-76-09-AD 200.155.11.2;
- 0C-C4-11-6F-E3-98
Fragmentation and Reassembly
包会分割成 MTU 的大小传输,之后再重组 (There is Offset-bits in IP packet)

Routing
The basic problem of routing is to find the lowest-cost path between any two nodes

RIP
- Bellman-Ford Equation
- foreach in 松弛操作
- 每个节点不断的估计和其它节点的最短距离,并不断收敛
- distance to neighbour is known
- and its neighbour can tell (not specific) the distance to destination y
- 当一个节点收到新的值的时候,通知周围节点更新
- 优点:收敛块
- 缺点:缺少弹性
- 优化
Dijastra
OSPF
BGP
bgp.he.net
- iBGP: peers
- eBGP: transits
IPV6

NAT
随机端口映射到主机
Mobile
L4: 传输层
UDP

TCP



TCP Congestion in Network
Additive Increase/Multiplicative Decrease (AIMD)
- Additive Increase
- Increment = 1/cwnd
- cwnd += Increment
- Multiplicative Decrease