If you are looking for a way to put your OpenWSN mesh network on the Internet, this page is the one you're looking for. After you go through this page, you will be able to ping your motes from the Internet.
Open an IPv6-in-IPv4 tunnel
Hurricane Electric (HE) provides free tunnel broker services. It lets you reach the IPv6 Internet by tunneling over existing IPv4 connections from your IPv6 enabled host or router, through one of HE's IPv6 routers. Before using this service, you need make sure you have an IPv6-capable host or router which also has IPv4 connectivity.
To open a tunnel:
- create an account on tunnelbroker
- login your account and select "Create Regular Tunnel"
- then you will see a textbox, which lets you fill your IPv4 address (see tips below)
- select an available Tunnel Server in the list and click "create Tunnel"
The tunnel broker assigns you an IPv6 address and a /64 IPv6 prefix. You will see something like this:
You might get the following warning (red background) when entering your IPv4 address:
IP is not ICMP pingable. Please make sure ICMP is not blocked. If you are blocking ICMP, please allow 220.127.116.11 through your firewall.
This is because your standard Windows distribution does not answer ping (ICMPv6 echo request). Issue the following command to configure Windows (Vista in this case) to reply to ping. Note that you need to open a Command Prompt by right clicking and choosing Open as Administrator. See Set Up Tunneling for details.
# netsh firewall set icmpsetting 8 enable
You now see the following message (green background):
IP is a potential tunnel endpoint.
on Tunnel Details page, change to Example configurations tab
select your OS and copy and paste the following commands into a command window.
then you need enable your routing by issue following command
# netsh interface ipv6 set interface interface=IP6Tunnel forwarding=enabled
IP6Tunnel is the default tunnel name when you create the tunnel. Change it if you used another name.
Configure your virtual interface
Before you can go on, you need to install a TAP virtual interface:
- Open a command window and type in following command. Obviously, you need to replace the ipv6 address by what HE assigned you.
# netsh interface ipv6 add address OpenWSN 2001:470:67:70a::1
# netsh interface ipv6 add route 2001:470:67:70a::/64 OpenWSN fe80::8
# netsh interface ipv6 set interface interface=OpenWSN forwarding=enabled
- go to your openwsn-sw source code and find openTun.py file
- open it with your favorite edit tools and find IPV6PREFIX list
- change it to your /64 prefix which tunnel broker gives you. In our case it's 2001:470:67:70a
- save the file and close it.
Ping your mote from Internet
To put your mesh on internet, you need build you mesh network first or run a simulation on your local computer. Then go to http://lg.he.net/ and ping your mote's ipv6 address by typing in the text box. You will see the response messages of your mote in your mesh network. If you are running a simulation the address would be like: 2001:470:67:70a:1415:92cc::2 (node2).
You need to change the IPV6PREFIX at OpenTun.py to the prefix you got from HE first. For our case, it would be 0x20,0x01,0x04,0x70,0x00,0x67,0x07,0x0a . The default network prefix is 0xbb,0xbb,0x00,0x00,0x00,0x00,0x00,0x00, which is used as local address.
If you can see something like below, congratulations! you have successfully put your mesh network on the internet.
core1.fmt2.he.net> ping ipv6 2001:470:67:70a:1415:92cc:0:2 numeric count 5
Sending 5, 16-byte ICMPv6 Echo to 2001:470:67:70a:1415:92cc:0:2
timeout 5000 msec, Hop Limit 64
Reply from 2001:470:67:70a:1415:92cc:0:2: bytes=16 time=100ms Hop Limit=59
Reply from 2001:470:67:70a:1415:92cc:0:2: bytes=16 time=93ms Hop Limit=60
Reply from 2001:470:67:70a:1415:92cc:0:2: bytes=16 time=99ms Hop Limit=60
Reply from 2001:470:67:70a:1415:92cc:0:2: bytes=16 time=78ms Hop Limit=60
Reply from 2001:470:67:70a:1415:92cc:0:2: bytes=16 time=74ms Hop Limit=60
Success rate is 100 percent (5/5), round-trip min/avg/max=74/88/100 ms.
# Entry cached for another 53 seconds.