Mesh forwarding table
Introduction
The Mesh is a dynamic configuration through which two laptops can communicate with each other through a dynamically updated path. This path can be direct(single hop) if the two laptops are close to each other. However, when this is not the case, it includes several hops. When a new laptop enters the Mesh it configures itself in the network using a routing protocol. Eventually it builds up a forwarding table, which determines the path to each individual laptop in the Mesh.
In order to forward a packet to a specific destination, the laptop checks the forwarding table and sends the packet through the correct direction. In fact the complete routing is transparent to the interface. The table only includes the next hop to the path. For example if the path from xoA to xoB is
xoA---------xo1----------xo2-----------xo3----------xoB
the forwarding table of xoA will only link xoB to xo1. Each possible xoA's destination(like xoB or xo3) is paired with its corresponding first hop of the path. The first hop must always be a neighbor to xoA. In the next hop the packets check the new forwarding table and send the packet accordingly. The routing protocol belongs to the Layer 2 interface, and therefore includes the MAC addresses of the laptops.
Accessing the forwarding tables
The Marvell WLAN Linux Driver used in the laptops provides several commands to examine the Mesh configuration. The most useful command is iwpriv
which focuses on the forwarding table. By applying iwpriv eth0
or iwpriv msh0
we have access to several ioctl calls, the most interesting of which are
iwprid msh0 fwt_list n # gives the n-th entry of the forwarding table iwprid msh0 fwt_list_neigh n # gives the n-th entry of the neighbor table iwprid msh0 fwt_reset # resets both tables
The parameters eth0
and msh0
indicate the interface you need to examine. Note that one can examine the interfaces through ifconfig/iwconfig
. In both cases you have the same MAC address and iwpriv
gives the same tables, so one may use either. It is unfortunate that using the above commands you only have access to a single entry defined by parameter n
. To examine the whole table one must execute the fwt_list[_neigh]
commands for all desired values of n
.
Forwarding table characteristics
The forwarding table updates by adding additional lines not by replacing previous ones. An entry can be removed by The neighbor table is similar to the forwarding table, but only includes