我在自己没能理解的地方都打上了“???”的标识,就不另起一段单独列出自己的问题了。求各位解惑。
- INTRODUCTION
本文讨论的Two major issues: the name-prefix granularity problem and the trust problem, and propose corresponding solutions.
另外,本文把self-learning应用到switched Ethernet上,做到了三点:build forwarding tables without any control protocol, recover quickly from link failures, and make use of off-path caches.
- PREFIX GRANULARITY
可以把NDN看成一个文件系统。这里不讨论文件和文件夹的区别:/A/B可能是一个文件,也可能是一个文件夹里面有一些文件;对子文件夹的请求,FIB进行最长前缀匹配:如果匹配到它的母文件夹也行
问题举例:Forwarder转发过interest/A/B/C/1,Data从producer B返回,但在FIB表中记录/A/B/C/1时不知道producer B的前缀是/A/B(即B保存一切在/A/B前缀下的data),那么怎么进行前缀匹配呢?
若以为B的前缀过长(specific):比如/A/B/C,那么发interest/A/B/D/1本来可以直接从B返回(准确地说是从B方向的nexthop返回),现在却要不必要的flood
若以为B的前缀过短(generic):比如/A,那么interest/A/E/F/1本来不该发给B却发了
前缀为/A/B;Interest的名字其实只有/C/1,但是FIB表项中为全的/A/B/C/1
三个解决方法:
- k-shorter Prefix
事先了解名字层数k,剥离最后k层,前面的都是前缀。但是各个application的命名机制都不一样(就没有一个公共标准吗……)例:
ndnputchunks:/network-prefix/ file-name/version2/segment0,
NdnCon:/network-prefix/user-name/cam3/ 1920×1080/key/frame500/data/segment0
它们的名字分别是最后2和6层。无法了解每一个application的名字层数k。又因为相比起来,不必要的flood的代价更小,所以比如RONR就设置k=1,保守地认为前缀的长度是整个data名字的长度 – 1。
- FIB Aggregation
先保守地认为把前缀的长度设置成最长,然后通过聚合(aggregation)把有相同前缀的前缀聚合起来
As an example, if /A/B/ C/, /A/B/D/, /A/B/E/, etc all point to the same nexthop, they are aggregated into an /A/B entry pointing to that nexthop.
严格来说,只有以上说的/A/B/ C/并上/A/B/D/并上/A/B/E/……等于/A/B时,才能保证这些前缀可以聚合成/A/B;但是,文件太多、这种验证太繁琐。因此这只能是一个optimistic的算法。一旦发现例外,比如建立新子文件夹,需要把聚合成的的前缀拆开(deaggregation)来补救。
- Prefix Announcements (这里没懂???)
每个节点把本身的prefix保存成一个data;先flood a special interest,producer把本身的prefix data返回;然而这个的interest该怎么写呢???
变种1. 不直接发所需application interest,收到对应data;而是先问“who has /A/B/C/1? ”,得到回答后,再单播application interest;(这有什么区别呢???原文也说了,这样就凭空多加了一轮:this incurs an extra round-trip time before the first Data is retrieved. )
变种2. 不是producer在data中回答,而是consumer在interest中问producer prefix:This is applied to vehicular networks in Navigo [9], but it will not work in general-purpose networks because consumers may not know a producer’s prefix granularity.
III. TRUST OF ANNOUNCEMENTS AND DATA
ARP攻击:
当主机A要与主机B通信时,地址解析协议可以将主机B的IP地址(192.168.1.2)解析成主机B的MAC地址,以下为工作流程:
第1步:根据主机A上的路由表内容,IP确定用于访问主机B的转发IP地址是192.168.1.2。然后A主机在自己的本地ARP缓存中检查主机B的匹配MAC地址。
第2步:如果主机A在ARP缓存中没有找到映射,它将询问192.168.1.2的硬件地址,从而将ARP请求帧广播到本地网络上的所有主机。源主机A的IP地址和MAC地址都包括在ARP请求中。本地网络上的每台主机都接收到ARP请求并且检查是否与自己的IP地址匹配。如果主机发现请求的IP地址与自己的IP地址不匹配,它将丢弃ARP请求。
地址解析协议是建立在网络中各个主机互相信任的基础上的,网络上的主机可以自主发送ARP应答消息,其他主机收到应答报文时不会检测该报文的真实性就会将其记入本机ARP缓存,攻击者向电脑A发送一个伪造的ARP响应,告诉电脑A:电脑B的IP地址192.168.0.2对应的MAC地址是00-aa-00-62-c6-03,电脑A信以为真,将这个对应关系写入自己的ARP缓存表中,以后发送数据时,将本应该发往电脑B的数据发送给了攻击者。同样的,攻击者向电脑B也发送一个伪造的ARP响应,告诉电脑B:电脑A的IP地址192.168.0.1对应的MAC地址是00-aa-00-62-c6-03,电脑B也会将数据发送给攻击者。
至此攻击者就控制了电脑A和电脑B之间的流量,他可以选择被动地监测流量,获取密码和其他涉密信息,也可以伪造数据,改变电脑A和电脑B之间的通信内容。
如何抵御ARP攻击?解决方法:增加两个安全机制Announcement trust (for the part C above) and application Data trust. Announcement trust and application Data trust are separated because there is not a universal trust model that covers all application Data; instead, each application can define its own trust model.
- Trust Model for Announcements
每个前缀都要有一个announcement signer certificate,避免节点乱发prefix announcement
对接收到prefix announcement的consumer,它的NFD(转发进程)可以证实:
1、announcement有一个证书给予的可行签名(是整个announcement的hash),跟证书里的公钥match(producer证书里有公钥和私钥,producer用私钥加密签名并和interest一起发出,consumer用公钥解密,然后对比签名,如果相同,则说明真实性和完整性)
数字签名技术是将摘要信息用发送者的私钥加密,与原文一起传送给接收者。接收者只有用发送者的公钥才能解密被加密的摘要信息,然后用HASH函数对收到的原文产生一个摘要信息,与解密的摘要信息对比。如果相同,则说明收到的信息是完整的,在传输过程中没有被修改,否则说明信息被修改过,因此数字签名能够验证信息的完整性
2、announcement中的prefix与允许的prefix匹配,允许的prefix是证书名称的一部分
3、证书是authority发的
- Trust Schema for Application Data
防止收集producer的过时prefix announcement加以利用:
中途的forwarder在interest里加一段随机信息作为“challenge”,producer在prefix announcement中加上这个随机信息。但这样每次flood interest时,producer会先后收到许多请求,每次的challenge都不一样,都要把含新的challenge的announcement交给证书重新签名,prevent the use of in-network caches(announcement里面不含有具体data吧?这样的开销很大吗???)
改进版本:announcement里面带上announce过的prefix之下data的trust model。This trust model is encoded as a trust schema [11], which contains a set of name- binding rules that dictate which certificates are authorized to sign each Data or sub-certificate, as well as a set of top level certificates as trust anchors. (文中没有详细说明这个机制,这篇文章以后可以读一读???)
- SELF-LEARNING ON SWITCHED ETHERNET
处理关于SELF-LEARNING ON SWITCHED ETHERNET的以下三个问题:
- Building Forwarding Tables in the Data Plane
To prevent bridge loops, Ethernet employs the Fast Spanning Tree Protocol.
FSTP:生成树协议。生成树协议的主要功能有两个:一是在利用生成树算法、在以太网络中,创建一个以某台交换机的某个端口为根的生成树,避免环路。二是在以太网络拓扑发生变化时,通过生成树协议达到收敛保护的目的。
NDN中Interest包是不会形成环路的,其关键设计是Interest包中的Nonce字段,该字段是个随机数,根据它可以很容易地判断出重复的Interest包,及时地丢弃,而Data包沿着Interest包被传输的相反路径返回,不形成环路,从而解决了组播的问题。
既不需要协议,又不浪费带宽,也保证了flood的最快性:后收到的copy会被丢弃
FIB表满时,采取LRU策略
- Minimizing Flooding Overhead
即:如何flood less often and in smaller regions.
给每一个interest设置一个标签,需要flood的设置成discovery标签否则设置成的就non-discovery标签
有可能同时有多个consumer请求的内容都是同一前缀,它们都发出了discovery标签的interest,但是中途的forwarder在转发了第一个discovery标签的interest并返回了data以后,已经学习到了路径,不需要再flood后面的interest了。
解决方法:中途forwarder如果在先前的flood中学习到了某个前缀的对应路径,就把后面interest的标签改成non-discovery然后单播
同时,最短路的局部也是最短路,因此一次flood可以让consumer和最短路中途的forwarder都学习到最短路
- Fast Reaction to Link Failures
对NDN网络的维护:每隔一定的间隔时间(如5ms),如果每条线路上没有在传输的data,也要发一个idle packet来确定线路依旧通畅,一旦经过一定时间(如50ms)没有返回data就宣告link failure.
可以由断路处的节点临时重新找alternate path来转发interest,但是interests are organized by name prefix,枚举开销会很大(这是为什么呢?)。Thus, as a trade-off between recovery speed and processing overhead, we rely on consumer retransmission (see Section IV-D) to retransmit the affected Interests.
- 如果FIB表里本来就有alternate path,尝试转发到alternate path
- 如果FIB表里没有alternate path,但这是一个discovery标签的interest,就重新flood.
- 以上两者都不是,就向下游返回一个Nack. 下游节点收到Nack以后,用flag标记这个FIB表项,表示这里有link failure,然后重复1和2:这类似于深度搜索的过程。最终,Nack被发送到consumer这个根节点,consumer重新发一个discovery标签的interest进行flood
- Consumer Retransmission
- a) Nack返回到consumer时,带上新的nonce(随机数)重发interest。这应该是因为consumer认为深度搜索中,有些节点可能没有遍历完所有alternate path,所以希望找到漏网之鱼;但这往往是无用的:Retransmitting a non-discovery Interest would be useless in this situation, as the network has already exhausted all known alternate paths prior to returning the Nack to the consumer.
*b) 设置Retransmission timer:
Once the consumer has learned the prefix granularity from the prefix announcement, it can measure the round trip time for data retrievals, and use it to calculate the retransmission timeout (RTO) using TCP’s algorithm [15]. After expressing an Interest, if no Data comes back within the RTO, it can retransmit the Interest.
- Handling Producer Mobility
Mobility跟link failure一样处理。同时因为一个节点可能来回移动,只是一会通畅一会不通畅而已,FIB表里仍把failure的路径作为alternate保留着
- CACHING OF INTERNET CONTENTS
In-network caching results in bandwidth savings and latency reduction,但是对于LAN和WAN的侧重点不同,要取长补短:
LAN的特点:internal links have abundant bandwidth and low latency.
WAN的特点:limited bandwidth and high latency.
- Caching Basics
返回data时,一路的forwarder都将获得announcement,但是它们没有编造announcement的能力;这不还是可以收集producer的过时prefix announcement加以利用吗???
因此,可能FIB学习到的路径不是到producer的,而是到cache的。cache如果不够大、清除得很快,interest很容易扑空,代价会很大。那么,如果interest到了目标cache处,但目标cache已经不再保存着对应data了,可以由该cache作为新的起点来发送interest。(但是interest里面并没有标明是想从cache中还是CS中获取目标data的吧???)
- Internet Contents Retrieval
设置一个特殊节点gateway,专门获取Internet数据。The gateway announces itself as the “producer” of the “/” prefix.
但是这个前缀与根目录重名了,会引起混淆。To solve this problem, the gateway’s announcement should carry a local prefix list, containing a list of administrator-defined prefixes internal to the LAN. (有点没明白???但这个问题应该不大)
发给gateway的interest都是non-discovery的(可以采用固定的路由?),于是只有on-path的cache能派上用场。Therefore, we extend the design in the next section to utilize off-path caches for Internet traffic by diverting Interests to them, in order to reduce WAN connection bandwidth usage.
- Diverting Interests to Off-Path Caches
发给gateway的interest都是non-discovery的(通往gateway可以采用固定的路由),于是只有on-path的cache能派上用场,如何利用off-path cache?.
一个节点在从cache中清除某个data前,保存该data名字和它曾转发过这个data的下游节点,记为可以利用的off-path节点。这个保存形式称为stub entry,在CS中划出一块专门保存它。
算法的前提:对一个节点,它收到过的的其他data越少,以前的data就越不可能被替换出去
举例说明这个算法的三个步骤:
(1)节点A对每一个邻居,给该邻居发data时都在它对应的接口计数器上+1
(2)当给下游节点B发了data 1时,B可以作为data 1的潜在off-path cache了,A把对B计数器上的值8加入data 1对应的CS entry中,记录成data 1, B, 8;后来A的CS要清除data 1时,仍把data 1保存成CS stub entry
(3)当A从节点C处收到对data 1的interest时,B是off-path cache;A查到data 1有stub entry可以对应到B,用对B的当前记录值11减记录值8,如果达到了预设的阈值就转发;同时有多个off-path cache时,向计数器差值最小的一个节点转发interest
这个算法近似认为:一个internet data只出现一次,在它第一次出现后的计数对应的都是其他data;
转发了interest以后,如果off-path cache的CS中还保存着对应data则返回;可能off-path cache本身也只剩一个stub entry了,还得继续转发;However, it is not subject to the diversion threshold criteria: A node can tell that the Interest is already diverted because it is coming from an upstream in the direction of the gateway. (???)如果连stub entry也被清除了,返回Nack,consumer将发一个no diversion标志的interest,这个标志使它可以直奔gateway而不再被转发)
其他类似的机制:关注从转发一个data到再次请求它之间的时间间隔,而不是data个数:In S-BECONS [17], an on-path node remembers which downstream has most recently retrieved a file, along with a timestamp of that retrieval. 但本文认为后者更好)
另:参见[18],additionally, in most cases, the Interest is still forwarded to- ward the FIB nexthop, without waiting for an answer from the off-path cache. Although this design is effective in reducing latency when Data is found in an off-path cache, it would not save WAN connection bandwidth in our scenario.
最后是Evaluation和Conclusion部分,证明了以下三个优点:
- Low Bandwidth Usage
- Fast Link Failure Recovery
- Off-path Cache Utilization