Managing interface with random MAC address
I have an embedded device known as a beagle board that draws power from my USB port (shows up as usb0). When it boots, it presents itself as a USB ethernet device. I want to share my connection with the device from network manager. Two problems: The first is that network manager sees an unmanaged device and tries to obtain an IP address, the second, I can't seem to setup an automatic share my connection connection since every time the board boots, it has a different hardware address. Any tips? ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Managing interface with random MAC address
On Thu, 2009-03-05 at 01:25 -0700, Russ Dill wrote: I have an embedded device known as a beagle board that draws power from my USB port (shows up as usb0). When it boots, it presents itself as a USB ethernet device. I want to share my connection with the device from network manager. Two problems: The first is that network manager sees an unmanaged device and tries to obtain an IP address, the second, I can't seem to setup an automatic share my connection connection since every time the board boots, it has a different hardware address. Any tips? What is the USB serial number of the device? The core problem here is that if there's no unique identifier for the device, there's no way to lock a specific connection to that device, and thus any generic Wired connection will be used instead. Run lsusb -v and look for the iSerial field; is that field something other than 0? Do other beagle boards present other serial numbers? Do you want to keep the wired device unmanaged and ignored by NetworkManager? You said sees an unmanaged device and tries to obtain an IP address, but NM should be ignoring unmanaged devices. However, that mechanism depends on HAL UDIs and thus the random MAC address may well be confusing it. Dan ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Managing interface with random MAC address
On Thu, Mar 5, 2009 at 13:33, Dan Williams d...@redhat.com wrote: On Thu, 2009-03-05 at 01:25 -0700, Russ Dill wrote: I have an embedded device known as a beagle board that draws power from my USB port (shows up as usb0). When it boots, it presents itself as a USB ethernet device. I want to share my connection with the device from network manager. Two problems: The first is that network manager sees an unmanaged device and tries to obtain an IP address, the second, I can't seem to setup an automatic share my connection connection since every time the board boots, it has a different hardware address. Any tips? What is the USB serial number of the device? The core problem here is that if there's no unique identifier for the device, there's no way to lock a specific connection to that device, and thus any generic Wired connection will be used instead. Run lsusb -v and look for the iSerial field; is that field something other than 0? Do other beagle boards present other serial numbers? Do you want to keep the wired device unmanaged and ignored by NetworkManager? You said sees an unmanaged device and tries to obtain an IP address, but NM should be ignoring unmanaged devices. However, that mechanism depends on HAL UDIs and thus the random MAC address may well be confusing it. A random MAC address is defined by a bit in the MAC address itself. Maybe these devices should be special handled. At least the MAC should not be stored somewhere on the system. The udev persistent netif name rule generator does this: # do not use locally administered MAC address ENV{MATCHADDR}==?[2367abef]:*, ENV{MATCHADDR}= Kay ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Managing interface with random MAC address
On Thu, 2009-03-05 at 14:53 +0100, Kay Sievers wrote: On Thu, Mar 5, 2009 at 13:33, Dan Williams d...@redhat.com wrote: On Thu, 2009-03-05 at 01:25 -0700, Russ Dill wrote: I have an embedded device known as a beagle board that draws power from my USB port (shows up as usb0). When it boots, it presents itself as a USB ethernet device. I want to share my connection with the device from network manager. Two problems: The first is that network manager sees an unmanaged device and tries to obtain an IP address, the second, I can't seem to setup an automatic share my connection connection since every time the board boots, it has a different hardware address. Any tips? What is the USB serial number of the device? The core problem here is that if there's no unique identifier for the device, there's no way to lock a specific connection to that device, and thus any generic Wired connection will be used instead. Run lsusb -v and look for the iSerial field; is that field something other than 0? Do other beagle boards present other serial numbers? Do you want to keep the wired device unmanaged and ignored by NetworkManager? You said sees an unmanaged device and tries to obtain an IP address, but NM should be ignoring unmanaged devices. However, that mechanism depends on HAL UDIs and thus the random MAC address may well be confusing it. A random MAC address is defined by a bit in the MAC address itself. Maybe these devices should be special handled. At least the MAC should not be stored somewhere on the system. The udev persistent netif name rule generator does this: # do not use locally administered MAC address ENV{MATCHADDR}==?[2367abef]:*, ENV{MATCHADDR}= So if not using a MAC address, how does one uniquely identify the device? Say I want to tie a connection to a specific device; it's certainly not possible with udev interface rename rules unless udev uses some magic UUID I don't know about... If you plug two of these into a system, is it simply up to kernel subsystem probing which of these devices gets eth0 and which gets eth1? Dan ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Managing interface with random MAC address
On Thu, Mar 5, 2009 at 15:48, Dan Williams d...@redhat.com wrote: On Thu, 2009-03-05 at 14:53 +0100, Kay Sievers wrote: On Thu, Mar 5, 2009 at 13:33, Dan Williams d...@redhat.com wrote: On Thu, 2009-03-05 at 01:25 -0700, Russ Dill wrote: I have an embedded device known as a beagle board that draws power from my USB port (shows up as usb0). When it boots, it presents itself as a USB ethernet device. I want to share my connection with the device from network manager. Two problems: The first is that network manager sees an unmanaged device and tries to obtain an IP address, the second, I can't seem to setup an automatic share my connection connection since every time the board boots, it has a different hardware address. Any tips? What is the USB serial number of the device? The core problem here is that if there's no unique identifier for the device, there's no way to lock a specific connection to that device, and thus any generic Wired connection will be used instead. Run lsusb -v and look for the iSerial field; is that field something other than 0? Do other beagle boards present other serial numbers? Do you want to keep the wired device unmanaged and ignored by NetworkManager? You said sees an unmanaged device and tries to obtain an IP address, but NM should be ignoring unmanaged devices. However, that mechanism depends on HAL UDIs and thus the random MAC address may well be confusing it. A random MAC address is defined by a bit in the MAC address itself. Maybe these devices should be special handled. At least the MAC should not be stored somewhere on the system. The udev persistent netif name rule generator does this: # do not use locally administered MAC address ENV{MATCHADDR}==?[2367abef]:*, ENV{MATCHADDR}= So if not using a MAC address, how does one uniquely identify the device? Say I want to tie a connection to a specific device; it's certainly not possible with udev interface rename rules unless udev uses some magic UUID I don't know about... Right, we currently depend on the MAC address, the type (netif type), the dev_id (managed by the driver for multiple instances), and handle only devices attached to a bus, virtual interfaces are ignored. Some subsystems like IBM's S390 use random MAC addresses, but have special udev rules to manage persistent names based on properties of the underlying bus. If you plug two of these into a system, is it simply up to kernel subsystem probing which of these devices gets eth0 and which gets eth1? Yes, devices with random MAC addresses and without specific rules to handle them, get random interface names. There is today no solution to make them work properly with a stored system configuration. People could write custom udev rules to accomplish persistent names, but that does not happen automatically. It's a network device specific problem, because you can only have a single name for a device. Unlike device nodes, where we have a bunch of symlinks to identify a device, and can choose the type of link depending on the problem to solve. For serial devices we have something like: $ tree /dev/serial/ /dev/serial/ |-- by-id | |-- usb-067b_2303-if00-port0 - ../../ttyUSB0 | |-- usb-FTDI_FT232R_USB_UART_A7005uBP-if00-port0 - ../../ttyUSB5 | |-- usb-HUAWEI_Technology_HUAWEI_Mobile-if00-port0 - ../../ttyUSB3 | |-- usb-HUAWEI_Technology_HUAWEI_Mobile-if01-port0 - ../../ttyUSB4 | |-- usb-Palm_Computing__Inc._USB_Serial_Adaptor_00088798-if00-port0 - ../../ttyUSB1 | `-- usb-Palm_Computing__Inc._USB_Serial_Adaptor_00088798-if00-port1 - ../../ttyUSB2 `-- by-path |-- pci-:00:1d.0-usb-0:1:1.0-port0 - ../../ttyUSB1 |-- pci-:00:1d.0-usb-0:1:1.0-port1 - ../../ttyUSB2 |-- pci-:00:1d.7-usb-0:2.2:1.0-port0 - ../../ttyUSB3 |-- pci-:00:1d.7-usb-0:2.2:1.1-port0 - ../../ttyUSB4 |-- pci-:00:1d.7-usb-0:2.3:1.0-port0 - ../../ttyUSB5 `-- pci-:00:1d.7-usb-0:2.4.2:1.0-port0 - ../../ttyUSB0 where we can choose between the by-path which changes with the port the device is plugged in, but handles multiple identical devices, and the by-id which is independent of the port, but can not handle completely identical devices. Both are useful and can not replace the other type. For network interfaces, we have only a single name, and therefore all these problems, which can not be solved properly with the current network interface infrastructure. Kay ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Managing interface with random MAC address
On Thu, Mar 5, 2009 at 5:33 AM, Dan Williams d...@redhat.com wrote: On Thu, 2009-03-05 at 01:25 -0700, Russ Dill wrote: I have an embedded device known as a beagle board that draws power from my USB port (shows up as usb0). When it boots, it presents itself as a USB ethernet device. I want to share my connection with the device from network manager. Two problems: The first is that network manager sees an unmanaged device and tries to obtain an IP address, the second, I can't seem to setup an automatic share my connection connection since every time the board boots, it has a different hardware address. Any tips? What is the USB serial number of the device? The core problem here is that if there's no unique identifier for the device, there's no way to lock a specific connection to that device, and thus any generic Wired connection will be used instead. Run lsusb -v and look for the iSerial field; is that field something other than 0? Do other beagle boards present other serial numbers? The serial number is zero. The unique identifier is that its usb0. Do you want to keep the wired device unmanaged and ignored by NetworkManager? You said sees an unmanaged device and tries to obtain an IP address, but NM should be ignoring unmanaged devices. However, that mechanism depends on HAL UDIs and thus the random MAC address may well be confusing it. I may have got my managed/unmanaged terminology confused. Right now, NetworkManager handles all devices not listed int /etc/network/interfaces. I have two wired devices, one is my permanent eth0. eth0 I want nm to manage. The other is the beagle board. ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Managing interface with random MAC address
On Thu, Mar 5, 2009 at 6:53 AM, Kay Sievers kay.siev...@vrfy.org wrote: On Thu, Mar 5, 2009 at 13:33, Dan Williams d...@redhat.com wrote: On Thu, 2009-03-05 at 01:25 -0700, Russ Dill wrote: I have an embedded device known as a beagle board that draws power from my USB port (shows up as usb0). When it boots, it presents itself as a USB ethernet device. I want to share my connection with the device from network manager. Two problems: The first is that network manager sees an unmanaged device and tries to obtain an IP address, the second, I can't seem to setup an automatic share my connection connection since every time the board boots, it has a different hardware address. Any tips? What is the USB serial number of the device? The core problem here is that if there's no unique identifier for the device, there's no way to lock a specific connection to that device, and thus any generic Wired connection will be used instead. Run lsusb -v and look for the iSerial field; is that field something other than 0? Do other beagle boards present other serial numbers? Do you want to keep the wired device unmanaged and ignored by NetworkManager? You said sees an unmanaged device and tries to obtain an IP address, but NM should be ignoring unmanaged devices. However, that mechanism depends on HAL UDIs and thus the random MAC address may well be confusing it. A random MAC address is defined by a bit in the MAC address itself. Maybe these devices should be special handled. At least the MAC should not be stored somewhere on the system. The udev persistent netif name rule generator does this: # do not use locally administered MAC address ENV{MATCHADDR}==?[2367abef]:*, ENV{MATCHADDR}= Yes, the MAC address always has that bit set and so the udev persistent netif name rule generator doesn't touch it. ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Managing interface with random MAC address
On Thursday 05 March 2009 19:47:28 Russ Dill wrote: On Thu, Mar 5, 2009 at 5:33 AM, Dan Williams d...@redhat.com wrote: On Thu, 2009-03-05 at 01:25 -0700, Russ Dill wrote: I have an embedded device known as a beagle board that draws power from my USB port (shows up as usb0). When it boots, it presents itself as a USB ethernet device. I want to share my connection with the device from network manager. As far as I'm aware it's using ethernet gadget to provide network interface. If that's the case - you can modprobe device with parameters like: modprobe g_ether host_addr=01:23:45:67:89:ab dev_addr=00:11:22:33:44:55:66 (substitute with your desired mac address) if you have it compiled in, you can use add this to your command line: g_ether.host_addr=01:23:45:67:89:ab g_ether.dev_addr=00:11:22:33:44:55:66 That was both ends will always have static IP addresses. You can also add second part to u-boot env. Regards, Rob signature.asc Description: This is a digitally signed message part. ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Managing interface with random MAC address
On Thu, 2009-03-05 at 12:47 -0700, Russ Dill wrote: On Thu, Mar 5, 2009 at 5:33 AM, Dan Williams d...@redhat.com wrote: On Thu, 2009-03-05 at 01:25 -0700, Russ Dill wrote: I have an embedded device known as a beagle board that draws power from my USB port (shows up as usb0). When it boots, it presents itself as a USB ethernet device. I want to share my connection with the device from network manager. Two problems: The first is that network manager sees an unmanaged device and tries to obtain an IP address, the second, I can't seem to setup an automatic share my connection connection since every time the board boots, it has a different hardware address. Any tips? What is the USB serial number of the device? The core problem here is that if there's no unique identifier for the device, there's no way to lock a specific connection to that device, and thus any generic Wired connection will be used instead. Run lsusb -v and look for the iSerial field; is that field something other than 0? Do other beagle boards present other serial numbers? The serial number is zero. The unique identifier is that its usb0. And there's the problem. It won't always be usb0. If you have two, it could be usb1. Thus there isn't any unique identifier. Dan Do you want to keep the wired device unmanaged and ignored by NetworkManager? You said sees an unmanaged device and tries to obtain an IP address, but NM should be ignoring unmanaged devices. However, that mechanism depends on HAL UDIs and thus the random MAC address may well be confusing it. I may have got my managed/unmanaged terminology confused. Right now, NetworkManager handles all devices not listed int /etc/network/interfaces. I have two wired devices, one is my permanent eth0. eth0 I want nm to manage. The other is the beagle board. ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Managing interface with random MAC address
On Thu, Mar 5, 2009 at 2:19 PM, Dan Williams d...@redhat.com wrote: On Thu, 2009-03-05 at 12:47 -0700, Russ Dill wrote: On Thu, Mar 5, 2009 at 5:33 AM, Dan Williams d...@redhat.com wrote: On Thu, 2009-03-05 at 01:25 -0700, Russ Dill wrote: I have an embedded device known as a beagle board that draws power from my USB port (shows up as usb0). When it boots, it presents itself as a USB ethernet device. I want to share my connection with the device from network manager. Two problems: The first is that network manager sees an unmanaged device and tries to obtain an IP address, the second, I can't seem to setup an automatic share my connection connection since every time the board boots, it has a different hardware address. Any tips? What is the USB serial number of the device? The core problem here is that if there's no unique identifier for the device, there's no way to lock a specific connection to that device, and thus any generic Wired connection will be used instead. Run lsusb -v and look for the iSerial field; is that field something other than 0? Do other beagle boards present other serial numbers? The serial number is zero. The unique identifier is that its usb0. And there's the problem. It won't always be usb0. If you have two, it could be usb1. Thus there isn't any unique identifier. In my situation, I don't care. Currently, if I want this to work, I have to change the hardware address in the network manager settings every single time I reboot the board. The limitation of only being able to plug in one at a time seems rather minor to me. Dan Do you want to keep the wired device unmanaged and ignored by NetworkManager? You said sees an unmanaged device and tries to obtain an IP address, but NM should be ignoring unmanaged devices. However, that mechanism depends on HAL UDIs and thus the random MAC address may well be confusing it. I may have got my managed/unmanaged terminology confused. Right now, NetworkManager handles all devices not listed int /etc/network/interfaces. I have two wired devices, one is my permanent eth0. eth0 I want nm to manage. The other is the beagle board. ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Managing interface with random MAC address
On Thu, Mar 5, 2009 at 22:38, Russ Dill russ.d...@gmail.com wrote: On Thu, Mar 5, 2009 at 2:19 PM, Dan Williams d...@redhat.com wrote: On Thu, 2009-03-05 at 12:47 -0700, Russ Dill wrote: On Thu, Mar 5, 2009 at 5:33 AM, Dan Williams d...@redhat.com wrote: On Thu, 2009-03-05 at 01:25 -0700, Russ Dill wrote: I have an embedded device known as a beagle board that draws power from my USB port (shows up as usb0). When it boots, it presents itself as a USB ethernet device. I want to share my connection with the device from network manager. Two problems: The first is that network manager sees an unmanaged device and tries to obtain an IP address, the second, I can't seem to setup an automatic share my connection connection since every time the board boots, it has a different hardware address. Any tips? What is the USB serial number of the device? The core problem here is that if there's no unique identifier for the device, there's no way to lock a specific connection to that device, and thus any generic Wired connection will be used instead. Run lsusb -v and look for the iSerial field; is that field something other than 0? Do other beagle boards present other serial numbers? The serial number is zero. The unique identifier is that its usb0. And there's the problem. It won't always be usb0. If you have two, it could be usb1. Thus there isn't any unique identifier. In my situation, I don't care. Currently, if I want this to work, I have to change the hardware address in the network manager settings every single time I reboot the board. The limitation of only being able to plug in one at a time seems rather minor to me. Do you want to keep the wired device unmanaged and ignored by NetworkManager? You said sees an unmanaged device and tries to obtain an IP address, but NM should be ignoring unmanaged devices. However, that mechanism depends on HAL UDIs and thus the random MAC address may well be confusing it. I may have got my managed/unmanaged terminology confused. Right now, NetworkManager handles all devices not listed int /etc/network/interfaces. I have two wired devices, one is my permanent eth0. eth0 I want nm to manage. The other is the beagle board. Just to throw more stuff into the config matched by MAC address thing, there are systems where several interfaces have the same MAC address, some para-virtualized environments create two identical interfaces, which are only different in the bus they belong to, and stuff like the PlayStation3 creates wired and wireless interfaces with the same MAC address. I've run into all that with the udev persistent net interface rule-generator. :) Kay ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list