NS2中DSDV分析
来源:互联网 发布:淘宝新品打造爆款 编辑:程序博客网 时间:2024/05/16 17:24
In this routing protocol routing messages are exchanged between neighboring mobilenodes (i.e mobilenodes that are within range of one another), not flooding (the route advertisements are not re-broad-casted....) Routing updates may be triggered or routine. Updates are triggered in case a routing information from one of the neighbors forces a change in the routing table. A packet for which the route to its destination is not known is cached if no routing entry in the routing table. w. There is a maximum buffer size for caching the pkts waiting for routing information beyond which pkts are dropped.
In the route-advertisement messages, for each new route, there are three data:
- destination address
- metric
- sequence number which is originally stamped by the destination
All packets destined for the mobilenode are routed directly by the address dmux to its port dmux. The port dmux hands the packets to the respective destination agents. A port number of 255 is used to attach routing agent in mobilenodes. The mobilenodes also use a default-target in their classifier (or address demux). In the event a target is not found for the destination in the classifier (which happens when the destination of the packet is not the mobilenode itself), the pkts are handed to the default target which is the routing agent. The routing agent assigns the next hop for the packet and sends it down to the link layer.
The routing protocol is mainly implemented in C++. See dsdv directory and tcl/mobility/dsdv.tcl for all procedures related to DSDV protocol implementation
Implementation in ns-2
DSDV Packet format
It has a size of 9*N+1. N is the number of changed entries So, the first byte is N, then following 9 bytes in [dstnode:4 + metric:1 + seqno:4 ] and on and on.
HELLO MessagesThere is no hello message in sourcecode. Actually, Update messages are real HELLO messages. because the update is default set to be periodic as much as 15 seconds. There are two kinds of updates:
- Periodically triggered
- Immediately triggered
How long would it take to discover a medium-size topology?
perup_ is set to 15 seconds.... It is not very long. Usually, the topology information should be propagated to each node at 0-2 seconds because those updates are immediately triggered. However, WIRELESS LINK IS NOT RELIABLE FOR BROADCASTING. Therefore, some updates are not heard by all neighbors. It is quite possible that some neighbor will be discovered until the end of another round of updates (10-15 seconds later).
Double IP header bug
The DSDV agent has a 5-packet queue to store packets whose route can not be determined yet.
// see if we can send off any packets we've got queued if (rte.q && rte.metric != BIG) { Packet *queued_p; while ((queued_p = rte.q->deque())) recv(queued_p, 0); // give the packets to ourselves to forward delete rte.q; rte.q = 0;
table_->AddEntry(rte); // record the now zero'd queue }
So, the packet from the node itself, if queued, will be go to recv() function and add an IP header again. The "while loop" code shall be changed as:
while ((queued_p = rte.q->deque())) forwardPacket(queued_p); // give the packets to ourselves to forward
- NS2中DSDV分析
- NS2中DSDV, AODV, DSR协议评估
- DSDV协议分析
- NS2中数据包Packet分析
- NS2中trace分析工具
- NS2中数据包Packet的分析
- NS2中数据包Packet的分析
- NS2中tcl脚本文件分析(转)
- NS2中数据包Packet的分析
- NS2.29中Tdma的实现分析
- NS2中数据包Packet的分析
- 亲测可用的NS2对"1. AODV" "2. DSDV" "3. DSR" 的路由模拟
- ns2中nam文件未显示的原因分析
- NS2中trace文件格式分析1_新trace格式
- NS2中trace文件格式分析2_旧trace格式
- NS2中数据包Packet的分析——转载
- NS2中有线网络trace文件分析脚本(awk)
- NS2中无线trace分析(第1课)
- Tworaygrond Model
- 理解inode
- NS2中IEEE 802.11 MAC的bug和问题
- 一些学习gis有关的文章
- MapInfo TAB & MIF 文件说明
- NS2中DSDV分析
- mapInfo文件格式详解
- NS2中的DSR分析
- 在代码中获取调用者函数的名字
- MapInfo数据交换文件格式浅探
- hdu-4671 Backup Plan
- 几种常用的地理信息软件比较
- ubuntu linux下直观的网络流量监控
- mapInfo文件格式详解