Skip to content

Commit 7fd602a

Browse files
committed
cler log
0 parents  commit 7fd602a

File tree

105 files changed

+6776
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+6776
-0
lines changed

.DS_Store

10 KB
Binary file not shown.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.log
2+
*.json

Computer Networks 6th Edition.pdf

21.4 MB
Binary file not shown.

NotebookCS244.md

Lines changed: 354 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,354 @@
1+
课件: https://shihada.com/basem-shihada/education-page/computer-networks
2+
3+
当时整个CS 只有5个faculty, 一个班30-40人. 持续了几年直到招收到更多教授.
4+
5+
因为课程人很少, 老师可以叫出每个同学的名字, 用同学名字举例子, 讲reliable的特点, 保证顺序.
6+
7+
上课总是回答学生问题是很费时间的, 所以培养学生的提问能力是要付出很高的教师时间成本的.
8+
9+
学生太多了, 学生就只能听从, 没有时间提问. 就只会干活, 不会质疑, 培养小镇做题家, 这和科研的思想是相悖的.
10+
11+
## Lec1
12+
13+
#### 作业1反馈
14+
15+
\- OWAMP 失踪了。尝试了 ping 的一个版本
16+
17+
\- 时钟似乎不同步。 delay测量要同步时钟.
18+
19+
\- 需要更加关注slide质量和结果分析。
20+
21+
delay也用ping, traceroute可以来测 hop.
22+
23+
setup要写完整. 要写出平均值和标准差, 不能只测一次.
24+
25+
测多组, 不同MSS. windows size 从0 到3000. 画图.
26+
27+
不管做啥都要自动化测试. 要写出每个实验的结论.
28+
29+
可以画出网络的拓扑图. ,比如内网, 外网. 网络用云icon 表示.
30+
31+
网络一次没有converage, 需要测五个小时可能才收敛. 多线程 ,在 wireless network 可以有大量加速.
32+
33+
每个作业, 发邮件,还会批改给comment.
34+
35+
有啥区别?
36+
37+
**Circuit Switching** 建立了一个专用的物理连接,
38+
39+
**Packet Switching**:在分组交换中,数据被划分为小数据包,每个数据包独立传输,它们可以按需通过网络的不同路径传输。没有专用的物理 连接,而是按需使用网络资源。 each packet uses full link bandwidth。
40+
41+
### packet switching
42+
43+
packet switching 比circuit switching 可以承载更多用户, 比如同时35个用户, active 超过10个人的可能性<0.004
44+
45+
Goodput is always fresh data. 重发的不算在goodput.
46+
47+
a=average packet arrival rate, traffic intensity = La/R, La/R > 1: more “work” arriving than can be serviced, average delay infinite!
48+
49+
VPN , 为啥叫virtual? 因为需要build private network, 但是实际上并不存在这么一个private network.
50+
51+
## Lec2 Transport Layer & Congestion Control
52+
53+
#### congestion collapse
54+
55+
原因:Undelivered packets -》 solution: congestion control for all traffic
56+
57+
原因2:spurious retransmissions of packets still in flight -》 solution: better timers and TCP congestion control
58+
59+
即使buffer是无限的, 处理能力有限也会导致无限的delay, buffer有限, 就会packet loss
60+
61+
两种方法都常用:
62+
63+
end-end congestion control,网络没有explicit feedback. 用在TCP.
64+
65+
network-assisted congestion control, router 提供 feedback to end systems. single bit indicating congestion.
66+
67+
#### TCP 拥塞控制
68+
69+
Congwin就是congestion window size.
70+
71+
congestion window size 怎么增减都是可以配置的, 但是标准是 probing +1 , congestion 丢包的话 *0.5. 因为这样是公平的.
72+
73+
Window to fill links = propagation RTT * bottleneck bandwidth
74+
75+
## 异构网络中的TCP
76+
77+
可以用tcp ping测试delay.
78+
79+
lossy link, 就是wireless.
80+
81+
95%的网络流量都是用TCP, 第二是UDP.
82+
83+
TCP 下面分类很多, 有dropping base的 Reno, delay based 的Vegas, mix delay和dropping的 FAST TCP. 对于window的调整都不同. linux kernel有一些代码. 但是只有一两种在用. 作业要研究这几个的区别.
84+
85+
**基于丢包的拥塞控制**:将丢包视为出现拥塞,采取缓慢探测的方式,逐渐增大拥塞窗口,当出现丢包时,将拥塞窗口减小,如 Reno、Cubic 等
86+
87+
**基于时延的拥塞控制**:将时延增加视为出现拥塞,延时增加时增大拥塞窗口,延时减小时减小拥塞窗口,如 Vegas、FastTCP 等
88+
89+
**基于链路容量的拥塞控制**:实时测量带宽和时延,认为网络上报文总量大于带宽时延乘积时出现了拥塞,如 BBR。
90+
91+
#### Reno
92+
93+
– The most widely implemented TCP in current systems
94+
95+
– Reno is expected to gain worse performance over links with Reno is expected to gain worse performance over links with multiple losses 丢包多的时候性能差.
96+
97+
**RTT 可变性**:由于信号传播、干扰和设备移动性,无线网络通常具有可变且不可预测的往返时间 (RTT)。TCP Reno 的拥塞控制假设 RTT 相对稳定,可能无法很好地适应无线环境中 RTT 的快速变化。这可能导致可用带宽的利用不足。
98+
99+
#### BBR
100+
101+
BBR 算法 2016年谷歌, 周期性地探测网络的容量,交替测量一段时间内的带宽极大值和时延极小值,将其乘积作为拥塞窗口大小,使得拥塞窗口的值始终与网络的容量保持一致。
102+
103+
特点: 在有一定丢包率的网络链路上充分利用带宽。适合高延迟、高带宽的网络链路。
104+
105+
similar to vegas, 非常aggressive. bbr快速增长.收敛很快.
106+
107+
老师compile了这个,
108+
109+
#### TCP Vegas
110+
111+
TCP Vegas1994年提出,Vegas算法并不急于丢包来判断是否发生了拥塞,而是通过数据包延迟来判断。Vegas通过RTT(roundtrip time)来决定增加或者减小拥塞窗口,它能够拥塞将要发生时就避免拥塞,而不是等到拥塞已经发生之后再减小发送速度,因此能够减小重传和超时的几率.
112+
113+
overcome the problem of RTT fairness at the bottleneck.
114+
115+
#### cubic
116+
117+
TCP BIC(Binary Increase Congestion control)旨在优化高速高延迟网络(即“长肥网络”(long fat network,LFN))的拥塞控制,而CUBIC则是比BIC更温和和系统化的分支版本,其使用三次函数代替[二分算法](https://www.zhihu.com/search?q=二分算法&search_source=Entity&hybrid_search_source=Entity&hybrid_search_extra={"sourceType"%3A"article"%2C"sourceId"%3A"544139753"})作为其拥塞窗口算法(因为实际上BIC的搜索曲线看起来就像一个三次函数,所以干脆就写一个三次函数来模拟曲线),并且[使用函数](https://www.zhihu.com/search?q=使用函数&search_source=Entity&hybrid_search_source=Entity&hybrid_search_extra={"sourceType"%3A"article"%2C"sourceId"%3A"544139753"})拐点作为拥塞窗口的设置值。Linux内核在2.6.19后使用该算法作为默认TCP拥塞算法。
118+
119+
DSACK : 可以undo halving of cwnd.
120+
121+
FACK:
122+
123+
#### ECN/ELN
124+
125+
Uses a single bit to explicitly notify the source of a congestion or a packet loss. – ECN is set by the routers – ELN is set by the intermediate TCP agent
126+
127+
问题
128+
129+
1. not all routers or hosts can issue ECN or ELN
130+
2. ECN may increase the congestion in the presence of higher network transmission in the next round.
131+
3. Security issues (MITM that falsely sets/unsets the ECN), which can flood a connection in a very short time.
132+
133+
134+
135+
#### Round Trip Time
136+
137+
• TCP clock is based on RTT, Longer RTT reduces the transmission rate.
138+
139+
solutions
140+
141+
– TCP level:
142+
143+
• TCP starts with larger cwnd e.g. 4 用更大的拥塞窗口
144+
145+
• Count the received bytes instead of acks. count bytes 而不是ack
146+
147+
– Application level:
148+
149+
• XFTP: using many parallel TCP connections 多个并行TCP
150+
151+
• Transfer objects at higher rate during congestion avoidance
152+
153+
Network level: • TCP segmentation e.g. TCP for satellite networks STP
154+
155+
#### RTT fairness solution
156+
157+
TCP level : faster cwnd growth for long RTT , RTT大, 那就cwnd 增长更快。
158+
159+
Network level: – Packet dropping policy • Drop Tail 满了扔掉后面来的packet • RED, Flow RED 随机删除一个packet • Class-based queues (CBQ) • Stochastic Fairness Queuing (SFQ)
160+
161+
162+
163+
#### Solutions for Non-congestion Losses
164+
165+
link level: ARQ , only 重传corrupted parts
166+
167+
TPC level: indirect TCP, TCP SACK,
168+
169+
End to end level: explicit loss/congestion notification.
170+
171+
#### Bandwidth Asymmetry
172+
173+
Bandwidth Asymmetry damages TCP clocking mechanism. Mention one receiver-side solution.
174+
175+
High bandwidth at the forward direction (cable, satellite) while low speed channel (dial up) that carries the ACKs ack回来的太慢了,怎么办?
176+
177+
– Congestion/dropping at the slow link causes larger RTTs, slower growth of cwnd Damage the TCP clocking mechanism Slow speed link (ack) Damage the TCP clocking mechanism
178+
179+
• Receiver side solution using compression 压缩
180+
181+
• Reducing the number of ACKs 减少ack 数量
182+
183+
• Reducing the TCP burstiness
184+
185+
#### 拥塞
186+
187+
layed congestion response: 不立刻减半. 两次都失败才减半. 但是这对MAC switching层的ARQ有要求
188+
189+
burst TCP with BACK/BNAK: 这是老师自己在phd时候写的.
190+
191+
multiple simultaneous loss, 就会不断减半, window size很快就到1. 优点: 快速解决拥塞.
192+
193+
TCP over High Bandwidth-Delay Product
194+
195+
TCP over WRN suffers from Slow convergence
196+
197+
198+
199+
#### TCP over Lossy Channels
200+
201+
无线的情况, 更难判断 congestion. 因为 Non-congestion losses caused by transmission errors: – packet corruption, – bad links, – channel fading, – hand offs
202+
203+
解决方法: Hiding the non-congestion losses
204+
205+
– Local recovery of losses 本地恢复 , 用备用link, 不同的route 。 e.g. at the link level, such as using backup links, different routes
206+
207+
要用多个transmiter和receiver, 这样增强接收能力.
208+
209+
光纤和 铜线, 可以2500 Mb 以上. 我们的线, 只能2500Mb/s以下. 因为我们学校的网只有1000Mb/s ,所以我们都卡在这个速度.
210+
211+
#### CSMA/CA
212+
213+
Carrier Sense Multiple Access
214+
215+
Use CSMA with Collision Avoidance
216+
217+
exposed terminal problem .
218+
219+
RTS/CTS 可以解决 exposed terminal. *RTS*/*CTS*协议(Request To Send/Clear To Send)即请求发送/清除发送协议. 期中考考了.
220+
221+
CTS谁先拿到谁发.
222+
223+
同时发就会都损坏,
224+
225+
A知道C在发, A就不会重传.
226+
227+
X 就是access point. 接受信号.
228+
229+
他们都会不断重传.
230+
231+
Flow‐in‐the‐middle problem
232+
233+
日本的wifi 路由器, 频率标准是不同的, 在外国都不能用.
234+
235+
1G , analog, voice only 2.4 kbps
236+
237+
2G, 可以text短信, 大部分地区用GSM 标准, 北美因为太大了用 CDMA. 64Kbps
238+
239+
3G, 2000kbps, 可以视频,
240+
241+
4G , 100Mbps.
242+
243+
5G, 频率从GHz 继续提高,
244+
245+
Mesh的缺点, 如果出口的router 坏了, 那么RTT非常大, 吞吐量会剧减.
246+
247+
248+
249+
#### wireless TCP
250+
251+
Wireless ad hoc network,缩写为WANET,又称无线临时网络。源自拉丁文,原意是临时、专用、特设的。它被称为ad hoc,是因为这种网络系统是临时形成,由节点与节点间的动态链接所形成。它不需要依赖一个既存的网络架构,或是无线系统的无线网络基地台。相反的,每个节点都有能力转送网络封包给其他节点
252+
253+
会用 indirect TCP, 每个access point可以通信, 不需要经过ad hoc host.
254+
255+
不同科技对远的定义也不同, wifi 可以甚至到10km. 远的话就要经过adhoc , 近的话,接入点之间之间连, 不用经过host. Host 就是互联网提供商的 adhoc machine.
256+
257+
#### Snooping TCP
258+
259+
record seq num in hash table, 让link layer 重发. 像个警察, 有accident就去协调.
260+
261+
缺点:
262+
263+
isolate 不如 I-TCP
264+
265+
太多state , buffer, 计算量大.
266+
267+
还有 M-TCP , FreezeTCP
268+
269+
## Optical Networks
270+
271+
bursty traffic
272+
273+
#### Optical Packet Switching
274+
275+
No.1 problem: lack of optical buffer (RAM)
276+
277+
### OBS 网络
278+
279+
burst signaling for TDM networks.
280+
281+
delay reservation.
282+
283+
#### burst compete solution
284+
285+
1. deflection偏离 in space, time.
286+
2. preemption先占 of an existing reservation
287+
3. segmentation of a burst 切分成小块
288+
289+
## hw3
290+
291+
ubuntu, **QDISCS **默认是fq_codel
292+
293+
https://manpages.ubuntu.com/manpages/focal/en/man8/tc.8.html#qdiscs
294+
295+
qdisc 是“排队规则”的缩写,它是理解流量控制的基础。每当内核需要将数据包发送到接口时,它就会被排队到为该接口配置的 qdisc 中。之后,内核会立即尝试从 qdisc获取尽可能多的数据包,以便将它们提供给网络适配器驱动程序。 一个简单的 QDISC 是“pfifo”队列,它根本不进行任何处理,是一个纯粹的先进先出队列。但是,当网络接口暂时无法处理流量时,它会存储流量
296+
297+
我们修改了qdisc, 但是bit rate 还有别的因素, tso offload should be also disabled
298+
299+
考试三道题目 , 很多就一两行写完.
300+
301+
tcp
302+
303+
wireless network. cts, rts,
304+
305+
从作业中抽取一个题目
306+
307+
TCP (10 points)
308+
5 sub-questions (2 points each)
309+
Wireless (10 points)
310+
5 sub-questions (2 points each)
311+
Assignment 1 or 2 or 3 (10 points)
312+
313+
5 sub-questions (2 points each)
314+
315+
Explicit loss/congestion notification is proposed to solve false-congestion detection at TCP, mention one problem of such scheme.
316+
317+
这个是ECN,
318+
319+
1. 兼容性有问题,not all rounter 都支持
320+
321+
2. security issue. maybe falsely set ECN
322+
323+
Consider transferring a file of L bytes. Assume the MSS is 1460 bytes, the RTT is 0.1 second, and a total of 66 bytes of transport, network and data-link headers are added to each segment before the packet is sent out over a 10 Mbps link. How large the TCP congestion window?
324+
325+
1. Calculate the effective bandwidth-delay product (BDP): BDP = Link Bandwidth (in bits per second) x Round-Trip Time (RTT) (in seconds)
326+
2. Calculate the maximum segment size (MSS) considering the headers:
327+
3. Calculate the number of segments that can be in flight at a given time: Segments in Flight = BDP / MSS
328+
329+
330+
331+
Bandwidth Asymmetry damages TCP clocking mechanism. Mention one receiver-side solution.
332+
333+
Q links, 计算时间 ,circuit不用除 Q, packet 要除Q
334+
335+
336+
337+
## solution over OBS
338+
339+
### Link layer solutions
340+
341+
link layer
342+
343+
Statistical AIMD 收集之前的信息,
344+
345+
burst ack/nack.
346+
347+
一个burst有太多packets
348+
349+
false timeout是说, lose cwnd, 但是并不是因为congestion.
350+
351+
352+
353+
354+

PPT/1. Introduction.pdf

5.9 MB
Binary file not shown.

PPT/2. Physical layer - par1.pdf

1.91 MB
Binary file not shown.

PPT/3. Data link layer.pdf

2.21 MB
Binary file not shown.
1.1 MB
Binary file not shown.

PPT/5. Network layer-part1.pdf

4.23 MB
Binary file not shown.

PPT/6. Transport layer.pdf

6.27 MB
Binary file not shown.

PPT/7. Application layer(2).pdf

4.28 MB
Binary file not shown.

PPT/8. Network security(2).pdf

7.68 MB
Binary file not shown.

0 commit comments

Comments
 (0)