Table Of Contents
Table Of Contents

Other Network Protocols


Network layer protocols in INET are not restricted to IPv4 and IPv6. INET nodes such as Router and StandardHost can be configured to use an alternative network layer protocols instead of, or in addition to, IPv4 and IPv6.

Node models contain three optional network layers that can be individually turned on or off:

ipv4: <ipv4NetworkLayerType> like INetworkLayer if hasIpv4;
ipv6: <ipv6NetworkLayerType> like INetworkLayer if hasIpv6;
generic: <networkLayerType> like INetworkLayer if hasGn;

In the default configuration, only IPv4 is turned on. If you want to use an alternative network layer protocol instead of IPv4/IPv6, your configuration will look something like this:

**.hasIpv4 = false
**.hasIpv6 = false
**.hasGn = true
**.networkLayerType = "WiseRouteNetworkLayer"

The list of alternative network layers includes:

  • SimpleNetworkLayer is a generic network layer where the concrete protocol type is a parameter
  • NextHopNetworkLayer is a network layer specialized for the “Next-Hop Forwarding Protocol”, an abstract implementation of the next-hop routing concept
  • WiseRouteNetworkLayer is specialized for the Wise Route protocol

The list of network layer protocols that can be plugged into SimpleNetworkLayer includes:

In addition to the network layer protocol, SimpleNetworkLayer includes an instance of GlobalArp for address resolution, and an instance of EchoProtocol, a module type that implements a simple ping-like protocol.

All the above network protocols can work with IPv4 addresses, IPv6 addresses, use MAC address as network address (this is sometimes useful in WSNs), or use sythetic addresses that only make sense within the simulation. [1]

In apps, you need to specify which network layer protocol you want to use. For example:

**.app[*].networkProtocol = "flood"



Flooding is a simple flooding protocol for network-level broadcast. It remembers already broadcast messages, and does not rebroadcast them if it gets another copy of that message.


ProbabilisticBroadcast is a multi-hop ad-hoc data dissemination protocol based on probabilistic broadcast.

This method reduces the number of packets sent on the channel (reducing the broadcast storm problem) at the risk of some nodes not receiving the data. It is particularly interesting for mobile networks.

The transmission probability for each attempt, the time between two transmission attempts, the maximum number of broadcast transmissions of a packet, and some other settings are parameters.


AdaptiveProbabilisticBroadcast is a variant of ProbabilisticBroadcast that automatically adjusts transmission probabilities depending on the estimated number of neighbours.


WiseRoute implements Wise Route, a simple loop-free routing algorithm that builds a routing tree from a central network point, designed for sensor networks and convergecast traffic (WIreless SEnsor routing).

The sink (the device at the center of the network) broadcasts a route building message. Each network node that receives it selects the sink as parent in the routing tree, and rebroadcasts the route building message. This procedure maximizes the probability that all network nodes can join the network, and avoids loops.

The sinkAddress parameter specifies the sink network address, rssiThreshold is a threshold to avoid using bad links (with too low RSSI values) for routing, and routeFloodsInterval should be set to zero for all nodes except the sink. Each routeFloodsInterval, the sink restarts the tree building procedure. Set it to a large value if you do not want the tree to be rebuilt.


The NextHopForwarding module is an implementation of the next-hop forwarding concept. (It can be thought of as an abstracted version of IP.)

The protocol needs an additional module, a NextHopRoutingTable for its operation. The routing table module is included in the NextHopNetworkLayer compound module.

Address Types

The following address types are available:

  • IPv4 address
  • IPv6 address
  • MAC address
  • module ID
  • module path

Protocols described in this chapter work with “generic” L3 addresses, they can use any address type.

When choosing IPv4 addresses, an Ipv4NetworkConfigurator global instance can be used to assign addresses to network interfaces. (Note that Ipv4NetworkConfigurator also needs a per-node instance of Ipv4NodeConfigurator for it to work.)

Address Resolution

Address resolution is done by GlobalArp. If the address type is IPv4, Arp can be used instead of GlobalArp.

[1]This is possible because the implementation of these modules simply use the L3Address C++ class, which is a variant type capable of holding several types of L3 addresses.