Mesh forwarding table

From OLPC
Revision as of 17:53, 25 September 2007 by Yani (talk | contribs)
Jump to navigation Jump to search
  This page is monitored by the OLPC team.

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 ioctl calls 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 commands, the most interesting of which are

iwpriv msh0 fwt_list n          # gives the n-th entry of the forwarding table 
iwpriv msh0 fwt_list_neigh n    # gives the n-th entry of the neighbor table
iwpriv 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 however can be removed when it expires. The starting expiration time may be checked though

iwpriv msh0 fwt_time            # in ms(or chip ticks)

When a new path for a specific destination becomes available it is updated in the forwarding list, and this is usually long before the previous entry for the same destination has expired

The neighbor table is similar to the forwarding table, but only includes