pyneo dot org - networked neos

· visions of pyneo · endusers how to start · developer information ·


Reliable IP


If you want to reliable connect the neo or even to connect more than one neo at a time and access all seemlessly this desciption is made for you.

The idea is to have a mapping neo => mac-adress => host-network-interface-name => ip-number => name . To acieve this several steps must be taken.

Be aware that you need a pair of ip-numbers per neo if you want to connect more than one. One for the host, one for the neo.

Give the neos macs

Make sure each neo has its own mac for its usb-ether device. This is already the fact but the mac is generated by random for the usb-ether and must be persistet somehow to have the same mac each time you reboot the neo. The gta02 supports that with Qi automatically through the identity partition, the gta01 needs a kernel option which can simply be added to the file

on the neo/sd (if booted from sd via Qi) like:


replace the 00:00... with a valid random mac. just use the mac that is set by random after first boot which is shown with the

ifconfig -a
command on the host.

Map macs to different interface names

In the file

on the host add a line per neo you own like this (again: replace the mac with yours as mentioned above):

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:00:00:00:00:00", NAME="gta01"

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:00:00:00:00:00", NAME="gta02"

Reload that config with

/etc/init.d/udev reload
on the host.

Name you neos

Giving your neo the right hostname is easy, just write the name into the file

. The name will be used after the next reboot.

Name you neos by ip-number

In order to allow names instead of long ips, enhance your

on the host & the neos with two lines per neo like: host01 host02 host03 host04 gta01 gta02 protector ben

Note: I use 201 and above for the noes and 200 and below for the hosts ips.

Note: SSH does reverse lookups of IPs that try to login. This setting will also speedup this

Note: Because we use host-netmasks later this setup works even if your home network is - as long as you do not use hosts with the ip-numbers as used for the neos in that network.

Tell the system how to configure the interfaces

In the file

on the host networking is configured. The following block enables to configure the interface as we want when plugged in:

allow-hotplug gta02
iface gta02 inet static
    address host02
    post-up route add gta02 gta02
    post-up echo 1 > /proc/sys/net/ipv4/ip_forward
    post-up iptables -t nat -A POSTROUTING -j MASQUERADE
    post-down iptables -t nat -D POSTROUTING -j MASQUERADE
    post-down echo 0 > /proc/sys/net/ipv4/ip_forward

Restart networking with

/etc/init.d/networking restart

Tell the neos their IP

If you intend to use more than on neo, each has its own ip number. The default network configuration is to use the .202. The file

on the neo must be changed to reflect the new numbers:

    address gta02

Use the names of the neos you defined in the


If you now plugin your neo, everything should be configured as desired.

Note: There is one probably unwanted effect: if you have ip-forwarding already enabled or have plugged in more than one neo the forwarding is switched off with the first neo that is disconnected. If you don't like that behavior and would prefere to have forwarding kept on even if all neos were removed just dont add the last line of the networking configuration.