Date: Mon, 24 Apr 2006 15:50:38 +0200 From: Erik Trulsson <ertr1013@student.uu.se> To: Ferdinand Goldmann <ferdinand.goldmann@jku.at> Cc: freebsd-net@freebsd.org Subject: Re: How to change order of NICs in FreeBSD? Message-ID: <20060424135038.GA74444@owl.midgard.homeip.net> In-Reply-To: <444CD2D0.50800@jku.at> References: <444CD2D0.50800@jku.at>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Apr 24, 2006 at 03:29:52PM +0200, Ferdinand Goldmann wrote: > Hi there, > > this might be an easy one, but I seem to be unable to come up with a google'd > solution. :( > > I have a machine with four network cards using the em driver: > > em0@pci2:12:0: class=0x020000 card=0x10028086 chip=0x10268086 rev=0x04 hdr=0x00 > em1@pci3:11:0: class=0x020000 card=0x10028086 chip=0x10268086 rev=0x04 hdr=0x00 > em2@pci6:7:0: class=0x020000 card=0x016d1028 chip=0x10768086 rev=0x05 hdr=0x00 > em3@pci7:8:0: class=0x020000 card=0x016d1028 chip=0x10768086 rev=0x05 hdr=0x00 > > Two of the cards are onboard, namely em2 and em3, and the other two (em0, em1) > are sitting in expansion slots. I would like to change the order of the cards, > so that the onboard cards are recognized as em0 and em1. > > I tried using the device.hints file, but without much success. Is there any > way how to do this? > I don't think there is any way to change in what order the kernel detects and configures them, but it is possible to rename the interfaces somewhat later in the boot process. You could try using the 'name' option to ifconfig(8). I believe the syntax is: ifconfig [oldifname] name [newifname] This can also be done via /etc/rc.conf. Read the the section on network_interfaces in the manpage for rc.conf(5) for syntax. You will probably have a minor problem if you wish to rename {em2, em3} to {em0, em1} while at the same time renaming the original {em0,em1} to {em2,em3} but that should be easily resolved using temporary names. -- <Insert your favourite quote here.> Erik Trulsson ertr1013@student.uu.se
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060424135038.GA74444>