[xubuntu-users] How to force network interface assignment

John Shane jslists at mtwafrica.org
Tue Feb 13 06:02:27 UTC 2007

Thanks Josh, I found serveral good URL's for instructions how to
write the needed udev rules.  Two helpful ones were:


For anyone else who might need it this is what I did.  After using
udevinfo to get some details (see the URLs above)  I created a file
named 11-local.rules in /etc/udev/rules.d/

In it I put the following two lines (a bit of overkill since it
would be enough to force one of the interfaces)

KERNEL=="eth*",SYSFS{address}=="address for device",NAME="eth1"
KERNEL=="eth*",SYSFS{address}=="address for device",NAME="eth0"

where "address for device" is the actual mac address (with quotes)

The other thing I had to do was go back to /etc/network/interfaces
and edit that file to reflect eth1 as the wireless interface since
during installation XU saw it as eth0.  My new "interfaces" file now
looks like this:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo eth1
iface lo inet loopback

# The primary network interface

iface eth1 inet dhcp
# wireless-* options are implemented by the wireless-tools package 
	wireless-essid xxxx
        wireless-mode managed
        wireless-key1 xxxxxxxxxxxx

iface eth0 inet dhcp


"man 5 interfaces" helped me clean up the file.

Now , gkrellm and the Xfce4 panel plugins work consistently and
things are back on track.  Thanks again for the pointer.  John

On Mon, 12 Feb 2007 18:44:00 -0700
"Joshua Gardner" <mellowcellofellow at gmail.com> wrote:

> Not positive what the rule would be, but the place I'd try would be
> /etc/udev/rules.d, which governs uDev, the device files system
> (/dev) manager.
> So, now that you've a tip, you can google that.
> -Josh
> On 2/12/07, John Shane <jslists at mtwafrica.org> wrote:
> >
> > I just installed XU Edgy on my ThinkPad T23; a clean install
> > instead of trying to upgrade the existing XU Dapper.  Gave me a
> > chance to do several things I've wanted to do, like tweak
> > partitions and so on, but I have to say that XU just keeps
> > growing from strength to strength.  XU Edgy is great stuff.
> >
> > Anyway, as always, there are some issues to sort out and one of
> > them is how to force XU to assign the wireless card to eth1
> > instead of sometimes assigning it to eth0.  So far I haven't
> > found anything through googling, at least not that answers this
> > specific issue. I've tried to edit /etc/network/interfaces but
> > that doesn't govern which interface is assigned to which piece of
> > hardware.  I've looked in the udev rules but if the answer is
> > there I haven't found it. If possible I'd like eth1 to always be
> > the wireless card and eth0 to always be the built in NIC.  Can
> > anyone point me to an explanation of how to do this?  Many
> > thanks.  John
> >

More information about the xubuntu-users mailing list