Package: inet.node.aodv
AodvRouter
compound moduleA mobile node with the Ad hoc On-Demand Distance Vector (AODV) routing protocol. Extends AdhocHost by adding the AODV routing protocol module.
AODV is a reactive routing protocol designed for mobile ad hoc networks (MANETs). Each node maintains its own routing table and discovers routes on-demand when communication is needed, rather than proactively maintaining routes to all destinations.
Key features:
- On-demand route discovery using Route Request (RREQ) and Route Reply (RREP) messages
- Route maintenance through Route Error (RERR) messages when links break
- Sequence numbers to ensure loop-free routes and route freshness
- Hop-by-hop routing where each node maintains only the next hop information
- Inherits wireless capabilities and mobility support from AdhocHost
The AODV v.2 (known as Dymo) is also implemented in INET as ~Dymo and ~DymoRouter.
<b>See also:</b> ~AdhocHost, ~DymoRouter, ~ManetRouter
Usage diagram
The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Used in
| Name | Type | Description |
|---|---|---|
| AODVNetwork | network | (no description) |
| AODVNetwork | network |
AODV network with an external Ethernet-connected host that can receive traffic from the wireless AODV network. The router acts as the gateway between the wireless AODV network and the wired Ethernet network. |
| ConfiguratorD | network | (no description) |
| DataLinkVisualizerMobileShowcase | network | (no description) |
| FilteringExampleNetwork | network | (no description) |
| NeighborCacheTest | network | (no description) |
| NetworkPathMobileShowcase | network | (no description) |
| RoutingTableVisualizationDynamicShowcase | network | (no description) |
| ShortestPath | network | (no description) |
| SimpleRREQ | network | (no description) |
| SimpleRREQ2 | network | (no description) |
Extends
| Name | Type | Description |
|---|---|---|
| AdhocHost | compound module |
A mobile wireless node that participates in ad hoc networks without centralized infrastructure. Extends WirelessHost by configuring the wireless interface for ad hoc mode operation and enabling packet forwarding. |
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| hasStatus | bool | false | |
| hasEnvironment | bool | false | |
| osgModel | string | "" |
3D model for OSG visualization, no 3D model by default |
| osgModelColor | string | "" |
Tint color, no colorization by default |
| canvasImage | string | "" |
Image for canvas visualization, no image by default |
| canvasImageColor | string | "" |
Tint color, no colorization by default |
| recordPcap | bool | false | |
| numPcapRecorders | int | recordPcap ? 1 : 0 | |
| numLoInterfaces | int | 1 | |
| numWlanInterfaces | int | 1 | |
| numEthInterfaces | int | 0 |
Minimum number of Ethernet interfaces |
| numPppInterfaces | int | 0 |
Minimum number of PPP interfaces |
| numTunInterfaces | int | 0 | |
| numVirtInterfaces | int | 0 | |
| fcsMode | string | "declared" | |
| hasIpv4 | bool | true | |
| hasIpv6 | bool | false | |
| hasGn | bool | false | |
| forwarding | bool | true | |
| multicastForwarding | bool | false | |
| hasUdp | bool | firstAvailableOrEmpty("Udp") != "" | |
| hasTcp | bool | firstAvailableOrEmpty("Tcp", "TcpLwip", "TcpNsc") != "" | |
| hasSctp | bool | false | |
| hasQuic | bool | false | |
| numApps | int | 0 |
Properties
| Name | Value | Description |
|---|---|---|
| class | NodeBase | |
| networkNode | ||
| labels | node | |
| display | i=device/cellphone |
Gates
| Name | Direction | Size | Description |
|---|---|---|---|
| radioIn [ ] | input | numWlanInterfaces | |
| pppg [ ] | inout | numPppInterfaces | |
| ethg [ ] | inout | numEthInterfaces |
Unassigned submodule parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| status.displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| status.initialStatus | string | "UP" |
TODO @signal, @statistic |
| environment.displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| environment.initStage | int | 0 |
Initialization stage for the setup command |
| environment.globalNamespace | bool | false |
Create new network namespaces under /var/run/netns/ (Linux only) |
| environment.namespace | string | "" |
Name of the host OS network namespace (optional) (Linux only) |
| environment.setupCommand | string | "" |
A host OS system command |
| environment.teardownCommand | string | "" |
A host OS system command |
| pcapRecorder.displayStringTextFormat | string | "rec: %n pks" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| pcapRecorder.verbose | bool | true |
Whether to log packets on the module output |
| pcapRecorder.recordEmptyPackets | bool | true |
Specifies if zero length packets are recorded or not |
| pcapRecorder.enableConvertingPackets | bool | true |
Specifies if converting packets to link type is allowed or not |
| pcapRecorder.pcapFile | string | "" |
The PCAP file to be written, suggested value: pcapFile = "${resultdir}/${configname}-#${runnumber}" + fullpath() + ".pcap" |
| pcapRecorder.fileFormat | string | "pcapng" | |
| pcapRecorder.snaplen | int | 65535 |
Maximum number of bytes to record per packet |
| pcapRecorder.timePrecision | int | 6 |
Time precision in recorded file. pcap supports only 6 (usec) or 9 (nanosec), pcapng supports more values (see 'if_tsresol' option in pcapng file format). |
| pcapRecorder.dumpBadFrames | bool | true |
Enable dump of frames with hasBitError |
| pcapRecorder.moduleNamePatterns | string | "wlan[*] eth[*] ppp[*]" |
Space-separated list of sibling module names to listen on |
| pcapRecorder.sendingSignalNames | string | "transmissionEnded" |
Space-separated list of outbound packet signals to subscribe to |
| pcapRecorder.receivingSignalNames | string | "receptionEnded" |
Space-separated list of inbound packet signals to subscribe to |
| pcapRecorder.dumpProtocols | string | "ethernetmac ppp ieee80211mac" |
Space-separated list of protocol names as defined in the Protocol class |
| pcapRecorder.packetFilter | object | "*" |
Which packets are considered, matches all packets by default |
| pcapRecorder.helpers | string | "" |
Usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper" |
| pcapRecorder.alwaysFlush | bool | false |
Flush the pcapFile after each write to ensure that all packets are captured in case of a crash |
| interfaceTable.displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| interfaceTable.displayAddresses | bool | false |
Whether to display IP addresses on links |
| cb.displayStringTextFormat | string | "processed %p pk (%l)" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| cb.interfaceTableModule | string |
Module path to the ~InterfaceTable module |
|
| cb.forwardServiceRegistration | bool | true | |
| cb.forwardProtocolRegistration | bool | true | |
| cb.interfaceMapping | object | {} |
Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default |
| cb.serviceMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default |
| cb.protocolMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default |
| bl.displayStringTextFormat | string | "processed %p pk (%l)" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| bl.interfaceTableModule | string |
Module path to the ~InterfaceTable module |
|
| bl.forwardServiceRegistration | bool | true | |
| bl.forwardProtocolRegistration | bool | true | |
| bl.interfaceMapping | object | {} |
Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default |
| bl.serviceMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default |
| bl.protocolMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default |
| li.displayStringTextFormat | string | "processed %p pk (%l)" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| li.interfaceTableModule | string |
Module path to the ~InterfaceTable module |
|
| li.forwardServiceRegistration | bool | true | |
| li.forwardProtocolRegistration | bool | true | |
| li.interfaceMapping | object | {} |
Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default |
| li.serviceMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default |
| li.protocolMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default |
| eth.bitrate | double | ||
| nl.displayStringTextFormat | string | "processed %p pk (%l)" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| nl.interfaceTableModule | string |
Module path to the ~InterfaceTable module |
|
| nl.forwardServiceRegistration | bool | true | |
| nl.forwardProtocolRegistration | bool | true | |
| nl.interfaceMapping | object | {} |
Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default |
| nl.serviceMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default |
| nl.protocolMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default |
| tn.displayStringTextFormat | string | "processed %p pk (%l)" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| tn.interfaceTableModule | string |
Module path to the ~InterfaceTable module |
|
| tn.forwardServiceRegistration | bool | true | |
| tn.forwardProtocolRegistration | bool | true | |
| tn.interfaceMapping | object | {} |
Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default |
| tn.serviceMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default |
| tn.protocolMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default |
| at.displayStringTextFormat | string | "processed %p pk (%l)" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| at.interfaceTableModule | string |
Module path to the ~InterfaceTable module |
|
| at.forwardServiceRegistration | bool | true | |
| at.forwardProtocolRegistration | bool | true | |
| at.interfaceMapping | object | {} |
Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default |
| at.serviceMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default |
| at.protocolMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default |
| aodv.displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| aodv.routingTableModule | string | "^.ipv4.routingTable" | |
| aodv.interfaceTableModule | string | "^.interfaceTable" | |
| aodv.networkProtocolModule | string | "^.ipv4.ip" | |
| aodv.askGratuitousRREP | bool | false |
See RFC 3561: 6.6.3 |
| aodv.useHelloMessages | bool | false |
See RFC 3561: 6.9 |
| aodv.useLocalRepair | bool | false |
See RFC 3561: 6.12 *not implemented yet* |
| aodv.destinationOnlyFlag | bool | false |
See RFC 3561: 5.1 |
| aodv.udpPort | int | 654 | |
| aodv.interface | string | "wlan0" |
The interface to be used for the AODV routing |
| aodv.gatewayAddress | string | "" |
The address of the external gateway (external traffic routed here by default) |
| aodv.maxPeriodicJitter | double | helloInterval / 4 |
It MUST NOT be negative; it MUST NOT be greater than MESSAGE_INTERVAL/2; it SHOULD NOT be greater than MESSAGE_INTERVAL/4. |
| aodv.periodicJitter | double | uniform(0s, maxPeriodicJitter) |
Jitter for externally triggered message generation and message forwarding |
| aodv.maxJitter | double | 5ms |
RFC 5148: need more revision: As well as the decision as to whether to use jitter being dependent on the medium access control and lower layers, the selection of the MAXJITTER parameter SHOULD be appropriate to those mechanisms. |
| aodv.jitter | double | uniform(0ms, maxJitter) |
Jitter for broadcasts |
| aodv.helloInterval | double | 1s |
Every helloInterval seconds a node broadcasts Hello messages (if it is necessary) |
| aodv.allowedHelloLoss | int | 2 |
AllowedHelloLoss * helloInterval is the lifetime value for Hello messages |
| aodv.activeRouteTimeout | double | 3s |
The timeout value for cached routes. If Hello messages are used, then the ACTIVE_ROUTE_TIMEOUT parameter value MUST be more than the value (ALLOWED_HELLO_LOSS * HELLO_INTERVAL). |
| aodv.netDiameter | int | 35 |
The maximum possible number of hops between two nodes in the network |
| aodv.nodeTraversalTime | double | 0.04s |
An estimation of the average one-hop traversal time |
| aodv.rerrRatelimit | int | 10 |
Maximum number of RERR messages that the AODV may originate in 1s. |
| aodv.rreqRetries | int | 2 |
Specifies the number of times AODV will repeat an expanded ring search for a destination |
| aodv.rreqRatelimit | int | 10 |
Maximum number of RREQ messages that the AODV may originate in 1s. |
| aodv.timeoutBuffer | int | 2 |
Plus time to wait for a delayed RREP (due to congestion) (to omit this buffer set it to 0) |
| aodv.ttlStart | int | 2 |
Specifies the TTL value when initiating a route request |
| aodv.ttlIncrement | int | 2 |
Specifies the value by which the TTL will be incremented each time a RREQ is retransmitted |
| aodv.ttlThreshold | int | 7 |
The maximum value of TTL over which NET_DIAMETER value will be used to broadcast any RREQ |
| aodv.localAddTTL | int | 2 |
It is used by the formula which calculates the initial TTL of the RREQ for a local repair |
| aodv.myRouteTimeout | double | 2 * activeRouteTimeout |
The value of the lifetime field that a destination node places in RREPs |
| aodv.deletePeriod | double | 5 * max(activeRouteTimeout, helloInterval) |
The time after which an expired route is deleted |
| aodv.blacklistTimeout | double | rreqRetries * netTraversalTime |
The time after which a blacklisted node is removed from the blacklist |
| aodv.netTraversalTime | double | 2 * nodeTraversalTime * netDiameter |
An estimation of the traversal time for the complete network |
| aodv.nextHopWait | double | nodeTraversalTime + 0.01s |
Timeout for a RREP-ACK |
| aodv.pathDiscoveryTime | double | 2 * netTraversalTime |
Buffer timeout for each broadcasted RREQ message |
Source code
// // A mobile node with the Ad hoc On-Demand Distance Vector (AODV) // routing protocol. Extends AdhocHost by adding the AODV routing protocol module. // // AODV is a reactive routing protocol designed for mobile ad hoc networks (MANETs). // Each node maintains its own routing table and discovers routes on-demand when // communication is needed, rather than proactively maintaining routes to all destinations. // // Key features: // - On-demand route discovery using Route Request (RREQ) and Route Reply (RREP) messages // - Route maintenance through Route Error (RERR) messages when links break // - Sequence numbers to ensure loop-free routes and route freshness // - Hop-by-hop routing where each node maintains only the next hop information // - Inherits wireless capabilities and mobility support from AdhocHost // // The AODV v.2 (known as Dymo) is also implemented in INET as ~Dymo and ~DymoRouter. // // @see ~AdhocHost, ~DymoRouter, ~ManetRouter // module AodvRouter extends AdhocHost { submodules: aodv: Aodv { @display("p=825,226"); } connections: aodv.socketOut --> at.in++; aodv.socketIn <-- at.out++; }File: src/inet/node/aodv/AodvRouter.ned