显示标签为“NOAH”的博文。显示所有博文
显示标签为“NOAH”的博文。显示所有博文

2008年7月5日星期六

NO Ad-Hoc Routing Agent (NOAH)

NO Ad-Hoc Routing Agent (NOAH)NOAH is a wireless routing agent that (in contrast to DSDV, DSR, ...) only supports direct communication between wireless nodes or between base stations and mobile nodes in case Mobile IP is used. This allows to simulate scenarios where multi-hop wireless routing is undesired. NOAH does not send any routing related packets.


It has been updated to work with ns-2.26 - ns-2.30 and with non-Mobile IP scenarios. (For older versions of ns-2, take a look at http://www.informatik.uni-mannheim.de/informatik/pi4/projects/MobileIP/ns-extension/ but this version does not contain the bugfixes for non-Mobile IP scenarios.)

Further update to allow static multi-hop routes. The routes can be set up using the routing command which takes as parameters the number of destinations and then as many tuples of destination and next hop address. The following example sets up static routing for a line of nodes:

# setup static routing for line of nodes
for {set i 0} {$i < $val(nn) } {incr i} { set cmd "[$node_($i) set ragent_] routing $val(nn)" for {set to 0} {$to < $val(nn) } {incr to} { if {$to < $i} { set hop [expr $i - 1] } elseif {$to > $i} {
set hop [expr $i + 1]
} else {
set hop $i
}
set cmd "$cmd $to $hop"
}
eval $cmd
}


Step-by-step installation instructions for ns-2.26 (and ns-2.30)
filechanges -->


Makefile.in add noah/noah.o \ to OBJ_CC and tcl/mobility/noah.tcl \ to NS_TCL_LIB

noah/noah.{h,cc} add noah.h and noah.cc to a new subdirectory noah/

tcl/mobility/noah.tcl add noah.tcl to tcl/mobility/

tcl/lib/ns-lib.tcl

line 191 (for v2.29 line 197): add source ../mobility/noah.tcl

line 603ff (for v2.29 line 649ff): add NOAH {
set ragent [$self create-noah-agent $node]
}

line 768ff (for v2.29 line 839ff): add

Simulator instproc create-noah-agent { node } {
# Create a noah routing agent for this node
set ragent [new Agent/NOAH]
## setup address (supports hier-addr) for noah agent
## and mobilenode
set addr [$node node-addr]
$ragent addr $addr
$ragent node $node
if [Simulator set mobile_ip_] {
$ragent port-dmux [$node demux]
}
$node addr $addr
$node set ragent_ $ragent
return $ragent
}

转自

http://icapeople.epfl.ch/widmer/uwb/ns-2/noah/

......

[Read More...]

Multi-Channel & Multi-Interface Extension in NS2 and NOAH routing - Hyacinth

I modified some codes to extend NS2 to supportMulti-channel Multi-interface for Wireless Mesh Networks.(key word: MCMR, Static Channel Assignment Mesh Neworks)My work is based on Hyacinth NS2 code and following tutorials:

1. NS2.Notebook: Multi-channel Multi-interface Simulation in NS2 (2.29)
2. A new one for hyacinth for NS-2.29
3. Extend NS2 to support multi-channel multi-interface for wireless networks

=================================================================
This work is divided into two partition.

First, we must add "interfaces" into MAC layer andChannel module and modify "arp.cc" to avoid errorupdating neighbor nodes' arp table.

Second, we must modify (or add) routing protocolto choose correct "interface" to send out packets.

In first partition, I followed the steps in"Multi-channel Multi-interface Extension" sectionin the first tutorial.

In second partition, I used the "manual routing"in the first tutorial at the beginning.

And then, I modify "NOAH" protocol to supportMulti-interface MAC by the steps of how to modify"AODV" protocol in the third tutorial .

The next document will show the following:
(i) the concept about extending Multi-interface in NS2 by the first tutorial;
(ii) my code of a modified "NOAH" protocol.


In the following,I will describe some concepts of the multi-interface extending in the first tutorial.

1. The point in tcl/lib/ns-lib.tcl

The modification of "create-wireless-node" is adding 5 (or more)interface in a wireless node.And we can easily find that a wireless node have 5 copies of MAC-layer (Figure1).



(Figure 1)
So, there are five LL, ARP, IFq, MAC and NetIF in a wireless node,and the range of their number is 0 to 4. (ex: ll_(0) ~ ll_(4), ifq_(0) ~ ifq_(4))

Also, we must know that each node has five node ID.(ex: id of node(0) is 0 to 4; id of node(5) is 25 to 29.)

2. tcl/lib/ns-mobilenode.tcl

Let the pkt path in "MAC Layer" (Figure 1) find the right interface.(especially down-link)

6. mac/mac-802_11.ccThe reason of "(dst/NUM_NICS) and (index_/NUM_NICS)"is that each node has five node id.
============================================================
By the way,if you want to disable ARP protocol in 5-interface node, just do like the following:
modify mac/arp.cc

intARPTable::arpresolve(nsaddr_t dst, Packet *p, LL *ll)
{ //disable ARP
hdr_cmn *ch = HDR_CMN(p);
mac_->hdr_dst((char*) HDR_MAC(p), 5*ch->next_hop());
return 0; ARPEntry *llinfo; assert(initialized());
.........
}

If ns2 you use is not multi-interface, you don't need multiply 5 and only "ch->next_hop()."
==========================================================
Finally, I have a modified NOAH routing protocol. (download)

All I do is following the steps of how to modify "AODV" protocolin the third tutorial.

Basically, I think "manual routing" is OK, but there is another choice which is"modified NOAH routing."

You can use it as the following:

set cmd "[$node_($i) set ragent_] routing $val(nn)"set cmd "$cmd $to $hop $NIC"

"$to" is the destination.
"$hop" is the next hop.
"$NIC" is the interface which you assign between this nodeto the next hop.(channel of this interface is assigned at "$ns_ node-config")


转自
http://blog.pixnet.net/zayrowz/post/9922095
源自
http://www.ecsl.cs.sunysb.edu/multichannel/
......

[Read More...]