SSH Confusion

7150 linux.1 at litenverden.com
Thu Oct 25 03:47:30 CEST 2007


Here are my notes for tonight's work on usb networking. I have not done
exhaustive testing. This may be useful information because it was done
on gutsy.

It seems to function.

-----

Neo-Networking

10-24-2007: Attempt to establish basic network connection to Neo.
Running Ubuntu 7.10 (gutsy)

>From the wiki: http://wiki.openmoko.org/wiki/USB_Networking#Automatic_method

Edit /etc/network/interfaces file ():

auto usb0
iface usb0 inet static
        address 192.168.0.200
        netmask 255.255.255.0
        network 192.168.0.0
        up iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24 &
        up echo 1 > /proc/sys/net/ipv4/ip_forward &
        up iptables -P FORWARD ACCEPT &
        down iptables -D POSTROUTING -t nat -j MASQUERADE -s
192.168.0.0/24 &

Completed as root.

Patch /etc/udev/rules.d/85-ifupdown.rules:

Ubuntu feisty appears to have a bug where ifdown is not run when the
interface is unplugged, meaning this only works once after the system is
booted. One can patch /etc/udev/rules.d/85-ifupdown.rules, editing the
two lines at the end of the file:

SUBSYSTEM=="net", DRIVERS=="?*", GOTO="net_start"
GOTO="net_end"

LABEL="net_start"

# Bring devices up and down only if they're marked auto.
# Use start-stop-daemon so we don't wait on dhcp
ACTION=="add",          RUN+="/sbin/start-stop-daemon --start
--background --pidfile /var/run/network/bogus --startas /sbin/ifup --
--allow auto $env{INTERFACE}"

LABEL="net_end"

ACTION=="remove",       RUN+="/sbin/start-stop-daemon --start
--background --pidfile /var/run/network/bogus --startas /sbin/ifdown --
--allow auto $env{INTERFACE}"

the bug is that the LABEL="net_end" is after the ACTION line in the
distribution.

I checked my gutsy file. It was wrong, so I changed it as root to the
specification for feisty above.

I restarted the computer.

Ping test:

y7150 at Fluffy:~$ ping 192.168.0.200
PING 192.168.0.200 (192.168.0.200) 56(84) bytes of data.
64 bytes from 192.168.0.200: icmp_seq=1 ttl=64 time=0.059 ms
64 bytes from 192.168.0.200: icmp_seq=2 ttl=64 time=0.054 ms
64 bytes from 192.168.0.200: icmp_seq=3 ttl=64 time=0.053 ms

--- 192.168.0.200 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.053/0.055/0.059/0.006 ms
y7150 at Fluffy:~$

Success. More work tomorrow.



More information about the device-owners mailing list