LeapFrog Pollux Platform: Internet Access

From eLinux.org
Revision as of 15:44, 8 July 2011 by Jrspruitt (Talk | contribs)

Jump to: navigation, search


There are two methods of accessing the internet from your LeapFrog Pollux Platform device. While both require hooking up to a host PC, you can either using routing, or bridging to make the connection. Either way nets you the same goal. Some differences are Bridging deals with Layer 2 of the OSI model and and allow DHCP broadcasts, while Routing involves Layer 3.


For the Didj, it requires you Enable Networking

Configuring the Host

In this example, we assume that the host has an ethernet connection on eth0. To check your specific device, run.

On Host


You should see eth[X] and lo, X is the number of your ethernet interface.

As for the IP addresses used, you could use any reasonable ones you want, for this example we'll use.

For this example we establish the following assumptions:

The gateway between the local network and the Internet is

The host is connected to the gateway as (assigned by DHCP on eth0)

The host is connected to the Didj as (assigned statically to usb0 on host)

The Didj is connected to the host as (assigned statically to usb0 on Didj)

Configure the host machine's /etc/network/interfaces file as follows:

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto usb0
iface usb0 inet static
       up route add -net netmask dev usb0
       up echo 1 > /proc/sys/net/ipv4/ip_forward
       up iptables -P FORWARD ACCEPT
       up iptables -A POSTROUTING -t nat -j MASQUERADE -s
       down route del -net netmask
       down echo 0 > /proc/sys/net/ipv4/ip_forward
       down iptables -t nat -F POSTROUTING

To apply these new settings:

On the Host:

sudo /etc/init.d/networking restart

(of course, rebooting the host will also work)

Configuring the Didj

If you are using a standard Didj configuration and you have not yet done so, rmmod the g_file_storage kernel module and insmod the g_ether/ko module. (see http://elinux.org/Didj_Networking_HOWTO#Installing_g_ether.ko)

With the USB cable connected to your host, configure an IP address on a different subnet from the rest of your LAN

On the Didj:

ifconfig usb0 netmask

Next, add a route from your Didj to the host (making it the gateway) using the ip address of the host's usb0 device.

On the Didj:

route add default gw usb0

Finally, add nameservers to your Didj's /etc/resolv.conf file (you can add the lines from this example which uses the OpenDNS servers)


At this point, your Didj is connected to the outside world - and a ping or a wget to yahoo or google should work.


Routing packets from the gateway to the Didj.





Thanks to losinggeneration for useful input on this!