文章目录
计网已经有四节课没整理了,今天上课也听不懂了qwq,赶紧拾起来…
网络层由 data plane 和 control plane 组成,这篇文章会 focus on data plane 部分,之后会写 control plane 部分
一 Overview
和传输层不同,网络层是 host to host,它把传输层得到的segments封装成datagrams传送出去,或是把收到的datagrams解析成segments再传给传输层。总的来说,网络层有两个重要的功能:forwarding 和 routing,前者指如何把包发出去(即如何从router的输入到输出),后者指如何决定这个包到达目的地的路径(通过 routing algorithm 实现),指导了 forwarding 的方向
二 Data plane VS Control plane
在router中的分布和功能?(传统的模式也是目前的现状)
Logically centralized的模式?
三 Service model
no guarantee, best effort
四 Router architecture
这一段课本看了好久,那段表述太难懂了,主要意思就是router是三层的,底下还有link layer和physical layer,所以在router input ports那段或是output那段都有三个框框,分别代表三层的功能,在input的最后一个框框中实现了查找功能(查询转发表决定路由器的输出端口);中间是一个交换结构,连接router的输入端口和输出端口。下图很形象的概括了以上所说?
交换结构 有以下三种结构?
output port 由于交换结构速度一般是line speed的好几倍,所以output需要有buffering和scheduling?
这里有一些专有名词:switching fabrics(交换结构)/ line termination(不知道为什么这么叫?) / line speed(我理解的就是包经过input这段的速度)/ switching rate(often measured as multiple of input/output line rate 比如: N inputs: switching rate N times line rate desirable)
五 Forwarding
destination-based forwarding
只依据ip地址,为了提高速度,采用了前缀匹配的算法,可能会有重叠,所以采用了longest prefix matching
generalized forwarding
还依据了ip头文件的其它字段
六 Buffering && Scheduling
buffer大小的建议with N flows, buffering equal to?
output如何选择下一个发的包?
- FIFO
- priority scheduling
- Round Robin (RR) scheduling
- Weighted Fair Queuing (WFQ)
其中当queue满了之后会丢弃包,discard policy的选择有tail drop、priority、random三种