Bug 131756

Summary: do not use MAC for usbnet based network cards
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Stanislav Brabec <sbrabec>
Component: YaST2Assignee: Michal Zugec <mzugec>
Status: RESOLVED INVALID QA Contact: Klaus Kämpf <kkaempf>
Severity: Normal    
Priority: P5 - None    
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: lshal output

Description Stanislav Brabec 2005-11-01 14:46:50 UTC
It seems that usbnet network cards (USB-to-USB) do not provide real MAC address and returned MAC address differs after replugging (at lease by GL 620USB-A does so). YaST should not save configration files as MAC base, but only as interface based.

How to reproduce:

1. Plug an usbnet cable
2. Configure usb0 by YaST2 network
3. Replug. Previous configuration is not used.

Work-around:
Rename /etc/sysconfig/network/ifcfg-usb-id-* to /etc/sysconfig/network/ifcfg-usb0
Comment 1 Martin Vidner 2005-11-03 15:04:35 UTC
Right.
Going further, I think by default USB2USB should get a link local address and no YaST setup should be necessary.

I'd like to know common usage patterns other than that. What was your setup, Standa?

MAC is not usable and the bus position will probably change often too (the user can plug to a different connector) so if we should make a permanent setup then vendor and product ids seem to be the right choice.
Comment 2 Stanislav Brabec 2005-11-03 16:09:44 UTC
Even if user connects cable to another connector, it will still be usb0, unless user have another USB network card.

I have used static route defined in YaST. Additionally I am using advanced routing table in YaST to stare 192.168.0.* between usb0 and eth0 depending on actual cabling.

There is a chance to auto-configure usb0 as a bridge by default (I guess it is used in Windows by default - USB-to-USB packets are encapsulated ethernet packets).

Third possible way of use is use of DHCP. But it is not clean, which cable end is "client" and which "server" (sometimes it is defined by motherboard soldering). For example GL-620USB-A allows to determinate "left" and "right" end connection (it returns different USB identification).
Comment 3 Christian Zoz 2005-11-04 08:45:23 UTC
Using ifcfg-type-usb should work right now as default config for such devices.
The weak point is that type usb is derived from interface name usb*. It would be
better if we had a better way of getting the type of such interfaces.

We can even go one step further a have a default configuration for all types of
networking interfaces (ifcfg-type-net) with BOOTPROTO=dhcp+autoip.

IIRC one needs a special cable for that. I currently don't have one. Stanislav,
would you please provide:
- hwinfo --netcard
- grep "" /sys/class/net/usb0/*
- ls -l /sys/class/net/usb0
- getcfg usb0
- lshal
- any other information you consider helpful
Or grant me access to a machine with such an interface.

Martin, default config with link local address is a good idea. Nevertheless it
shoud be configurable with YaST. We have to use the interface name as hardware
description. I guess that even vendor/product ids wont help. Therefore we also
cannot make the names of these interfaces persistent. We have to live with the
assumption that most of the users of such interfaces don't have more then one of
these.
Comment 4 Stanislav Brabec 2005-11-06 22:50:27 UTC
his dump was created, when opposite machine was off. AFAIK nothing will change after turning it on.

utx:~ # hwinfo --netcard
13: PCI 06.0: 0200 Ethernet controller
  [Created at pci.277]
  UDI: /org/freedesktop/Hal/devices/pci_10ec_8139
  Unique ID: rBUF.IQxIdIhhuH7
  SysFS ID: /devices/pci0000:00/0000:00:06.0
  SysFS BusID: 0000:00:06.0
  Hardware Class: network
  Model: "Realtek RT8139"
  Vendor: pci 0x10ec "Realtek Semiconductor Co., Ltd."
  Device: pci 0x8139 "RTL-8139/8139C/8139C+"
  SubVendor: pci 0x10ec "Realtek Semiconductor Co., Ltd."
  SubDevice: pci 0x8139 "RT8139"
  Revision: 0x10
  Driver: "8139too"
  Device File: eth0
  I/O Ports: 0xcc00-0xccff (rw)
  Memory Range: 0xdfffef00-0xdfffefff (rw,non-prefetchable)
  Memory Range: 0xdffd0000-0xdffdffff (ro,prefetchable,disabled)
  IRQ: 5 (918179 events)
  HW Address: 00:50:fc:33:ce:ba
  Link detected: yes
  Module Alias: "pci:v000010ECd00008139sv000010ECsd00008139bc02sc00i00"
  Driver Info #0:
    Driver Status: 8139too is active
    Driver Activation Cmd: "modprobe 8139too"
  Driver Info #1:
    Driver Status: 8139cp is not active
    Driver Activation Cmd: "modprobe 8139cp"
  Config Status: cfg=no, avail=yes, need=no, active=unknown

14: PCI 07.0: 0282 WLAN controller
  [Created at pci.277]
  UDI: /org/freedesktop/Hal/devices/pci_1260_3873
  Unique ID: y9sn.1o+tnlD7E2E
  SysFS ID: /devices/pci0000:00/0000:00:07.0
  SysFS BusID: 0000:00:07.0
  Hardware Class: network
  Model: "Intersil Prism 2.5 Wavelan chipset"
  Vendor: pci 0x1260 "Intersil Corporation"
  Device: pci 0x3873 "Prism 2.5 Wavelan chipset"
  SubVendor: pci 0x1260 "Intersil Corporation"
  SubDevice: pci 0x3873
  Revision: 0x01
  Driver: "orinoco_pci"
  Device File: wlan0
  Features: WLAN
  Memory Range: 0xdfdff000-0xdfdfffff (rw,prefetchable)
  IRQ: 11 (60908 events)
  HW Address: 00:60:b3:6b:d3:c5
  Link detected: yes
  WLAN channels: 1 2 3 4 5 6 7 8 9 10 11 12 13
  WLAN frequencies: 2.412 2.417 2.422 2.427 2.432 2.437 2.442 2.447 2.452 2.457 2.462 2.467 2.472
  WLAN bitrates: 1 2 5.5 11
  WLAN encryption modes: WEP40 WEP104
  WLAN authentication modes: open sharedkey
  Module Alias: "pci:v00001260d00003873sv00001260sd00003873bc02sc80i00"
  Driver Info #0:
    Driver Status: orinoco_pci is active
    Driver Activation Cmd: "modprobe orinoco_pci"
  Driver Info #1:
    Driver Status: hostap_pci is not active
    Driver Activation Cmd: "modprobe hostap_pci"
  Driver Info #2:
    Driver Status: prism2_pci is not active
    Driver Activation Cmd: "modprobe prism2_pci"
  Config Status: cfg=no, avail=yes, need=no, active=unknown

37: USB 00.0: 0291 USB Host-to-Host link
  [Created at usb.122]
  UDI: /org/freedesktop/Hal/devices/usb_device_5e3_502_noserial_if0
  Unique ID: hSuP.O_1aoNxqb1B
  Parent ID: pBe4.1IJifGGuXp7
  SysFS ID: /devices/pci0000:00/0000:00:11.3/usb2/2-2/2-2:1.0
  SysFS BusID: 2-2:1.0
  Hardware Class: network
  Model: "Genesys Logic GL620USB GeneLink USB-USB Bridge"
  Hotplug: USB
  Vendor: usb 0x05e3 "Genesys Logic, Inc."
  Device: usb 0x0502 "GL620USB GeneLink USB-USB Bridge"
  Revision: "1.80"
  Driver: "usbnet"
  Device File: usb0
  Speed: 12 Mbps
  HW Address: 56:34:80:52:53:0d
  Link detected: yes
  Module Alias: "usb:v05E3p0502d0180dc00dsc00dp00icFFisc00ip00"
  Driver Info #0:
    Driver Status: usbnet is active
    Driver Activation Cmd: "modprobe usbnet"
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #36 (Hub)
utx:~ # grep "" /sys/class/net/usb0/*
/sys/class/net/usb0/address:56:34:80:52:53:0d
/sys/class/net/usb0/addr_len:6
/sys/class/net/usb0/broadcast:ff:ff:ff:ff:ff:ff
/sys/class/net/usb0/carrier:1
/sys/class/net/usb0/features:0x0
/sys/class/net/usb0/flags:0x1003
/sys/class/net/usb0/ifindex:5
/sys/class/net/usb0/iflink:5
/sys/class/net/usb0/mtu:1500
/sys/class/net/usb0/tx_queue_len:1000
/sys/class/net/usb0/type:1
/sys/class/net/usb0/weight:0
utx:~ # getcfg usb0
HWD_HWDESC=usb0;
HWD_HWDESCTYPE=interface;
HWD_INTERFACE_N=1;
HWD_INTERFACE_0=usb0;
HWD_INTERFACEPATH_0=/sys/class/net/usb0;
HWD_INTERFACETYPE_0=net;
HWD_ID=56:34:80:52:53:0d;
HWD_BUS_N=3;
HWD_BUSNAME_0=pci;
HWD_BUSID_0=0000:00:11.3;
HWD_BUSNAME_1=usb;
HWD_BUSID_1=2-2;
HWD_BUSNAME_2=usb;
HWD_BUSID_2=2-2:1.0;
HWD_DRIVER=usbnet;
HWD_CONFIG_N=1;
HWD_CONFIG_0=usb0;
HWD_DEVICEPATH=/sys/devices/pci0000:00/0000:00:11.3/usb2/2-2/2-2:1.0;
export  HWD_HWDESC HWD_HWDESCTYPE HWD_INTERFACE_N HWD_INTERFACE_0 HWD_INTERFACEPATH_0 HWD_INTERFACETYPE_0 HWD_ID HWD_BUS_N HWD_BUSNAME_0 HWD_BUSID_0 HWD_BUSNAME_1 HWD_BUSID_1 HWD_BUSNAME_2 HWD_BUSID_2 HWD_DRIVER HWD_CONFIG_N HWD_CONFIG_0 HWD_DEVICEPATH;
Comment 5 Stanislav Brabec 2005-11-06 22:51:38 UTC
Created attachment 56564 [details]
lshal output
Comment 6 Martin Vidner 2006-08-28 11:52:29 UTC
Reassigning to the new maintainer of yast2-network.
Comment 7 Michal Zugec 2007-05-28 12:46:27 UTC
for 10.3 (hopefully for next build) configuration names syntax ifcfg-eth0, ifcfg-usb0 will be used by default