Re: usb0 vs eth0

2009-06-02 Thread ivvmm
Angus Ainslie wrote:
 On June 1, 2009 08:54:51 am ivvmm wrote:
 Read the section for Slackware on that wiki page. This way that will do
 the right routing whatever the interface is called so you will not have
 to think how is it named at this time.

 As for me, I experience another problem: cannot connect to the
 freerunner twice, only once until device is rebooted. How this can be
 solvfed?
 
 On the host side  
 
 ifdown ethx; ifup ethx
 
 Angus

I'm running Slackware and this obviously will not work. What am I
supposed to do?

P.S. sudo /sbin/ip l set eth0 down  sudp /sbin/ip l set eth0 up will
not help



signature.asc
Description: OpenPGP digital signature
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: usb0 vs eth0

2009-06-02 Thread Angus Ainslie
On June 2, 2009 08:37:21 am ivvmm wrote:

 I'm running Slackware and this obviously will not work. What am I
 supposed to do?

 P.S. sudo /sbin/ip l set eth0 down  sudp /sbin/ip l set eth0 up will
 not help

Never used slackware but something like below should work on most unix's

ifconfig ethx down
ifconfig ethx 192.168.0.200 mask 255.255.255.0 up

Angus

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: usb0 vs eth0

2009-06-01 Thread Paul Fertser
Max m...@darim.com writes:
 When I plug FR it appears as eth0 instead of usb0.
 According to http://www.linux-usb.org/usbnet/ I have to set the local
 assignment bit, 0x02 in the first octet, to ensure it still uses a name
 like usb0 not eth0.

It's on purpose and it's damn right. Search the archives. If you want
some kind of interface renaming for whatever reason, write an
appropriate udev rule.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: usb0 vs eth0

2009-06-01 Thread roby
On Mon, Jun 1, 2009 at 8:29 AM, Paul Fertser fercer...@gmail.com wrote:

 Max m...@darim.com writes:
  When I plug FR it appears as eth0 instead of usb0.
 It's on purpose and it's damn right. Search the archives. If you want
 some kind of interface renaming for whatever reason, write an
 appropriate udev rule.


Everybody saying that it's right, but nobody explaining how to use it..
the problem is that it's not so simple to write an udev interface renaming
rule because i don't know which interface udev will assign to the neo.. for
example when i connect it i get eth1, suddenly renamed to eth7 by udev, but
am i sure it will always get eth7?
The page http://wiki.openmoko.org/wiki/USB_Networking explain how to setup
nat and routing, but all the examples use usb0. The problem is that each
different udev installation will assign a possibly different interface name
to the neo, so what should one do? setup nat and routing for all the
interfaces being attached? seems strange.. I just would like to see an
example, because it's not clear to me, and i think for many like me..

-- 
roby
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: usb0 vs eth0

2009-06-01 Thread Paul Fertser
roby hariseldo...@gmail.com writes:
 On Mon, Jun 1, 2009 at 8:29 AM, Paul Fertser fercer...@gmail.com wrote:
 Max m...@darim.com writes:
  When I plug FR it appears as eth0 instead of usb0.
 It's on purpose and it's damn right. Search the archives. If you want
 some kind of interface renaming for whatever reason, write an
 appropriate udev rule.

 Everybody saying that it's right, but nobody explaining how to use
 it..  the problem is that it's not so simple to write an udev
 interface renaming rule because i don't know which interface udev
 will assign to the neo.. for example when i connect it i get eth1,
 suddenly renamed to eth7 by udev, but am i sure it will always get
 eth7?

Yes, you're sure. As long as you don't touch udev. It's the same as
with pci ethernet boards. Once you plugged it in, you'll have a
persintent name for it no matter what unless you erase/alter your udev
configuration.

 The page http://wiki.openmoko.org/wiki/USB_Networking explain how to
 setup nat and routing, but all the examples use usb0. The problem is
 that each different udev installation will assign a possibly
 different interface name to the neo, so what should one do?

So what? You just substitute the interface assigned to freerunner
instead of usb0 in all the examples, i can't see a problem.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: usb0 vs eth0

2009-06-01 Thread Ben Wong
 i don't know which interface udev will assign to the neo.. for
 example when i connect it i get eth1, suddenly renamed to eth7 by udev, but
 am i sure it will always get eth7?

I believe it depends on which distribution you run.  Some
distributions, like Debian, use a persistent-net-generator script
which will always give a particular ethernet device a consistent name
in /dev whenever it is plugged in.  Personally, that drives me batty;
I'm a tidy person and I don't like seeing my first ethernet card be
named eth7 simply because I used several other cards in the distant
past.  But it's good for you in this case, your Freerunner should
always have the same device name.


 The page http://wiki.openmoko.org/wiki/USB_Networking explain how to setup
 nat and routing, but all the examples use usb0. The problem is that each
 different udev installation will assign a possibly different interface name
 to the neo, so what should one do? setup nat and routing for all the
 interfaces being attached? seems strange.. I just would like to see an
 example, because it's not clear to me, and i think for many like me..

Yes, the usb0/eth1/eth7 problem is very annoying from a documentation
point of view.  It would be nice to have a single example on the wiki
which people can use without editing.  I don't have the answer to that
one, but I'd love to see it if someone else does.

--Ben

P.S. If you're using Debian, you can check the file
/etc/udev/rules.d/70-persistent-net.rules to see the mappings between
the MAC address and device name.  I believe OpenMoko devices always
have a MAC address that starts with 00:1F:11

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: usb0 vs eth0

2009-06-01 Thread ivvmm
roby wrote:
 On Mon, Jun 1, 2009 at 8:29 AM, Paul Fertser fercer...@gmail.com
 mailto:fercer...@gmail.com wrote:
 
 Max m...@darim.com mailto:m...@darim.com writes:
  When I plug FR it appears as eth0 instead of usb0.
 It's on purpose and it's damn right. Search the archives. If you want
 some kind of interface renaming for whatever reason, write an
 appropriate udev rule.
 
 
 Everybody saying that it's right, but nobody explaining how to use it..
 the problem is that it's not so simple to write an udev interface
 renaming rule because i don't know which interface udev will assign to
 the neo.. for example when i connect it i get eth1, suddenly renamed to
 eth7 by udev, but am i sure it will always get eth7?
 The page http://wiki.openmoko.org/wiki/USB_Networking explain how to
 setup nat and routing, but all the examples use usb0. The problem is
 that each different udev installation will assign a possibly different
 interface name to the neo, so what should one do? setup nat and routing
 for all the interfaces being attached? seems strange.. I just would like
 to see an example, because it's not clear to me, and i think for many
 like me..
 
 -- 
 roby
 
 

Read the section for Slackware on that wiki page. This way that will do
the right routing whatever the interface is called so you will not have
to think how is it named at this time.

As for me, I experience another problem: cannot connect to the
freerunner twice, only once until device is rebooted. How this can be
solvfed?



signature.asc
Description: OpenPGP digital signature
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: usb0 vs eth0

2009-06-01 Thread Angus Ainslie
On June 1, 2009 08:54:51 am ivvmm wrote:

 Read the section for Slackware on that wiki page. This way that will do
 the right routing whatever the interface is called so you will not have
 to think how is it named at this time.

 As for me, I experience another problem: cannot connect to the
 freerunner twice, only once until device is rebooted. How this can be
 solvfed?

On the host side  

ifdown ethx; ifup ethx

Angus

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: usb0 vs eth0

2009-06-01 Thread David Ford
The udev operation is simple.  The net interface naming is normally 
based on the MAC address and is stored in /etc/udev/rules.d/{something} 
like 70-persistent-net.rules IF your distribution runs the persistence 
script.  Otherwise device naming is based on the order in which devices 
are found by the kernel.  If you load modules by hand, and you alternate 
which you load first, then you would see the associated order change.

Mind you, if everything is done automatically by the kernel, the device 
order can change if the kernel's sequence of loading drivers changes.  
Every once in a great while that happens.

Here's my server's persistent net file:

Colt ~ # cat /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib64/udev/write_net_rules
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.

# PCI device 0x14e4:0x1659 (tg3)
SUBSYSTEM==net, ACTION==add, DRIVERS==?*, 
ATTR{address}==00:1e:c9:2a:1c:64, ATTR{type}==1, KERNEL==eth*, 
NAME=eth0

# PCI device 0x14e4:0x1659 (tg3)
SUBSYSTEM==net, ACTION==add, DRIVERS==?*, 
ATTR{address}==00:1e:c9:2a:1c:65, ATTR{type}==1, KERNEL==eth*, 
NAME=eth1


These are rules and they can be changed.  If you want the 1c:64 device 
to be named funkadiddle instead of eth0, you'd simply edit the file 
and make the change of NAME=funkadiddle

If you alter the MAC address of your device, either by hand or on boot 
such as in Qi etc, then it won't match if you have a rule set for the 
old MAC address and it'll get the next available interface name.

So, simply set up your persistent-net rules file like you want and be 
happy.  Name your interfaces usbcable and wifi and set your 
/etc/network/interfaces file to match if it pleases you so.


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


usb0 vs eth0

2009-05-31 Thread Max
Hello.

When I plug FR it appears as eth0 instead of usb0.
According to http://www.linux-usb.org/usbnet/ I have to set the local
assignment bit, 0x02 in the first octet, to ensure it still uses a name
like usb0 not eth0.

Do you know what does it mean?
I'd like FR to always appear as usb0 so it wouldn't interfere with real
ethernet interfaces.

thanks,
Max. 


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community