Install Package 2 – Configuration and installation for router


Package 2 installs necessary software (e.g., radvd) for border router on a Raspberry Pi. The Pi should be configured as in Package 1 and the IEEE 802.15.4 radio is assumed to be enable. A successful configured Raspberry Pi is able to act as a border router which connects 6LoWPAN and IPv6 networks. A border router should have two addresses. One is for 6LoWPAN network, the other is for IPv6 network. The installation instructions are as following:

  1. Go to the directory “<location path>/CSIRO/smit/routersetup/”.

  2. Edit configuration file “config”.
    • Change the value of “ABRO”. This value must be the link local address of lowpan interface (e.g., lowpan0). For example, the local link address of lowpan0 is “fe80::20c:29ff:fe11:7fc8” (use the command “ifconfig” to get the information), then set ABRO=”fe80::20c:29ff:fe11:7fc8”. A sample link layer address is as below.
      inet6 addr: fe80::20c:29ff:fe11:7fc8/64 Scope:Link
      

      Note: This is a mandatory step.
    • The prefix (e.g., a:a:a:a::/64) configuration of lowpan interface will be the network prefix of 6LoWPAN network. That is, a Raspberry Pi as client obtains an IP address like “a:a:a:a:6:7:8:9/64”, where “6:7:8:9” is the link local address (without prefix “fe80::”) of client’s radio.

    • Check and/or modify default IP address, netmask and prefix setting. The IP address of Ethernet interface “eth0” is connected to the server through IPv6 network. So that the IP address of “eth0”is recommended to be in the same subnet of server. For example, both “eht0” and server’s IP address are “b:b:b:b:1:2:3:4/64” and “b:b:b:b:6:7:8:9/64”, respectively. The server IP address is configured in Package 3.

    • To recover the default configuration, copy the backup configuration file ”.config” to “config”.

  3. Return to the directory “<location path>/CSIRO/smit/routersetup/” and run the Python script “smit_deploy.py”.
    $ sudo python smit_deploy.py -install p2
    
    • If the file “/etc/radvd.conf” exists, it will be copied to “/etc/radvd.sbck” as the backup of original configuration.
    • It is recommended that “radvd.conf” is manually backed up for recovery purpose.
    • Radvd will be added to the system startup that it automatically starts with system boot.
  4. Check the installation of radvd.
    $ sudo radvd -c
    

    If there is no any output from the command, radvd installation may not be successful. Please try to install it again and ensure that there is no any interuption during the installation.

  5. Reboot the system or manually start Radvd.
    $ sudo radvd
    

    To run radvd in debug mode, please use the following example.

    $ sudo radvd -d 5 -m stderr -n
    

Note: For more configurations on radvd, please see the reference like radvd configuration. The path of “radvd.conf” is “/etc/radvd.conf”. The connection between router and client will be disconnected every 30 minutes (by default), please see the note of Install Package 1 – Configuration and installation for pi.

go to Install Package 3 – Configuration and installation for server