zoukankan      html  css  js  c++  java
  • 目的节点序列距离矢量(DSDV)协议

    上网找了好久,没有发现比较详细的讲DSDV基本原理的中文文章,不知道是因为大家都会了还是怎么着。。。于是找了一篇英文的讲DSDV的论文~

    -----------------------------------------------------------分割线--------------------------------------------------------------

    摘要(Abstract)

    An ad hoc network is a collection of mobile nodes forming an instant network without fixed topology. In such a network, each node acts as both router and host simultaneously, and can move out or join in the network freely. The instantly created network does not have any base infrastructures as used in the conventional networks, but it is compatible with the conventional networks. DSDV is a modification of the conventional Bellman-Ford routing algorithm. It addresses the drawbacks related to the poor looping properties of RIP in the face of broken links. The modification adapted in DSDV makes it a more suitable routing protocol for ad hoc networks. This paper reviews the DSDV protocol, and analyzes the properties of DSDV when it is used for ad hoc networks routing.

    Ad hoc网络是一系列可移动节点的集合,它们形成了一个没有固定拓扑结构的瞬间网络。在这样一个网络里,每一个节点同时扮演着路由器和主机的角色,并且可以自由地入驻或离开这个网络。这个即时创建的网络没有传统网络那样的底层结构,但是却可以和传统的网络兼容。而DSDV是对传统的BF路由算法的一种修正,它着重解决了RIP面对断开的链接时发生的死循环现象,使之成为一种对于ad hoc网络更合适的路由协议。这篇论文就是回顾DSDV协议,并且分析了用于ad hoc网络路由时DSDV协议的性质。

    1.介绍(Introduction)

    Ad hoc networks differ significantly from conventional networks in the dynamic topology of interconnections and automatic administration for setting up the network. From a graph theory point of view, an ad hoc network is a graph G(N, E(t)), which composes of a set of nodes N, and a set of edges E(t). Each mobile host can be a node of the graph. Each edge of the set E(t) is formed by two nodes within the service range, it can be unidirectional or bi-directional. E(t) changes with time as the mobile nodes in the ad hoc network freely move around. The topology of the ad hoc can be arbitrary at any time. With the change of the topology of an ad hoc network, the nodes in the network have to update their routing information automatically and instantly. Routing protocols in packet switched networks traditionally use either distance-vector or link-state routing algorithm. Both of them allow a host to find the next hop to reach the destination via the “shortest path”. The metric of the shortest path might be number of hops, time delay in milliseconds, total number of packets queued along the path, or something similar. Such shortest path protocols have been successfully used in many dynamic packet switched networks. In principle, any such protocol can also be used in ad hoc networks. The main drawbacks of both link-state and distance-vector protocol are that they take too long to converge and have a high message complexity. Because of the limited bandwidth of wireless links in an ad hoc network, message complexity must be kept low. In addition, the rapidly changing topology requires that the routing protocols can find routes quickly. So new routing protocols have to be developed to fulfill this basic philosophy. The destination sequenced distance vector (DSDV) protocol [7] is an adaptation of the classical Bellman-Ford [11] routing protocols. It is specifically targeted for the ad hoc networks. It addresses the long-lived loops and counting to infinity problems of the conventional distance-vector routing protocols.

    Ad hoc网络是从传统网络演变而来的,它的不同之处在于相互连接的动态拓扑结构以及设置网络的自动管理。从图论的角度来看,ad hoc网络是由一个节点集合N,一个边的集合E(t)构成的图G(N, E(t))。E(t)中的每条边由两个节点构成,并在一定服务范围之内,它既可以是单向的也可以是双向的。当可移动节点在ad hoc网络中自由移动时,E(t)随着时间发生变化。同时,ad hoc的拓扑结构在任意时间是不定的。由于ad hoc网络拓扑结构的变化性,网络中的节点不得不总是自动更新它们的路由信息。以往,分组交换网络中的路由协议使用的是DV(distance-vector)或LS(link-state)路由算法。它们都允许一个主机通过“最短路径”到达目的节点时的下一跳。它们最短路径的形式可能是跳数、延迟时间(以ms为单位)、路径中排队的包的数量或其他类似的信息。这种最短路径协议在许多动态的分组交换网络中被成功应用。原则上,任何一个这样的协议也可以被用于ad hoc网络。而DV和LS协议的主要不足之处在于,他们花费了太长的时间去会聚,以及高度复杂的信息。而由于ad hoc网络中无线连接的带宽限制,信息的复杂性一定要被控制在一个较低的程度。另外,快速变化的拓扑结构需要路由协议快速找到相应的路由器。因此,新的路由协议需要满足这样一个基本的哲学体系。DSDV协议是对传统的BF路由协议的变形,它专注于ad hoc网络,解决了传统的DV路由协议中长期存在的循环和无限技术的问题。

    2.路由协议概述(Overview of Routing Protocols)

    The most popular packet routing protocols in conventional networks are primarily categorized as linkstate and distance-vector. 

    在传统网络中,最有名的路由协议当属LS(linkstate)和DV协议(distance-vector)。

    Link State Routing Protocol [7, 11]  keeps a routing table for complete topology, which is built up finding the shortest path of link cost. The information of link cost is transmitted periodically by all nodes using flooding technique. Each node updates its routing table using new link cost information gathered. Link cost information may be inconsistent because of dynamic behavior of topology or wireless medium, such as instantaneously incorrect long propagation delays etc. This may result in short-lived long routing loops, which disappear on link updates. 

    连接状态选路协议 为整个拓扑结构保持了一张路由表(routing table),通过这张表来找到拥有最少连接消耗的路径。所有的节点使用 flooding technique定期地发送连接消耗的信息。每一个节点使用收集的新的连接消耗信息来更新自己的路由表。由于拓扑结构的动态行为或无线媒介,连接消耗信息可能是不一致的,例如突如其来的不正确的传播时延。这可能造成在连接更新时发生短暂的路由循环。

    Distance Vector Routing Protocol [7, 11]  operates by having each node i maintains a table, which contains a set of distance or cost {dij(x)}, where j is a neighbor of i. Node i treats the neighbor k as the next hop for a data packet destined for node x, if d min j{d (x)} ik ij = ∀j{dij(x)} .The routing table gives the best distance to each destination and which route to get there. To keep the distance set in the table up to date, each router exchanges information with all its neighbors periodically. If, as a result, a minimum distance to any neighbor of a node changes, this process will be repeated until all the nodes have updated the routing information. However, distance vector routing algorithm can cause both short-lived and long-lived loops due to updating the routing table with stale information. Though the looping problem can be eliminated using inter-nodal coordination method, which requires the routers to coordinate themselves mutually by confirmation messages in relatively stable environment. However, ad hoc networks are rapidly changing mobile environments. This inter-nodal coordination mechanism is difficult to be used in the ad hoc networks. 

    距离向量路由协议通过使得每个节点i保持一张含有距离或耗费集合{dij(x)}的表来进行操作,其中节点j是节点i的相邻节点。在将数据包发给目的节点x时,如果节点i的相邻节点k是i的所有相邻节点中的最小值,则将节点k当做是节点i的下一跳。这张路由表给出了每个目的节点的最佳距离以及哪个路由可以到达。为了保持最新的距离结合,每个路由器与它所有的相邻节点定期交换信息。如果交换结束后,一个节点 到任何一个相邻节点的最短距离将发生变化,这个过程经一直重复知道所有的节点完成路由表的更新。但是,由于旧的的信息,在更新路由表时,DV路由算法可能引起短暂的或长期的循环。

    The well-known implementation of distance vector routing, routing information protocol (RIP) [11], has been successfully used within local networks. However, it introduces counting to infinity problem due to network topology changes such as link or router failures. To improve the convergence of RIP, triggered updates, split horizon, poison reverse and path hold-down mechanisms [10, 11] have been integrated into different RIP implementations. Unfortunately, they solve some problems and introduce others at the same time. The usefulness of RIP to ad hoc environments is restricted due to the rapid topology change.尽管这种循环问题可以通过使用内部协调节点的方法来解决,这需要路由器在相对稳定的环境中利用证明信息互相协调。但是不幸的是,ad hoc网络是个变化非常迅速的移动环境。这种内部协调节点机制是很难用于ad hoc网络的。

    For the reasons mentioned above, both conventional link state and distance vector routing algorithms are not suitable for ad hoc network routing. The drawbacks of these protocols have to be fixed. DSDV is one of the proposed routing protocols for ad hoc networks. It aims to overcome the looping problem of RIP and retain the simplicity of RIP.

    由于以上的各种原因,传统的LS和DV路由协议都不能合适地应用于ad hoc网络路由中。这些协议的缺点需要被修正,而DSDV就是这些协议中的一种。它旨在克服RIP中的循环问题并且保持了RIP的简洁性。

    3.DSDV协议(DSDV Protocol)

    Destination sequenced distance vector routing (DSDV) is adapted from the conventional Routing Information Protocol (RIP) to ad hoc networks routing. It adds a new attribute, sequence number, to each route table entry of the conventional RIP. Using the newly added sequence number, the mobile nodes can distinguish stale route information from the new and thus prevent the formation
    of routing loops.


    (前面省略……)DSDV增加了一个新的特性,那就是为传统的RIP路由表中的每一条目增加了一个序列号码。利用这个新增的序列号码,可移动的结点可以区分新旧路径信息,因此防止了路径循环的发生。

    Packet Routing and Routing Table Management [7]  In DSDV, each mobile node of an ad hoc network maintains a routing table, which lists all available destinations, the metric and next hop to each destination and a sequence number generated by the destination node. Using such routing table stored in each mobile node, the packets are transmitted between the nodes of an ad hoc network. Each node of the ad hoc network updates the routing table with advertisement periodically or when significant new information is available to maintain the consistency of the routing table with the dynamically changing topology of the ad hoc network.

    分组路由和路由表管理 在DSDV中,ad hoc网络中的每个可移动节点保持着一张路由表,它列出了所有有效的目的节点,metric值、到达目的节点的下一跳节点以及由目的节点产生的一个序列号码。利用这样一张存储在每一个可移动节点中的路由表,包得以在ad hoc网络的节点之间传送。Ad hoc网络中的每个节点利用定期的广告或当新的重要的信息有效时更新各自的路由表,来保持动态变化的拓扑结构下路由表的一致性。

    Periodically or immediately when network topology changes are detected, each mobile node advertises routing information using broadcasting or multicasting a routing table update packet. The update packet starts out with a metric of one to direct connected nodes. This indicates that each receiving neighbor is one metric (hop) away from the node. It is different from that of the conventional routing algorithms. After receiving the update packet, the neighbors update their routing table with incrementing the metric by one and retransmit the update packet to the corresponding neighbors of each of them. The process will be repeated until all the nodes in the ad hoc network have received a copy of the update packet with a corresponding metric. The update data is also kept for a while to wait for the arrival of the best route for each particular destination node in each node before updating its routing table and retransmitting the update packet. If a node receives multiple update packets for a same destination during the waiting time period, the routes with more recent sequence numbers are always preferred as the basis for packet forwarding decisions, but the routing information is not necessarily advertised immediately, if only the sequence numbers have been changed. If the update packets have the same sequence number with the same node, the update packet with the smallest metric will be used and the existing route will be discarded or stored as a less preferable route. In this case, the update packet will be propagated with the sequence number to all mobile nodes in the ad hoc network. The advertisement of routes that are about to change may be delayed until the best routes have been found. Delaying the advertisement of possibly unstable route can damp the fluctuations of the routing table and reduce the number of rebroadcasts of possible route entries that arrive with the same sequence number.

    当定期的或瞬时的网络拓扑发生变化并被检测到时,每一个可移动的节点利用广播或多点广播一个路由表更新包来广播路由信息。这个更新包由某一个直接相连的结点开始。这表明,每一个接收的相邻节点与这个发生变化的节点之间相距一跳。这与传统的路由算法不同。在接收到更新包后,这些邻居们更新它们的路由表,将序列号加一然后再将这些更新包发给它们对应的邻居们。这个过程将一直重复,直到ad hoc网络中所有的节点接收到更新包对应的一个序列号的复制品。在更新它的路由表并且转发更新包之前,每个节点将保留这些更新信息一段时间,以等待对于每一个目的节点的最佳路由器的到达(凌乱了……)。如果在等待的时间里,一个节点对于同一个目的节点收到了多个更新包,那么拥有更大的序列号码的路由器将被作为前推包的选择,但是如果只是序列号发生变化的话,路由信息将不必立即被广播。如果对于同一个节点,更新包有相同的序列号,那么具有更小metric值的更新包将被使用,而且已存在的路线将被舍弃或者作为一个备选路径。在这种情况下,有着该序列号的更新包被发送给网络中的所有可移动节点。将要被改变的路径的广播可能会被延迟直到最优的路径已经被找到了。可能不稳定的路径的延迟广播可以减少路由表的波动,并且减少到达时路由相同序列号码的可能路径条目的再广播数目。(ohmygod,翻死我了……)

    The elements in the routing table of each mobile node change dynamically to keep consistency with dynamically changing topology of an ad hoc network. To reach this consistency, the routing information advertisement must be frequent or quick enough to ensure that each mobile node can almost always locate all the other mobile nodes in the dynamic ad hoc network. Upon the updated routing information, each node has to relay data packet to other nodes upon request in the dynamically created ad hoc network.

    每个可移动节点的路由表元素不断变化来保持ad hoc网络中变化的拓扑结构的一致性。为了达到这种一致性,路由信息广播一定要频繁或足够快速来保证每个可移动节点几乎总是可以定位动态ad hoc网络中的其他所有节点。基于更新路由信息,每个节点不得不向其他节点转播数据包来满足动态变化的ad hoc网络中产生的各种需求。
     
    Figure 1 shows an example of an ad hoc network before and after the movement of the mobile nodes. Table 1 is the routing table of the node H6 at the moment before the movement of the nodes. The Install time field in the routing table helps to determine when to delete stale routes.

    Figure 1展示了一个ad hoc网络在可移动节点发生移动前后的例子。Table 1是节点H6在节点移动前、当前时刻的路由表。其中,Install区域帮助决定何时去探测陈旧的路径。

    Figure 2 shows an example of packet routing procedure in DSDV. Node H4 wants to send a packet to the node H5 as shown in Figure 1. The node H4 checks its routing table and locates that the next hop for routing the packet is node H6. Then H4 sends the packet to H6 as shown in Figure 2a. Node H6 looks up the next hop for the destination node H5 in its routing table when it receives
    the packet (Figure 2b). Node H6 then forwards the packet to the next hop H7 as specified in the routing table as shown in Figure 2c. The routing procedure repeated along the path until the packet finally arrives its destination H5.

    图2展示了利用DSDV的分组路由过程的例子。在图1中,节点H4想要向节点H5发送一个包。节点H4检查它的路由表,进行定位后发现路径的下一跳是节点H6,。然后像图2a中显示的一样,H4向H6发送包。在收到这个包后(图2b),节点H6在它的路由表里查找到底H5的下一跳。然后节点H6将包前推到路由表中指明的下一跳H7(图2c)。这样的路由过程在路径中一直重复,知道包最终到达它的目的地H5。

    In the routing information updating process, the original node tags each update packet with a sequence number to distinguish stale updates from the new one. The sequence number is a monotonically increasing number that uniquely identifies each update from a given node. As a result, if a node receives an update from another node, the sequence number must be equal or greater than the sequence number of the corresponding node already in the routing table, or else the newly received routing information in the update packet is stale and should be discarded. If the sequence number of one node in the newly received routing information update packet is same as the corresponding sequence number in the routing table, then the metric will be compared and the route with the smallest metric will be used.

    在路由信息更新的过程中,原始的节点给每个更新包添加了一个序列号码用于辨别更新包的新旧之分。这个序列号码是一个单调递增的数字,唯一地识别从特定节点发出每个更新。这样的结果是,如果一个节点从另一个节点收到了一个更新,这个序列号码一定大于等于路由表中相应的节点的序列号码,或者在更新包中收到的最新路由信息是陈旧的并应该被舍弃。如果最新接收的一个节点的序列号码与路由表中对应节点的号码相同,那么将比较相对路径的远近,而最近的路径将被使用。

    In addition to the sequence number and the metric for each entry of the update packet, the update route information contains also both the address of the final destination and the address of the next hop. There are two types of update packets, one is called full dump, which carries all of the available routing information. The other is called incremental, which carries only the routing information changed since the last full dump. Figure 3 shows an example that a node handles an incremental update packet.

    除了更新包中的每个条目的序列号码和metric值,更新信息中同样包含了目的节点的地址和下一跳的地址。有两种类型的更新包,一种被称为完全转存( full dump),这种类型将携带所有有效的路由信息。另一种被称为可增加的,它仅仅携带了自从上一次完全转存后的路由信息。图3展示了一个节点操纵一个可增长的更新包的例子。

    Figure 3 indicates that the node H7 in Figure 1 advertises its routing information with broadcasting the update packet to its neighbors. When the node H6 receives the update packet, it will check the routing information of each item contained in both the update packet and the its routing table and update the routing table. The entries with higher sequence numbers are always entered into
    the routing table (e.g., the entry H1 has newer sequence number - S516H1 in the update packet in Figure 3a. This sequence number is entered into the updated routing table Figure 3c after the routing update.), regardless of whether each of them have a higher metric or not. If an entry has the same sequence number, the route with smaller metric is entered into the routing table (e.g., the
    entry H5 has the same sequence number – S502_H5 in both the update packet in Figure 3a and the current routing table in Figure 3b, but the entry H5 in the current routing table in Figure 3b has lower metric, so it enters the updated routing table in Figure 3c.). The items with old sequence numbers in the update packet are always ignored (e.g., H2 and H8 have old sequence number
    respectively in the update packet in Figure 3a, both of them are ignored in the updated routing table in Figure 3c.).

    图3表明,图1中的节点H7将它的路由信息通过更新包广播给了它的邻居们。当节点H6接收到更新包后,它将检查更新包和它自己的路由表中的每一个条目,然后更新路由表。具有更高序列号的条目将总是被加到路由表中(例如,在图3a中,条目H1在更新包中具有更新的序列号码S516H1。这个序列号码在路径更新后被加到路由表图3c中),无论它们是否具有更高的metric值。如果一个条目具有相同的序列号码,具有更小的metric值的路径将被加到路由表中(例如,条目H5在更新包(图3a)和当前的路由表(图3b)中具有相同的序列号码S502_H5,但是当前路由表中的条目H5具有更小的metric值,因此在图3c中它被加到了更新的路由表中)。更新包中具有陈旧的序列号码的条目总是被忽略(例如,在更新包(图3a)中,H2和H6的序列号已经很陈旧了,它们都会再更新后的路由表中被忽略(图3c)。)。

    Each node in an ad hoc network must periodically transmit its entire routing table (full dump) to its neighbors most likely using multiple network protocol data units (NPDUs) [7]. The full dumps of the nodes can be transmitted relatively infrequently when little movement of mobile nodes is occurring. Incremental update packets are transmitted between the full dumps for partial changes of the routing table such as receiving new sequence numbers and fewer significant route changes (as shown in Figure 3a). The incremental routing update should be fitted in one NPDU. The mobile nodes are expected to determine the significance of the routing information changes to be sent out with each incremental advertisement. As shown in Figure 3a, the significant route change of H1 has to be included first, then the others with sequence number changes. When the significant changes increase with frequent varying of the network topology and the size of an incremental approaches the maximum size of a NPDU, a full dump is scheduled to make the next incremental become smaller.

    Responding to Topology Changes  Links can be broken when the mobile nodes move from place to place or have been shut down etc. The broken link may be detected by the communication hardware or be inferred if no broadcasts have been received for a while from a former neighbor. The metric of a broken link is assigned infinity. When a link to next hop has broken, any route through that next hop is immediately
    assigned an infinity metric and an updated sequence number. Because link broken qualifies as a significant route change, the detecting node will immediately broadcast an update packet and disclose the modified
    routes.

    响应拓扑变化  当节点移动或被关闭时,连接也会断开。断开的连接可以被用于沟通联系的硬件发现,或者由之前一个邻居发来的广播一直无人接手可推测而来。断开的连接之间的metirc值会赋为无穷大。当到达下一跳的连接断开时,任何一个通过这一跳的路径会立即被赋值为无限大距离和一个更新后的序列号码、因为连接的断开被当做一个重大的路径改变,则发现这一变化的节点将立即广播一个更新包,并且告知修改后的路径。

    To describe the broken links, any mobile node other than the destination node generates a sequence number, which is greater than the last sequence number received from the destination. This newly generated sequence number and a metric of infinity will be packed in an update message and flushed over the network. To avoid nodes themselves and their neighbors generating conflicting sequence numbers when the network topology changes, nodes only generate even sequence numbers for themselves, and neighbors only generate odd sequence numbers for the nodes responding to the link changes.

    为了描述断开的连接,除了目的节点,任何一个可移动节点都生成一个序列号码,这个号码比上一个从目的节点接收到的序列号码要大。这个生成的序列号码和无穷大的metric值将被封装到一个更新信息里,然后在网络中传播开来。为了防止节点自己和他们的邻居们在拓扑变化时生成冲突的序列号码,节点仅仅为他们自己生成偶数的序列号码,而邻居们仅仅为它们生成奇数的序列号码来响应连接的变化。

    Figure 4 illustrates an example of link broken. We assume the link between the node H1 and H7 is broken in Figure 1. Node H7 detects the link broken and broadcasts an update packet (Figure 4a) to node H6.
    Node H6 updates its routing table with the newly received routing information (odd sequence number – S517_H1 and ∞ metric) of entry H1 (Figure 4c). It means that the link to node H1 is broken. If any other
    nodes send route update information of node H1 with even sequence number generated by node H1 previously, it is smaller than the current sequence number - S517_H1 in Figure 4c, to node H6, which knows that the route information is stale, thus routing loop is prevented. If other nodes generate a newer odd sequence number with an infinity metric for node H1 and it is sent to node H6, which knows that the link to node H1 is broken via the odd sequence number and infinity metric.

    图4列出了一个连接断开的例子。我们假设图1中的节点H1和节点H7之间的连接断开了。节点H7检测到连接断开并且向节点H6广播了一个更新包(图4a)。节点H6利用刚刚接收的路径信息更新了它的路由表中的H1项(奇数序列号码S517_H1和无穷大metric值)。这意味着,通向节点H1的连接断开了。如果任何一个其他节点利用节点H1之前生成的偶数序列号码发送节点H1的路径更新信息,它将比当前的序列号码S517_H1(图4c)小,这告诉节点这个路径信息已经过时了,因此路径循环就被成功阻止了。如果任何一个其他节点利用H1的无穷大metric值生成一个更新的奇数序列号码,并且将它发送给节点H6,奇数的序列号码和无穷metric值将告知通往H1的连接已经断开。

    The routes to a lost node will be re-established when the lost node comes back to the network and broadcasts its next update message with an equal or later sequence number and a finite metric. The update message will be disseminated over the whole network to indicate that the broken links have come back into service again. In any case, the entry containing a finite metric and an equal or later sequence number will supersede the corresponding entry with a metric of infinity in the routing table of a node.

    当丢失的节点重新回到网络中时,连接它的路径将被重新建立,并广播它的更新信息,包括一个大于等于的序列号码和一个有限的metric值。这个更新信息将在整个网络中散步,来表明断开的连接已经重新上线了。在任何情况下,一个包含了有限metric值和一个大于登录序列号码的项将取代路由表中一个节点对应的metricz值。

    DSDV also contains substantially more procedures for handling layer-2 and layer-3 routing and for dealing with the extension of base station coverage. The details of these procedures are referred to [7].


  • 相关阅读:
    阿里云部署Java web项目初体验(转)/linux 上配置jdk和安装tomcat
    【数据结构与算法01】数组
    HashMap和Hashtable的区别 源码分析
    【JMS】JMS之ActiveMQ的使用
    日志框架只打印出Mybatis SQL的配置
    [C++]简单的udp通信
    [原][osg][osgearth]简单的通过osgDB,读取高程tif,修改高程tif
    [转] VR-FORCES 介绍
    写出漂亮的代码
    如果需要一个图形学算法
  • 原文地址:https://www.cnblogs.com/xiaowangba/p/6314768.html
Copyright © 2011-2022 走看看