OLSR networks

From OLSR.org Wiki
Jump to: navigation, search

A mesh network based on OLSR (both olsrd and olsrd2) is typically made of three components, routers, clients and gateways.

The three categories might overlap in a single device.

OLSR networks are normally called [MANETs] or mesh networks.

routers

OLSR routers are computers which run the olsrd or olsrd2 routing daemon.

Each router has one or multiple OLSR interfaces which are assigned to the routing daemon and are used to send and receive OLSR protocol traffic. The routing daemon will automatically set up IP routes to allow sending traffic to all other OLSR routers in the mesh.

OLSR interfaces can be any kind of network interfaces that allow to transmit both unicast and multicast. You should not use interfaces which use a layer-2 mesh protocol (running layer-3 mesh over layer-2 mesh is a bad idea).

clients

Clients are computers that participate in the mesh but do not run a routing daemon. Each client must be connected to at least one OLSR router over a "non-OLSR" interface on the router. This interface MUST NOT have the same prefix as one of the OLSR interfaces of the router.

The client must have an IP route towards a mesh router with a prefix that covers all participating mesh routers and clients in the mesh. In most cases this is a default IP prefix (0.0.0.0/0 or ::/0).

The OLSR router the client is attached to needs to advertise the IP (or prefix) of the attached client into the OLSR network so all other routers can reach the client.

olsrd attached networks

olsrd calls attached networks HNAs (Host to Network Association). There are two sections in the configuration file for attached networks, one for IPv4 and one of IPv6.

The following example announces the 10.0.0.0/24 network to the other OLSR routers:

Hna4 {
    10.0.0.0      255.255.255.0
}

olsrd2 attached networks

olsrd2 attached networks can be configured in the OLSRv2 Plugin configuration section:

The following example announces the 10.0.0.0/24 network to the other OLSR routers:

[olsrv2]
    lan 10.0.0.0/24

gateways

A gateway is an OLSR router which provides connection to the internet for the rest of the network.

The OLSR router has to announce an attached network for the default prefix to the rest of the mesh network. IPv4 gateways often have to use NAT to connect the mesh to an internet provider.

The following example announce an IPv4 gateway in a olsrd network:

Hna4 {
    0.0.0.0     0.0.0.0
}