📄 readme
字号:
Introduction============This is an AODV implementation developed at Uppsala University,Sweden, with some funding from Ericsson AB. It has been developedmainly for use in the APE testbed, http://apetestbed.sourceforge.net.The code is released under the GNU General Public License (GPL). Seethe GPL document for more information.This release is based on AODV draft version 13. There are noguarantees that it implements all features correctly, although this isthe goal. The code is provided as is. See the CHANGELOG for updatesand changes between releases.This AODV implementation runs as a user-space daemon, maintaining thekernel routing table. Netfilter is used to capture datapackets. Filtering is done in user-space, so there may be someperformance penalties, although coding is much simplified. Stableoperation has higher priority than performance.The code has been successfully tested in a real ad-hoc environmentusing up to 5 nodes (4 hops) without problems. It has been debugged inns-2 by running extensive simulations. The performance is usually onpar or better than the AODV version in ns-2. It has also been interoptested with great results. If you happen to experience less successfuloperation of this implementation, please contact the author(s) anddescribe your problems.Requirements============Real world:* Linux OS (2.4.x, 2.6.x).* Kernel with Netfilter support. Most Red Hat/Fedora kernels have this support.* Wireless LAN cards in ad-hoc mode (alternatively a wired setup can be used).ns-2:* See README.nsInstallation============If you are running AODV-UU in NS-2, then you should read README.ns forinstall instructions.Make sure you have the kernel source (or at least headers) of thekernel you are compiling against installed. Otherwise the kernelmodules might not compile. See the troubleshooting section if thereare problems.Compile with "make":> makeInstall (as "root"):> make installRun (as "root" with recommended options for debugging):> aodvd -l -r 3For command line options, run:> aodvd --helpThe following module must be loaded when running (or compiled intothe kernel):* kaodv.{o,ko}Module loading should happen automatically if AODV is installed andthe module loading system (modprobe) is properly configured.Compiling for ARM (iPAQ, Zaurus)================================AODV-UU now easily compiles for the ARM platform, which makes itsuitable for use on many PDAs, including the Compaq/HP iPAQ and theSharp Zaurus. However, since cross-platform compiling is necessary,this process requires some extra steps. This is what I did to get itworking with the Familiar distribution on a H3800 iPAQ:1. First download the cross-compiler, for example:> wget ftp://ftp.handhelds.org/pub/linux/arm/toolchain/arm-linux-toolchain-current.tar.gz2. Unpack the cross-compiler according to instructions inftp://ftp.handhelds.org/pub/linux/arm/toolchain/README, usually:> cd /; tar zxvf /path/to/arm-linux-toolchain-current.tar.gz3. Retrieve the kernel source code matching the kernel used on the ARMdevice.You may check the URL below for binary pre-compiled kernelpackages, installable via ipkg. There are no guarantees that these arealways available or up to date...http://www.docs.uu.se/docs/research/projects/ape/familiar/Otherwise, for the Familiar distribution, the kernel source code canbe retrieved via anonymous cvs:> export CVSROOT=:pserver:anoncvs@cvs.handhelds.org:/cvs> cvs loginPassword=anoncvsGet the matching version with "-r":> cvs export -r K2-4-18-rmk3-hh6 linux/kernel4. Re-link the "asm" and "linux" include directories in armcross-compiler tree to point to those in the ARM kernel source tree:> ln -s /path/to/arm-kernel-source/include/linux /skiff/local/arm-linux/include/linux> ln -s /path/to/arm-kernel-source/include/asm /skiff/local/arm-linux/include/asm5. Make sure the arm compiler is in the PATH and that /usr/src/linuxpoints to the ARM kernel source.> export PATH=$PATH:/skiff/local/arm-linux/bin> ln -s /path/to/arm-kernel-source /usr/src/linux6. Since the default Familiar kernel do not have the proper netfiltersupport for AODV-UU (CONFIG_IP_NF_QUEUE) it is necessary to compile anew kernel. Follow the instructions athttp://www.handhelds.org/handhelds-faq/development.html. Buildipkg-packages for easy installation. Then install kernel using ipkg. Itmay be possible to transfer only the ip_queue.o module so thatinstalling a new kernel can be avoided.6. Compile AODV-UU for ARM:> make armTo install, copy kaodv.o and aodvd to the ARM device.Debug output============To get debug output, make sure the daemon is compiled with the -DDEBUGoption set (check Makefile). Debug information is written to/var/log/aodvd.log if the AODV is run with the "-l" flag:> aodvd -lThis is the same output as written to STDOUT if running the daemon inthe foreground. To get printouts of the AODV internal routing table,run AODV with:> aodvd -r 2.5where the number is the interval between routing table printing, in seconds.The routing table is written to /var/log/aodvd.rtlog.Note about Local Repair=======================As of version 0.6 of AODV-UU, local repair is fully implemented.However, please be aware of the fact that local repair does not alwayshelp performance, it may in fact hurt it. Consider turning localrepair off if this is not a feature you are interested in.Note about HELLO messages=========================This implementation rely on HELLO messages. However, it has beenfound, through real world testing, that HELLO messages are not a goodway to do neighbor sensing in a wireless environment (at least notover 802.11). Therefore, you may experience bad performance whenrunning over wireless. There are several reasons for this:* HELLO messages are broadcasted. In 802.11, broadcasting is done at alower bit rate than unicasting, thus HELLO messages travel furtherthan data.* HELLO messages are small, thus less prone to bit errors than datatransmissions.* Broadcast transmissions are not guaranteed to be bidirectional,unlike unicast transmissions.Running a test==============To test the basic functionality of AODV you need at least threecomputers configured to run AODV. The nodes IP-address configurationshould be in the same subnet. Then try to place the computers so thattwo of them are out of each others transmission range with the thirdcomputer in the middle, as in the illustration below. It may also beconvenient to use a MAC-filter, like that part of the APE testbed,http://apetestbed.sourceforge.net.A <-> B <-> CRun on either A or C:> ping -R <IP A or C>to ping the remote computer. The "-R" option will record the routetaken by ping packets, so that the actual route taken can be seen.Unidirectional links=====================This AODV implementation can detect the presence of unidirectionallinks, and avoid them if necessary. It is done by sending a RREPextension along with the hello messages containing the neighbor set ofa node. This functionality is not part of the AODV draft as of version10, but similar functionality may be in futureversions. Unidirectional link detection can be enabled with the "-u"option. This feature is experimental and may be BROKEN in any release.Internet gateway support========================As of v0.8, AODV-UU implements gateway support by tunneling packets togateway configured nodes. This is much more robust than a defaultroute solution or similar. AODV-UU must be compiled with "CONFIG_GATEWAY" defined (seeMakefile). Nodes that run "aodvd" with the -w flag will automaticallyact as gateways - thus answering to RREQs according to an "addresslocality" decision, i.e., RREQs for addresses that a gateway thinkslie outside the ad hoc network will generate a (proxy) RREP. This RREPcontains a special extension that automatically sets up a tunnelbetween the source node and the gateway. Gateways currently implement"address locality" through a prefix check, thus the ad hoc networkmust share a prefix (e.g., 192.168.0.0/16). Other "locality checks"can easily be implemented in locality.c. Tunnels (i.e., routes togateways) are marked with a "G" flag in the routing table, whiletunnel entries (i.e., Internet destinations) are marked with and "I"flag.In case the ad hoc network does not use a globally valid prefix (orruns Mobile IP or similar), gateways should also have NAT enabled:> /sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADEChange eth0 to the name of the interface connected to the Internet ifnecessary.On the ad hoc nodes it is also necessary to add a default route in thekernel routing table, pointing to the ad hoc interface. For example, ifthe wireless ad hoc interface is eth1:> route add default dev eth1Otherwise, it will not be possible to communicate with destinationsoutside the ad hoc prefix.Issues & Troubleshooting========================* If you run Fedora Core 1 and the kernel module "kaodv.o" fails tocompile, install the compatibility gcc compiler (gcc32 rpm). Then trycompiling with "make KCC=gcc32".* If the kernel module compilation fails or the module does not load,make sure that the kernel source code is installed and properlyconfigured. If you have a kernel config file (.config) matching yourrunning kernel, do a "make mrproper" (WARNING: this cleans up the treeand removes the .config file. You might want to make a .config backupfirst). Create a .config file (or use an existing one). Make sure thatthe kernel version numbering in the kernel's top-level Makefilematches your running kernel (Red Hat/Fedora sometimes add a"custom"-string). Do "make oldconfig". Dependending on whether youhave a 2.4 kernel or a 2.6 kernel, do "make dep" or "make prepare-all"respectively. Your tree should now be configured.* If a crash occurs, the kernel module "kaodv.o" may remain loaded andcan stop traffic from going through on the interface. Unload with"/sbin/rmmod kaodv" (root permissions required).* If the daemon refuse to start and complains about ipchains, makesure that the "ipchains" compatibility kernel module is not loaded.It will conflict with iptables. Do "ipchains -F" followed by "modprobe-r ipchains" to unload it.* For routing between nodes with arbitrary subnet addresses thedefault gateway in the kernel routing table must point to the nodeitself. Otherwise communication with addresses on a foreign subnetwill not be possible, since the kernel will complain that there is noroute available. Setting this gateway is typically done with thecommand:> route add default dev <wireless iface e.g., "eth1">Notes about the source code===========================libipq.c and libipq.h are unmodified files from the netfilterpackage which are included here for convenience.Contact:========Source code and implementation questions:Erik Nordstr鰉 <erik.nordstrom@it.uu.se>NS port questions:Bj鰎n Wiberg <bjorn.wiberg@home.se>Misc. questions:Henrik Lundgren <henrikl@docs.uu.se>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -