Mainpage:Gateway

From Zolertia

Jump to: navigation, search

Contents

Zolertia WSN ready Gateway

Product information

Zolertia's Gateway comes with everything you will need to set up your own sensor network, combining the power of PC Engines ALIX boards with our own Z1 mote.

It features 2 available Ethernet ports, WiFI/3G card and 2 USB ports and to further expand the Gateway capabilities.

It is possible to install and run TinyOS and Contiki on the Gateway, compile and program your motes remotely!


Hardware

The Gateway comes with:

  • ALIX 6F2 board (since November 2011).
  • 4GB CF card.
  • Black metallic enclosure.
  • AC/DC 18V charger.
  • Internal Z1 mote.
  • Custom pin header for internal connection of a Z1 mote.
  • Internal RTC battery (since November 2011).
  • Built-in external 5dBi antennae for Z1 mote.
  • A WLAN 802.11a/b/g mini-PCI Module DCMA-81 with a 5dBi antennae.

3G support is available, but no module is included.


Software

We ship the gateway with a pre-installed version of Linux Voyage, with a custom kernel that includes support for the cp210x family of serial/USB converters, however latest versions of Voyage have support for this driver already built in. As August 22 2012 we have tested voyage 0.8.0 release and it comes with the cp210x driver already included, so the support for the Z1 mote is transparent.

Product support and detailed info

For detailed info and available datasheets and schematics please browse:


New release GWZ1 v.2.0

The following resumes the changes from older releases of our custom CF.

********************************************************************************
* Zolertia Gateway
********************************************************************************
* Features and changes:
********************************************************************************
Date	:	April 23, 2013
Autor	:	Antonio Lignan <alinan@zolertia.com>
Version	:	2.1.1
OS vers	:	Voyage 0.8.0
********************************************************************************
* Updated webmin version to 1.620 from 1.590
* Updated TinyOS to point to new github location
* Updated Contiki to point to new github location
 
********************************************************************************
Date	:	September 21, 2012
Autor	:	Antonio Lignan <alinan@zolertia.com>
Version	:	2.1
OS vers	:	Voyage 0.8.0
********************************************************************************
 
* New remote admin interface <http://www.webmin.com>, access at the GW IP:10018
 
* New IPv6 configuration script, now creates a 6in4 ip tunnel using Hurricane
  Electric broker <http://tunnelbroker.net/>
 
* New packages installed/upgraded:
 
python-pip lxml libxml2-dev libxslt1-dev python2.6-dev 
python-libxml2 python-libxslt1 python-eeml zip unzip dropbox-python-sdk-1.5.1
apt-show-versions libapt-pkg-perl libauthen-pam-perl libio-pty-perl
libnet-ssleay-perl webmin radvd
iso-codes lsb-release python-apt python-apt-common python-gnupginterface
python-software-properties unattended-upgrades locales
 
* Available apps/contributions/examples
 
SMTP client using python
/opt/ZGW/examples/email_client
 
Dropbox client using python
/opt/ZGW/examples/dropbox_client
 
COSM feeder example using python
/opt/Cosm/*
 
Added YalerTunnel, allows to tunnel webservices and SSH sesions
/opt/Yaler/*
 
3G client using sakis3G <http://www.sakis3g.org/>
 
Added MQTT mosquitto client
/opt/mosquitto-1.0.2
 
* Repaired locale settings, now en_US.UTF-8
 
********************************************************************************
Date	:	September 4, 2012
Autor	:	Antonio Lignan <alinan@zolertia.com>
Version	:	2.0
OS vers	:	Voyage 0.8.0
********************************************************************************
 
* New packages installed/upgraded:
 
libexpat1 mime-support python-minimal python2.6 python2.6-minimal
python-doc python-tk python-profiler python2.6-doc python2.6-profiler
binutils binfmt-support
libexpat1 mime-support python python-minimal python2.6 python2.6-minimal
autotools-dev binutils cpp cpp-4.4 dpkg-dev file g++ g++-4.4 gcc gcc-4.4
libc-bin libc-dev-bin libc6 libc6-dev libdb4.7 libdpkg-perl libgmp3c2
libgomp1 libmagic1 libmpfr4 libstdc++6-4.4-dev libtimedate-perl
linux-libc-dev m4 make patch perl perl-base perl-modules python-central
autoconf2.13 autoconf-archive gnu-standards autoconf-doc gettext
binutils-doc cpp-doc gcc-4.4-locales debian-keyring g++-multilib
g++-4.4-multilib gcc-4.4-doc libstdc++6-4.4-dbg gcc-multilib manpages-dev
automake1.9 flex bison gdb gcc-doc gcc-4.4-multilib libmudflap0-4.4-dev
libgcc1-dbg libgomp1-dbg libmudflap0-dbg libcloog-ppl0 libppl-c2 libppl7
glibc-doc libstdc++6-4.4-doc libtool-doc automaken gfortran
fortran95-compiler gcj make-doc ed diffutils-doc perl-doc
libterm-readline-gnu-perl libterm-readline-perl-perl python-wxgtk2.8
python-wxgtk2.6 python-wxgtk
fakeroot libalgorithm-merge-perl libc6-i686 libltdl-dev
autoconf automake autotools-dev binutils build-essential cpp cpp-4.4
dpkg-dev file g++ g++-4.4 gcc gcc-4.4 libc-dev-bin libc6-dev libdb4.7
libdpkg-perl libgmp3c2 libgomp1 libmagic1 libmpfr4 libstdc++6-4.4-dev
libtimedate-perl libtool linux-libc-dev m4 make patch perl perl-modules
python-central python-serial
libc-bin libc6 perl-base tzdata, dialog
nesc, tinyos-tools
ca-certificates libapr1 libaprutil1 libcurl3-gnutls liberror-perl
libgcrypt11 libgnutls26 libgpg-error0 libldap-2.4-2 libneon27-gnutls
libsasl2-2 libserf-0-0 libsvn1 libtasn1-3 libxml2 openssl
libsasl2-modules xml-core
ca-certificates git libapr1 libaprutil1 libcurl3-gnutls liberror-perl
libgcrypt11 libgnutls26 libgpg-error0 libldap-2.4-2 libneon27-gnutls
libsasl2-2 libserf-0-0 libsvn1 libtasn1-3 libxml2 openssl subversion
bsdmainutils debhelper gettext groff-base html2text intltool-debian
libcroco3 libelf1 libffi5 libglib2.0-0 liblua5.1-0 libnspr4-0d libnss3-1d
libpcre3 libpython2.6 librpm1 librpmbuild1 librpmio1 libssl-dev libssl0.9.8
libunistring0 man-db po-debconf python-pkg-resources python2.6-dev
python3.1-minimal rpm rpm-common rpm2cpio zlib1g-dev
alien bsdmainutils debhelper gettext groff-base html2text intltool-debian
libaio-dev libaio1 libcroco3 libelf1 libffi5 libglib2.0-0 liblua5.1-0
libnspr4-0d libnss3-1d libpcre3 libpython2.6 libpython3.1 librpm1
librpmbuild1 librpmio1 libssl-dev libunistring0 man-db po-debconf python-dev
python-pkg-resources python-setuptools python2.6-dev python3.1
python3.1-minimal rpm rpm-common rpm2cpio zlib1g-dev
libssl0.9.8
oracle-instantclient11.2-sqlplus-11.2.0.2.0 
oracle-instantclient11.2-basic_11.2.0.2.0-2 cx_Oracle-5.1-11g-py32-1
apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common
libaprutil1-dbd-sqlite3 libaprutil1-ldap
apache2 apache2-utils apache2.2-bin apache2.2-common
libaprutil1-dbd-sqlite3 libaprutil1-ldap
apache2-mpm-prefork dbconfig-common libapache2-mod-php5 libjs-mootools
libltdl7 libmcrypt4 libmysqlclient16 libonig2 libqdbm14 mysql-common
php5-common php5-mcrypt php5-mysql ucf
apache2-mpm-prefork dbconfig-common libapache2-mod-php5 libjs-mootools
libltdl7 libmcrypt4 libmysqlclient16 libonig2 libqdbm14 mysql-common
php5-common php5-mcrypt php5-mysql phpmyadmin ucf
libdbd-mysql-perl libdbi-perl libnet-daemon-perl libplrpc-perl
mysql-client-5.1
libdbd-mysql-perl libdbi-perl libnet-daemon-perl libplrpc-perl mysql-client
mysql-client-5.1
mysql-server-5.1 mysql-server-core-5.1
mysql-server mysql-server-5.1 mysql-server-core-5.1 php5
libgpm2 links
bcrelay parprouted pptpd
dhcp3-server isc-dhcp-server
isc-dhcp-client isc-dhcp-common lynx
tcl tcl8.4 usb-modeswitch usb-modeswitch-data
 
 
* New binaries available (added to PATH):
 
/opt/ZGW/bin
motelist, z1-bsl, serialdump, timestamp
 
* Precompiled toolchains available (TinyProd-based, most of them):
 
/opt/msp430-z1
Based on msp430-gcc-3.2.3
/opt/msp430-44
Based on msp430-gcc-4.4.5
/opt/msp430-46
Based on msp430-gcc-4.6.3
/opt/msp430-47
Based on msp430-gcc-4.7.1
 
* Available WSN operative systems:
 
/opt/TinyOS
TinyOS git mirror
/opt/Contiki
Contiki git repository
/opt/MansOS
MansOS git repository
 
* Available apps/contributions/examples
 
/opt/Yaler
Ready-examples to connect your WSN needs to Internet using Yaler relay
 
Oracle Java JDK jdk1.7.0 
http://www.liberiangeek.net/2012/04/install-oracle-java-jdk-7-in-ubuntu-12-04-precise-pangolin/
 
FTP client using python
/opt/ZGW/examples/ftp_client
 
* OS changes made:
 
/etc/init.d/voyage-utils:
Commented out the remountro command, leaving the CF unprotected for R/W 
crontab:
Network interfaces will be rebooted periodically, to ensure connectivity in case
of topology changes, connection/disconnection, etc.
/etc/hostname -> zolertiaGW
/etc/hosts -> 127.0.0.1 localhost zolertiaGW
Added rtc to /etc/modules, fixed hwclock
Added wifi_client and AP scripts to /opt/ZGW/bin
Configured DHCP server to listen eth0 and wlan0 interfaces by default
Added /var/lib/dhcp to the persistent writeable libraries (RO/RW)
Added DHCP access-based methods to allow fast management (via eth0 and wlan0/br0)


You can download the latest version Here

To install do the following:

Insert a CF with a size > 3.5GB, then unmount (Assuming the CF card is mounted in the below location):
$ sudo umount /media/KINGSTON
 
Locate the CF partition:
$ sudo fdisk -l
 
In my case I got this (omitted the rest of the drives):
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1         969     3901464    c  W95 FAT32 (LBA)
 
Then proceed to copy the image to the disk:
$ sudo dd if=GWZ1_v2.1.1_20130423.img of=/dev/sdb
7372512+0 records in
7372512+0 records out
3774726144 bytes (3.8 GB) copied, 1080.59 s, 3.5 MB/s

Accessing the gateway

By default the devices are shipped with the following user/passwd:

ZolertiaGW login: root
Password: zolertia


Console access

The preferable way to access the gateway is through the console port (serial), configure a client like hyperterminal or putty in the following way:

Baudrate: 38400, parity none, 8 bits, 1 stop bit

You will be prompted for an user and a password, enter as "root" with possible passwords: zolertia or voyage.

You will need a female-female DB9 serial cable as shown below, then typically use the ttyS0 port to access the device. You can also use a serial-to-USB converter, then typically the assigned port will be something like ttyUSB0, you can find out which port was assigned by inspecting the output of "dmesg" in a terminal.



WiFI access

The Gateway is shipped (since September 6 2012) with a secure WiFI network allowing DHCP access to the device, enabling remote access via ssh. Configure your wireless client to allow DHCP. Configuration is as follows:

* ESSID: ZolertiaGW
* Security: WPA/WPA2
* Channel: 6
* WPA passphrase: z0L3rt14
* Gateway Address: 192.168.1.100
* Network address: 192.168.1.0/24

Ethernet access

Through the ETH0 interface you can directly connect to the Gateway, configure your wired client to allow DHCP connections.

The Gateway address is the same as above: 192.168.1.100.


Internet access

The ETH1 interface is configured by default as a DHCP interface listening for uplinks connections, you can directly connect it to your base router/modem. You can later edit this interface to use static settings depending on your setup.

Set up your own IPv6 network

An interesting guide courtesy of The Pervasive Interaction Technology Lab describes how to set up an IPv6 wireless sensor network.

This guide is deprecated as a newer version of BLIP (v2.0) is around, nevertheless we still provide IPv6 support and keep a TinyOS 2.1.1 copy with BLIP. You can browse and download the files Here.


Install Voyage

Linux Voyage comes with 2 useful scripts to format the CF and install Voyage, assume your CF is mounted in /dev/sdb1 (to check this run fdisk -l as root). First unmount your device by running:


Voyage 0.6.0

umount /dev/sdb1 as root.

Then format the CF by executing at the top of voyage directory:

./usr/local/sbin/format-cf.sh /dev/sdb

Then run:

./usr/local/sbin/voyage.update

You will be prompted with the path of the installations files and configuration options, this is what it should look like:

Distribution directory:   /home/a-linan/Desktop/voyage-0.6.0
 
Disk/Flash Device:        /dev/sdb
Installation Partition:   /dev/sdb1
Bootstrap Partition:      /dev/sdb1
 
Will be mounted on:       /mnt/cf
 
Target system profile:    ALIX
Target console:           serial
Target baud rate:         38400
 
Bootstrap installer:      grub
Bootstrap partition:      /dev/sdb1

Afterwards you will need to install support for the CP210x driver if you are using the 0.6.0 voyage distro, newer 0.8.0 comes with cp210x prebuilt so the next step is not necessary. We have a pre-built kernel to do the job, locate the file and run:

dpkg -i /opt/linux-image-2.6.32-voyage_8.0-1_i386.deb

You can download this file from Here


Voyage 0.8.0

Almost same as above, but you will NOT need to install extra packages to have Z1 support (CP210X driver), as this new release already comes with all the required files to work. Format the CF and execute the install script as explained above.

Download this release from Here.

Updates

  • For some reason hwclock is gone:
$ hwclock --debug
hwclock from util-linux-ng 2.17.2
hwclock: Open of /dev/rtc failed, errno=2: No such file or directory.
No usable clock interface found.
Cannot access the Hardware Clock via any known method.
You have to load it yourself by running
$ modprobe rtc

To make the change permanent, edit /etc/modules, add the following line and then run:

# echo "rtc" >> /etc/modules
# update-initramfs -u

Also add:

# echo "clocksource=tsc" >> /boot/grub/menu.lst
# echo "HCTOSYS_DEVICE=rtc" >> /etc/default/rcS


FAQ, Guides and tips

How can I check in which port the internal Z1 mote is connected, or see its serial ID?

By default when shipped the Gateway comes with a motelist-z1 script, just type:

motelist-z1

You should see an output like this:

Reference  Device           Description
---------- ---------------- ---------------------------------------------
0001       /dev/ttyUSB0     Silicon Labs Zolertia Z1

The command motelist-z1 doesn't work

Please check if the motelist-z1 script is installed by issuing:

whereis motelist-z1

If present but still not working, check if usbutils is installed, if not then:

apt-get install usbutils

And run the following command and expect a result like:

lsusb
Bus 002 Device 004: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x Composite Device


I left the internal Z1 unplugged and don't remember how to connect it to the Gateway

See the orientation of the internal USB pin header respect to the Z1 mote in the next image:

I'm getting a public key related issue when trying to do an apt-get update

If you run into errors like regarding public keys, first do:

apt-get install debian-archive-keyring
apt-key update


How do I install NTP client support?

Install:

sudo apt-get install ntpdate
apt-get install tzdata

ntpdate will automatically run when your network interface get activated by system (i.e. while booting Ubuntu Linux sever/desktop system) . Ubuntu Linux stores script at /etc/network/if-up.d/ntpdate location.

Edit (or create if it doesn't exist) the /etc/init.d/ntpdate file. Look for the line NTPSERVERS="my.server.com" and set it to your server.

You can manage how often the time and date gets synchronized with the network by adding a cron task with the following command:

ntpdate -u IP-SERVER


Failed to fetch http://ftp.tw.debian.org/debian/dists/lenny (...)

If you are running Voyage 0.6 dist, you might need to upgrade to have the latest releases, else you can use the deb's in the debian-archive. Edit /etc/apt/sources.list and only enable the following (if not present, add it):

deb http://archive.debian.org/debian-archive/debian lenny main deb http://www.voyage.hk/dists/0.6 ./


I can't edit any file / I'm unable to apt-get update

Our released CF already come with a modify boot, allowing R/W operations on the CF, however a fresh install of Voyage will lock the CF to protect it against write operations, to enable R/W just type:

remountrw

And to lock it again:

remountro


I can ping my default gateway but can't reach Internet

Ask for a lease running (assuming you are connected to the ETH1 interface):

dhclient eth1

How to enable/use the GW leds?

To enable LED control, simply load the corresponding kernel module

modprobe leds-alix2

LED could then be controlled in /sys/class/leds/:#. For example,

To turn on LED on ALIX:
        # echo 1 > /sys/class/leds/alix\:1/brightness
	# echo 1 > /sys/class/leds/alix\:2/brightness
	# echo 1 > /sys/class/leds/alix\:3/brightness
 
To turn off LED:
	# echo 0 > /sys/class/leds/alix\:1/brightness
	# echo 0 > /sys/class/leds/alix\:2/brightness
	# echo 0 > /sys/class/leds/alix\:3/brightness


How to configure wlan0 interface and WPA?

With the newer CF release there will be a handy script installed in /opt/ZGW/bin in which you can configure your wireless network settings, to replicate this in older releases basically there are 3 files you will need to search for:

* /etc/network/interfaces:
 
  # Optional, the script below brings this interface up
 
  auto wlan0
  iface wlan0 inet static
  wpa-conf /etc/wpa-supplicant/wpa-supplicant.conf
 
* /etc/wpa-supplicant/wpa-supplicant.conf:
 
  ctrl_interface=/var/run/wpa_supplicant
  ctrl_interface_group=0
  eapol_version=1
  ap_scan=1
  fast_reauth=1
 
  network={
    priority=1
    ssid="YOUR_NAME" 
    proto=WPA2
    key_mgmt=WPA-PSK
    pairwise=CCMP TKIP
    group=CCMP TKIP
    scan_ssid=1
    psk="YOUR_WPA_PHRASE" 
  }
 
* /opt/ZGW/bin/wifi_client:
  wpa_supplicant -iwlan0 -c /etc/wpa_supplicant/wpa-supplicant.conf &
  sleep 5
  ifconfig wlan0 192.168.X.X netmask 255.255.255.0
  ip route add default via 192.168.X.X
 
  # If the router/gateway has DHCP enabled scratch the last 2 lines and replace with:
  /sbin/dhclient wlan0

Later just run the wifi_client script and that's all. You can add this script to your /etc/rc.local or crontab to configure the WiFI at boot time.


How to configure the board as an AP with DHCP server capabilities

The Gateway already comes configured in this way, but if you are interested in knowing how it was done please read:

First install:
# apt-get install dhcp3-server
 
Edit the following file:
/etc/default/isc-dhcp-server
 
Add here the interface(s) you wish to listen to:
INTERFACES="eth0 br0"
 
Edit /etc/dhcp/dhcpd.conf and replace with:
 
option domain-name "ZolertiaGW.public";
option domain-name-servers ns1.preciseserver.public, ns2.preciseserver.public;
 
default-lease-time 600;
max-lease-time 7200;
 
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.200;
option domain-name-servers 208.67.222.222, 208.67.220.220;
option domain-name "ZolertiaGW.dhcpserver.public";
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;
default-lease-time 600;
max-lease-time 7200;
}
 
Configure eth0 interface at /etc/network/interfaces:
 
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
broadcast 192.168.1.255
 
Then try to:
 
# service ics-dhcp-server
 
If you get an error inspect it running:
 
# tail /var/log/syslog
 
If you get an error related to being unable to open a .leases file, create it:
 
# touch /var/lib/dhcp/dhcpd.leases
 
If you get an error related to being unable to bind to a dhcp address because it is already in use, search for processes or apps listening to ports 67/68.
 
# netstat -a -p
 
Kill the process and retry, then worry about why that process was listening in the first place :)
 
If it was dnsmasq, edit /etc/dnsmasq.conf and locate the following:
 
# If you want dnsmasq to provide only DNS service on an interface,
# configure it as shown above, and then use the following line to
# disable DHCP and TFTP on it.
#no-dhcp-interface=
 
And go through the options there
 
Also, at the end of the file there is a include options that pulls more
config options, inspecting it:
 
# Include another lot of configuration options.
conf-file=/etc/dnsmasq.more.conf
 
And at /etc/dnsmasq.more.conf there were dhcp options, so just comment out the 
include to dnsmasw.more.conf.
 
Then just run:
 
wifi_AP

And that's it!

The contents of this script (/opt/ZGW/bin/):

#!/bin/sh
/sbin/ifconfig eth0 0.0.0.0 up
/usr/sbin/brctl addbr br0
/usr/sbin/brctl addif br0 eth0
/usr/sbin/hostapd -B /etc/hostapd/hostapd.wlan0.conf
/usr/sbin/brctl addif br0 wlan0
/sbin/ifconfig br0 192.168.1.100 netmask 255.255.255.0 up
#/sbin/route add default gw 192.168.1.1
echo 1 > /proc/sys/net/ipv4/ip_forward
/sbin/iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
service isc-dhcp-server restart

And /etc/hostapd/hostapd.wlan0.conf:

interface=wlan0
driver=nl80211
logger_syslog=0
logger_syslog_level=0
logger_stdout=0
logger_stdout_level=0
debug=0
channel=6
hw_mode=b
eapol_key_index_workaround=0
ssid=ZolertiaGW
macaddr_acl=0
auth_algs=3
eap_server=0
wpa=3
wpa_passphrase=z0L3rt14
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
eapol_version=1

You can add the wifi_AP script to /etc/rc.local file to set the AP at boot time.


I just bought a Gateway and I can't see the WiFI network!

Maybe you bought a gateway with an earlier version < 2.1, please verify you have something like this in /etc/rc.local:

# Creates a wireless AP, uses a DHCP server 
#/opt/ZGW/bin/wifi_AP

If you see this, remove the comments ("#")

If you can't see this, you surely would not have this feature installed... see Here


The files I create disappear!

The access to the CF is protected as there's a limit in the number of write operations of a CF before it breaks, so normally you would need to issue "remountrw" to allow write access and afterwards "remountro" to change it back to read-only mode. By default only /var/log and /var/tmp aren't protected, so it is possible that if you write to other directories (like /var/lib/dhcp) or a module tries to write to a protected directory at boot time you will get an error.

To make some other directories writeable, edit /etc/default/voyage-util:

VOYAGE_SYNC_DIRS=""
 
Insert a space separated list of directories between the quotation marks. For example, to add /var/mail and /home/someone, change this line to
VOYAGE_SYNC_DIRS="/var/mail /home/someone"
 
''' DO NOT USE A / AT THE END! '''

The way this works is that /etc/init.d/voyage-sync creates an overlay over the selected directories, using the tmpfs filesystem, which runs in RAM. Any changes made are written to the RAM-based overlay. If the power fails, the changes are lost.


Using IPv6 with Hurricane Electric

Note: tested with latest CF distribution (voyage 0.8.0, v.2.0).

If your uplink only uses IPv4, you will need to tunnel your IPv6 traffic to a compatible relay somewhere. Most tunnels use IPv4 protocol 41 encapsulation (6in4), where the data payload is just the IPv6 packet itself. Not all firewalls and NATs can properly pass protocol, so you will need to check this with your ISP, the fastest way is setting up a DMZ. You will need to provide a public IPv4 address to create the tunnel, if you are behind a router or a firewall check if the public IP you are assigned is static or could be mapped to your local IP statically, else you will need other arrangements outside the scope of this guide.

Once you got this checked, register at Hurricane Electric(we will be using HE for our example), they have a lot of documentation available and certification programs if interested. You will get the following parameters after creating your tunnel (I'm not showing my own):

IPv6 Tunnel Endpoints
Server IPv4 Address:216.66.XXX.XXXX
Server IPv6 Address:2001:470:XXXX:XXXX::1/64
Client IPv4 Address:213.151.XXX.XXX
Client IPv6 Address:2001:470:XXXX:XXXX::2/64
Available DNS Resolvers
Anycasted IPv6 Caching Nameserver:2001:470:20::2
Anycasted IPv4 Caching Nameserver:74.82.42.42
Routed IPv6 Prefixes
Routed /64:2001:470:XXXX:XXXX::/64

Next inside the Gateway edit the following file and uncomment:

vi /etc/sysctl.conf
# net.ipv6.conf.all.forwarding=1

And use the following commands:

root@ZolertiaGW:~# modprobe ipv6
root@ZolertiaGW:~# ip tunnel add he-ipv6 mode sit remote 216.66.XXX.XXX local 192.168.XXX.XXX ttl 255
[   69.939654] IPv6 over IPv4 tunneling driver
root@ZolertiaGW:~# ip link set he-ipv6 up
root@ZolertiaGW:~# ip addr add 2001:470:XXXX:XXXX::2/64 dev he-ipv6
root@ZolertiaGW:~# ip route add ::/0 dev he-ipv6
root@ZolertiaGW:~# ip -f inet6 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
    inet6 fe80::20d:b9ff:fe1c:90c1/64 scope link 
       valid_lft forever preferred_lft forever
6: he-ipv6: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1480 
    inet6 2001:470:XXXX:XXXX::2/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::c0a8:461d/128 scope link 
       valid_lft forever preferred_lft forever

Note that if you are behind a Firewall or a router providing DHCP access, you will need to use the LOCAL IP rather that the public one.

Check if everything is correct:

root@ZolertiaGW:~# ifconfig he-ipv6
he-ipv6   Link encap:IPv6-in-IPv4  
          inet6 addr: fe80::c0a8:461d/128 Scope:Link
          inet6 addr: 2001:470:1f08:4ee::2/64 Scope:Global
          UP POINTOPOINT RUNNING NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

And now ping ipv6.google.com:

root@ZolertiaGW:~# ping6 ipv6.google.com
PING ipv6.google.com(par03s02-in-x12.1e100.net) 56 data bytes
64 bytes from par03s02-in-x12.1e100.net: icmp_seq=1 ttl=56 time=37.4 ms
64 bytes from par03s02-in-x12.1e100.net: icmp_seq=2 ttl=56 time=37.8 ms
64 bytes from par03s02-in-x12.1e100.net: icmp_seq=3 ttl=56 time=37.9 ms
64 bytes from par03s02-in-x12.1e100.net: icmp_seq=4 ttl=56 time=37.3 ms
^C
--- ipv6.google.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3009ms
rtt min/avg/max/mdev = 37.383/37.662/37.964/0.271 ms

You are done.

Personal tools
Navigation
MansOS Support
General guides and apps
Assistance