us network and Uuntu 8.10 - is there a better way?

Torfinn Ingolfsen tingox at gmail.com
Mon Nov 24 21:24:00 CET 2008


Hello,

On Mon, Nov 24, 2008 at 9:07 PM, Joerg Lippmann <jl_lists at donalbain.de> wrote:

I have 'auto usb0' first, then the rest of the lines are the same as yours

> 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 &


> After plugging in the NEO, just
>
>        sudo ifup usb0

Hmm, after I did a 'sudo idown usb0' first it works:
tingo at kg-home:~$ sudo ifup usb0
 * Stopping NTP server ntpd
tingo at kg-home:~$    ...done.
 * Starting NTP server ntpd
   ...done.

(the ntpd part looks scary)

Hmm, when I replug my Freerunner, this is what happens:
tingo at kg-home:~$ ifconfig usb0
usb0      Link encap:Ethernet  HWaddr 00:00:22:55:bb:00
          inet6 addr: fe80::200:22ff:fe55:bb00/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:1152 (1.1 KB)

tingo at kg-home:~$ sudo ifup usb0
ifup: interface usb0 already configured
tingo at kg-home:~$ ifconfig usb0
usb0      Link encap:Ethernet  HWaddr 00:00:22:55:bb:00
          inet6 addr: fe80::200:22ff:fe55:bb00/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:1152 (1.1 KB)

Huh? where did that IPv6 address come from?

>
> does the job quite fine. You may have to change /etc/resolv.conf on the NEO
> manually.
>
> When you re-insert the NEO, just issue
>
>        sudo ifdown usb0 && ifup usb0

I still don't know why the Freerunner gets a IPv6 address, but the above works:
tingo at kg-home:~$ sudo ifdown usb0
RTNETLINK answers: No such process
tingo at kg-home:~$ sudo ifup usb0
 * Stopping NTP server ntpd
tingo at kg-home:~$    ...done.
 * Starting NTP server ntpd
   ...done.

tingo at kg-home:~$ ifconfig usb0
usb0      Link encap:Ethernet  HWaddr 00:00:22:55:bb:00
          inet addr:192.168.0.200  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::200:22ff:fe55:bb00/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:5558 (5.5 KB)


> Hope it helps

It did - many thanks!
-- 
Regards,
Torfinn Ingolfsen




More information about the community mailing list