AODV路由协议

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

The route is only updated if the new sequence number
• higher than the destination sequence number in the route table • the sequence numbers are equal, but the hop count is smaller than the existing hop count in the routing table • the sequence number is unknown
Route Reply (RREP) Message Format
Route Error (RERR) Message Format
Link Breakage
• Nodes remember active routes • Next hop breaks -> neighbors using that route are notified • Notification is a RREP with: - metric = ∞ - dest_seqno = previous + 1 and is sent to each active neighbor
完整性
n • 它的路由表中通往目节点D的链路为 ( n , n ), j 为 n 的邻节点,可知链路 ( n , n )一定存在,即 i (n , n ) (n , n ) (n , n ) ( j ) 所以 n i 是节点 n j到目的节点D路由中记录的 下一跳节点。是由 i 的任意性,我们得到在 邻节不变的情况下,AODV通过记录到目的 节点的下一跳节点的IP地址,在Ad hoc网络 中可以形成一条完整的路由。
AODV Route Discovery
Time Out Time Out
: RREQ : RREP :Valid Route
Route Maintenance
• Periodic Hello message to detect continued presence of neighbours • When a link break is detected
– Node sends a RERR containing list of unreachable destinations due to link break – Receiving nodes forwards RERR to precursors of unreachable destinations
• Before sending or forwarding RERR
– Update destination sequence number in routing table entry – Invalidated entry
AODV Local Route Repair
Data packet be buffered
A destination node increments its own sequence number in two circumstances:
• before a node originates a route discovery • before a destination node originates a RREP in response to a RREQ(序号+1)
AODV Unicast Route Discovery
• RREQ (route request) is broadcast
– Reverse path is set up along the way – RREQ message contains < bcast_id; dest_ip; dest_seqno;src_ip; src_seqno; hop_count >
: RREQ : RREP :Valid Route
AODV Local Route Repair
: RREQ Data packet be discarded be buffered : RREP :Valid Route :RERR
Route Request (RREQ) Message Format
Ad-hoc Networking Example
• Suppose MH1 moves away from MH2 towards MH7, and has active sessions with MH3 and MH6. The following actions occur:
• MH2 notices that its link to MH1 is broken • MH2 checks its routing table, and finds that its link to MH1 was actively in use by MH3 and MH4. • MH2 unicasts an ∞-metric route update, with an incremented destination sequence number, to MH3 and MH4. MH3 may subsequently issue a new route request for MH1. • MH4 also notes that its route to MH1 was actively in use, and forwards the ∞-metric route update to MH6. • MH6 may subsequently issue a new route request for MH1.
B
A
K
D N
Inclusion
• AODV has the following features:
- Nodes store only the routes that are needed - Need for broadcast is minimized - Reduces memory requirements and needless duplications - Quick response to link breakage in active routes - Loop-free routes maintained by use of destination sequence numbers - Scalable to large populations of nodes.
A node may change the sequence number in the routing table entry
• it is itself the destination node, and offers a new route to itself • it receives an AODV message with new information about the sequence number for a destination node • the path towards the destination node expires or breaks
• Example
RREQ S E F C G H I K D N J
B
A
RREQ <S, 11, 1, D, 0, 1> [D, S, 1, time, 11] S E F C G H I Reverse pointer J
B
A
K
D N
Forward pointer RREP <S, D, 12, 3, lifetime> S E F C G H I timeout J
评价MANET路由协议的指标
• 端-端的数据吞吐量和延迟
– 反映了数据报的传输质量
Fra Baidu bibliotek
• 路由请求的时间
– 有数据需要发送到发送出去的时间 – 路由协议的效率 – 路由控制信息与数据信息的比率
路由协议的性能在不同的网络中表现不同
2.3 AODV的正确性证明
• 1)AODV的完整性和正确性 每个节点(交换机或路由器)中的路由表, 都必须给出到所有可能的目的节点的下一跳 怎样走,并且,所给出的走法应是正确的。 这里,正确的含义是:沿着各节点(交换机 或路由器)中路由表所指引的路由,分组一 定能够最终到达目的节点(交换机或路由 器)。并且,分组到达目的节点后不会再向 其他节点(交换机或路由器)转发该分组。
Ad hoc On Demand Vector routing (AODV路由协议)
• AODV是基于距离矢量算法的路由协议。AODV只在路由表 中保持需要的路由,通常每一个目的节点保存一条路由,每 条路由信息都有生存期,若超时则该项路由信息无效。 AODV采用每个目的节点中保存的序列号来保持路由信息的 有效性,所有的路由分组都保存序列号。 • Route is set up only when requested • Nodes not along active paths not required to maintain route information • Avoids the Bellman-Ford “counting to infinity” problem • Link breakages notification only to affected nodes • Multicasting(多播路由算法) • Key Feature: Use of Destination sequence Number(目的 节点序列号) • Loop freedom(路由回环)
i d
i
j d
j
d
j
i
i
d
Loop-free
2)计算的复杂度
• 当一个节点希望和其他节点进行通信时,它首先会在自己的 路由表中查找是否存储了到目的节点的有效路由,如果存在 则采用该路由组包;当路由表中不存在到某一特点节点的路 由或已知存储的路由无效,则该节点就会发起路由探索,这 里节点只需遍历一遍路由表就可以得到所需的路由信息。在 路由探索中,沿途收到RREQ广播的节点同样会遍历路由表, 如果发现自己有到目的节点的有效路由则返回RREP,若没 有则可以得到一条到源节点的最新路由信息,同时并转发 RREP;沿途收到RREP的节点同样会得到一条到目的节点 的最新路由信息。所以,在路由探索中AODV的计算繁杂度 (n) 为 o。 • 在本地连接管理中,每个节点都会定期地向邻节点发送Hello 信息,由于Hello信息只在本地一跳范围内传递,不向外扩散, O (n ) 所以控制信息开销基本保持不变,不像DSDV那样以 增长。所以,由于AODV协议并不考虑链路的重量,而只关 心双向链路的存在,故在Ad hoc网络中,所有单跳链路是等 重的,这大大减少了节点运算的工作量,额外开销相对较少。
• RREP (route reply) is unicast back
– From destination if necessary – From intermediate node if that node has a recent route
AODV Messages
• • • • Route request (RREQ) Route reply (RREP Route error (RERR) Hello messages
AODV route table entry
• • • • • • • • • Destination IP Address Destination Sequence Number Vaild Destination Sequence Number flag (有效) Network Interface(网络接口模式。设成混搭模式) Hop Count (number of hops needed to reach destination) Next Hop List of Precursors Lifetime (expiration or deletion time of the route) Other State and routing flag (e.g. valid, invalid, repairable, being repaired)
相关文档
最新文档