6LBR Configuration file

Spandan edited this page May 20, 2016 · 6 revisions

Overview

This file is used by the 6lbr script to invoke the right 6LBR executable and to give it the right parameters
The default static configuration file is /etc/6lbr/6lbr.conf.

The configuration parameters are :

MODE=<ROUTER | SMART-BRIDGE | RPL-RELAY | FULL-TRANSPARENT-BRIDGE | NDP-ROUTER | 6LR | RPL-ROOT>
RAW_ETH=<0|1>
DEV_ETH=<interface>
[RAW_ETH_FCS=<0|1>]
DEV_TAP=<TAP ethernet device>
DEV_TAP_MAC=<TAP interface mac address>
BRIDGE=<0|1>
CREATE_BRIDGE=<MANUAL|LAZY|6LBR>
ETH_JOIN_BRIDGE=<0|1>
DEV_BRIDGE=<Bridge device>
DEV_RADIO=<SLIP Radio tty>
SOCK_RADIO=<addr[:port]>
BAUDRATE=<tty baudrate>
NVM=<NVM file to use>
[LIB_6LBR=<path to 6lbr installation>]
[WWW_6LBR=<path to www top directory>]
[BIN_6LBR=<path to 6lbr binaries>]
[ETC_6LBR=<path to 6lbr configuration and start up/shutdown scripts>]
[IFUP=<if-up script>]
[IFDOWN=<if-down script>]
[LOG_6LBR=<path to 6LBR log files>]
[LOG_6LBR_OUT=<6LBR log file>]
[LOG_6LBR_ERR=<6LBR error file>]
[LOG_LEVEL=<number>]
[LOG_SERVICES=<0xFFFFFFFF>]
[WATCHDOG_INTERVAL=<seconds>]
[WATCHDOG_FILE=<watchdog timestamp file>]
[STOP_AFTER_CRASH=<0|1>]
[EXTRA_PARAMS=<parameters>]

Ethernet configuration

The following parameters are mandatory :

  • MODE is used to select the run-time mode of 6LBR
  • RAW_ETH selects the mode of the Ethernet-side interface :
    • 0 : TAP mode, Ethernet-side interface is using a pseudo TAP interface
    • 1 : RAW mode, Ethernet-side interface is an existing Ethernet interface
  • DEV_ETH : Ethernet interface to use in Raw Ethernet mode
  • DEV_TAP : TAP device to use in TAP mode
  • RAW_ETH_FCS : Indicates if the Raw Ethernet frames contain the FCS field
    On some platform, the Ethernet driver when configured in promiscuous mode provides the FCS field along with the raw Ethernet packet, in that case the flag RAW_ETH_FCS must be set to 1 to tell the 6LBR to strip off the extra data.

SLIP Radio configuration

The device on which the SLIP radio is connected is selected with either DEV_RADIO or SOCK_RADIO. If you include both parameters, the DEV_RADIO option will be ignored.

  • DEV_RADIO specifies a device for example: DEV_RADIO=/dev/ttyUSB0
  • SOCK_RADIO specifies that the slip connection is made through a socket listening on host:port. This allows you to communicate with a simulated slip-radio mote in COOJA. Example: SOCK_RADIO=localhost:12345. If you do not include the port number, port 60001 is assumed, which is what COOJA uses by default when you open a socket server on node ID 1: SOCK_RADIO=localhost.
  • BAUDRATE is the baudrate to be used to communicate with the SLIP radio
  • DTR_RTS_STATE defines the DTR/RTS signals state at connection. 1 = Set (default value), 0 = Clear
  • CTS_RTS_HW_CONTROL is used to activate hardware flow control (To be used only if enabled on the slip-radio)

TAP bridging

If you are using the TAP device, the 6LBR allows you to bridge it with an existing interface

  • BRIDGE :
    • 0 : No interface bridging is performed
    • 1 : The TAP interface is bridged with the given Ethernet interface (This is not supported in Raw mode)
  • CREATE_BRIDGE (valid when BRIDGE=1):
    • MANUAL : The bridge must be created before launching 6LBR, manually or by some other external mechanism
    • LAZY : The bridge is created automatically by the 6LBR launch scripts (IFUP) if non existant, but not destroyed by IFDOWN
    • 6LBR : The bridge is fully handled by 6LBR: the IFUP script creates it if non existant, and IFDOWN destroys it
  • DEV_BRIDGE : Name of the bridge interface to be created
  • ETH_JOIN_BRIDGE : When 6LBR creates the bridge :
    • 0 : Add only DEV_TAP to the bridge
    • 1 : Add DEV_TAP and DEV_ETH to the bridge (Note that the interface will loose its configuration)

Note: TAP bridging is not related to SmartBridge or TransparentBridge 6LBR mode !

Logging

  • LOG_6LBR is the top directory of the 6LBR log files, by default it is /var/log
  • LOG_6LBR_OUT is the 6LBR log file, by default it is $LOG_6LBR/6lbr.log. Use ‘-’ for stdout
  • LOG_6LBR_ERR is the 6LBR error file, by default it is $LOG_6LBR/6lbr.err. Use ‘-’ for stdout
  • LOG_LEVEL is a number (1 to 12) to specifiy the verbosity of the log system
  • LOG_SERVICES is a bitmask to specify the ON/OFF value of the log system across the different 6LBR components

Installation

  • NVM is the name of the file used to store the persistent configuration, in NVM format, by default $ETC_6LBR/nvm.dat
  • LIB_6LBR is the top directory of the 6LBR installation, by default /usr/lib/6lbr
  • IFUP is the script to be called when the Ethernet interface is up, it can be used to do additional configuration, by default it’s $LIB_6LBR/6lbr-up
  • IFDOWN is the script to be called when the Ethernet interface is down, it can be used to do additional cleanup, by default it’s $LIB_6LBR/6lbr-down
  • WWW_6LBR is the top directory of the webserver root directory, by default $LIB_6LBR/www
  • BIN_6LBR is the top directory of the 6LBR binaries, by default $LIB_6LBR/bin
  • ETC_6LBR is the top directory of the 6LBR configuration files and start up/shutdown scripts, by default /etc/6lbr

Watchdog

6LBR has an application watchdog that check if 6LBR is not hanging. Periodically, 6LBR will update a timestamp file; the application watchdog monitor this file and if it has not been updated since three times the configured interval then 6LBR is restarted.

  • WATCHDOG_INTERVAL is the interval between two updates of the watchdog timestamp file, by default it is 60 seconds
  • WATCHDOG_FILE is the timestamp file of the watchdog, by default it is /var/log/6lbr.timestamp
  • STOP_AFTER_CRASH control the behaviour of the 6LBR run script; when set to 0, 6LBR is restarted even after an abnormal exit.

Other

  • IP_CONFIG_FILE contains the file in which 6LBR writes the global address of its Ethernet interface, by default it is not activated.
  • DEV_TAP_MAC contains the mac address of the TAP interface, by default it is 02:a:b:c:d:e. Set it to ‘-’ to use the generated mac address instead.
  • EXTRA_PARAMS may be used to transmit extra parameters to 6LBR executable
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.