Back
July 2015
Make your 6LoWPAN network addressable to your PC with BBB - Hasan Derhamy
This blog entry will cover the setup to connect a ContikiOS based 6LoWPAN network to a local LAN.
Setup
- BeagleBone Black board - running tunslip6
- ContikiOS Border router - in this case ~/contiki/examples/ipv6/rpl-border-router
- One or more CoAP enabled ContikiOS sensor nodes
- Windows based machine
Network Diagram
Instructions
- Connect the BBB board by USB to the PC
- Once the network connection is up, use Putty to ssh into the BBB
- Run the tunslip6 program using your settings. In this case: sudo ./tunslip6 -t tun1 -B 115200 -s /dev/ttyUSB0 fdfd::ff/64
- Type ifconfig to view the network interfaces
- Now, set the global ipv6 address of the usb0 interface using the following command: sudo ifconfig usb0 inet6 add fdfd:55::80fe/64
- Now configure the BBB to perform ip forwarding: sudo sysctl -w net.ipv6.conf.all.forwarding=1
The ip address can be anything you like, just make sure it matches to the windows side in the next instruction.
- Now, set the global ipv6 address of the Local Area Connection belonging to the usb network adaptor. Set the ipv6 address to something like: fdfd:55::80ff/64
- Now you should be able to send ping from the windows PC to the BBB address: ping fdfd:55::80fe
- and finally, configure an off-link static route on the windows machine using the command: netsh interface ipv6 add route fdfd::/64 "Local Area Connection 4" fdfd:55::80fe
- Now you should be able to ping fdfd::ff or fdfd::01 from the windows machine. This also means you can use Copper to query CoAP servers
Quote: RFC5942
On hosts with multiple interfaces, care must be taken to ensure that
the scope of ND processing from one link stays local to that
link. That is, when responding to an NS, the NA would be sent
out on the same link on which it was received. Likewise, a host
would not respond to a received NS for an address only assigned
to an interface on a different link. Although implementations
may choose to implement Neighbor Discovery using a single data
structure that merges the Neighbor Caches of all interfaces, an
implementation's behavior must be consistent with the above
model.
Links
http://windows.microsoft.com/en-us/windows/configuring-multiple-network-gateways#1TC=windows-7
http://answers.microsoft.com/en-us/windows/forum/windows_7-networking/how-to-enable-ping-response-in-windows-7/5aff5f8d-f138-4c9a-8646-5b3a99f1cae6?auth=1
https://wiki.archlinux.org/index.php/IPv6
Not used by useful:
http://www.sevenforums.com/tutorials/320978-static-routes-create-remove.html
http://tomicki.net/ipv6.router.php
Home