stupid networking question

Fielder George Dowding fgdowding at gmail.com
Wed Jan 14 05:47:05 CET 2009


On Tue, Jan 13, 2009 at 6:01 AM, Peter Nijs <peter at familienijs.be> wrote:
> Sadly, this doesn't work on my suse (/etc/sysconfig/...) based system.
>
> depeje
>
> On Thursday 08 January 2009 12:58:09 Thomas Otterbein wrote:
>> FYI:
>>
>> On my kubuntu (ubuntu with KDE installed by default) using the KDE
>> NetworkManager I followed the advices on
>> http://wiki.openmoko.org/wiki/USB_Networking#Debian.2C_Ubuntu_and_others
>>
>> but insereted "auto usb0" into /etc/network/interfaces as suggested by
>> arne. It looks now like that:
>>
>>   auto lo
>>   iface lo inet loopback
>>
>>   # freerunner
>>   auto usb0
>>   allow-hotplug usb0
>>   iface usb0 inet static
>>           address 192.168.0.200
>>           netmask 255.255.255.192
>>           post-up /etc/network/freerunner start
>>           pre-down /etc/network/freerunner stop
>>
>> After a reboot (NetworkManager did not want to play well i.e. did not adopt
>> to the changes) I get "Device usb0: unmanaged" and everything works as
>> expected: My FR get's configured by /etc/network/freerunner and my
>> (W)LAN-connections a correctly handled by NetworkManager.
>>
>> I guess this solution solves the issue for Ubuntu and all it's derivates
>> too. Probably for all KDE-Installations as it seems that the key is to make
>> the NetworkManager ignore the usb0-Interface.
>>
>> Regards
>>   thomas
>>

Greetings!

I have Debian "lenny" on a 686 and for the record, I do use the KDE
for my window manager. I doubt KDE has any effect on the kernel level
networking. That said, I am open to learning.

I put this stanza in my /etc/network/interfaces file, to wit:

allow-hotplug usb0
iface usb0 inet static
        address 192.168.0.200
        netmask 255.255.255.0

I did not include the "auto usb0" because I don't always have my
FreeRunner (gta02, Date Code: 20070731) connected via the USB cable.
Now, then, when I boot the desktop box, arno-iptables-firewall
complains about usb0 not being there yet. Then, when I do boot my
FreeRunner and connect the USB cable, I find I have an interface with
the appropriate address automatically setup for me. Here is the output
of a series of commands, before and after connecting:

BEFORE:

fgd at irad:~$ ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP qlen 1000
    link/ether 00:11:11:36:c9:b8 brd ff:ff:ff:ff:ff:ff


fgd at irad:~$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP qlen 1000
    link/ether 00:11:11:36:c9:b8 brd ff:ff:ff:ff:ff:ff
    inet 192.168.35.11/24 brd 192.168.35.255 scope global eth0
    inet6 fe80::211:11ff:fe36:c9b8/64 scope link
       valid_lft forever preferred_lft forever

AFTER:

fgd at irad:~$ ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP qlen 1000
    link/ether 00:11:11:36:c9:b8 brd ff:ff:ff:ff:ff:ff
4: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UNKNOWN qlen 1000
    link/ether fa:b5:c2:e2:09:ea brd ff:ff:ff:ff:ff:ff

fgd at irad:~$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP qlen 1000
    link/ether 00:11:11:36:c9:b8 brd ff:ff:ff:ff:ff:ff
    inet 192.168.35.11/24 brd 192.168.35.255 scope global eth0
    inet6 fe80::211:11ff:fe36:c9b8/64 scope link
       valid_lft forever preferred_lft forever
4: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UNKNOWN qlen 1000
    link/ether fa:b5:c2:e2:09:ea brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.200/24 brd 192.168.0.255 scope global usb0
    inet6 fe80::f8b5:c2ff:fee2:9ea/64 scope link
       valid_lft forever preferred_lft forever

I use arno-iptables-firewall to set up my firewall and nat routing
from the usb0 interface through my regular eth0 connection to my local
router and Internet connection. I am delighted that this hotplug
thingy works.

Cheerio!
-- 
Fielder George Dowding, KL7FHX
dba Iceworm Enterprises
Debian GNU/Linux Lenny
User Number 269482




More information about the community mailing list