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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]