* [gentoo-user] Change NIC ordering
@ 2008-05-11 18:03 Mark Knecht
2008-05-11 18:13 ` Dirk Heinrichs
2008-05-11 18:28 ` Etaoin Shrdlu
0 siblings, 2 replies; 5+ messages in thread
From: Mark Knecht @ 2008-05-11 18:03 UTC (permalink / raw
To: gentoo-user
Hi,
In a machine with two NICs:
1) How do I configure which is considered eth0?
2) After drivers are loaded how do I see what hardware is using which driver?
Thanks,
Mark
--
gentoo-user@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] Change NIC ordering
2008-05-11 18:03 [gentoo-user] Change NIC ordering Mark Knecht
@ 2008-05-11 18:13 ` Dirk Heinrichs
2008-05-11 18:24 ` Mark Knecht
2008-05-11 18:28 ` Etaoin Shrdlu
1 sibling, 1 reply; 5+ messages in thread
From: Dirk Heinrichs @ 2008-05-11 18:13 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 357 bytes --]
Am Sonntag, 11. Mai 2008 schrieb Mark Knecht:
> In a machine with two NICs:
>
> 1) How do I configure which is considered eth0?
Use udev to name them as you like, see
http://reactivated.net/writing_udev_rules.html.
> 2) After drivers are loaded how do I see what hardware is using which
> driver?
Check dmesg output.
HTH...
Dirk
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] Change NIC ordering
2008-05-11 18:13 ` Dirk Heinrichs
@ 2008-05-11 18:24 ` Mark Knecht
0 siblings, 0 replies; 5+ messages in thread
From: Mark Knecht @ 2008-05-11 18:24 UTC (permalink / raw
To: gentoo-user
On Sun, May 11, 2008 at 11:13 AM, Dirk Heinrichs
<dirk.heinrichs@online.de> wrote:
> Am Sonntag, 11. Mai 2008 schrieb Mark Knecht:
>
>
> > In a machine with two NICs:
> >
> > 1) How do I configure which is considered eth0?
>
> Use udev to name them as you like, see
> http://reactivated.net/writing_udev_rules.html.
>
>
> > 2) After drivers are loaded how do I see what hardware is using which
> > driver?
>
> Check dmesg output.
>
> HTH...
>
> Dirk
>
Hi Dirk,
I found the 70-persistant-net.rules file with these contents:
# This file was automatically generated by the /lib/udev/write_net_rules
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.
# PCI device 0x10b7:0x9202 (3c59x)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:11:d8:f4:ce:e3", NAME="eth0"
# PCI device 0x8086:0x1229 (e100)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:90:27:17:91:5d", ATTR{type}=="1", KERNEL=="eth*",
NAME="eth1"
I think instead of writing something new that might fight with this
it's intended that I just change this file. If I turn things around
like this:
# PCI device 0x8086:0x1229 (e100)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:90:27:17:91:5d", NAME="eth0"
# PCI device 0x10b7:0x9202 (3c59x)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:11:d8:f4:ce:e3", ATTR{type}=="1", KERNEL=="eth*",
NAME="eth1"
that I should have a pretty good chance of success.
Off to give it a try.
- Mark
--
gentoo-user@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] Change NIC ordering
2008-05-11 18:03 [gentoo-user] Change NIC ordering Mark Knecht
2008-05-11 18:13 ` Dirk Heinrichs
@ 2008-05-11 18:28 ` Etaoin Shrdlu
2008-05-11 18:40 ` Mark Knecht
1 sibling, 1 reply; 5+ messages in thread
From: Etaoin Shrdlu @ 2008-05-11 18:28 UTC (permalink / raw
To: gentoo-user
On Sunday 11 May 2008, 20:03, Mark Knecht wrote:
> Hi,
> In a machine with two NICs:
>
> 1) How do I configure which is considered eth0?
Probably editing /etc/udev/rules.d/70-persistent-net.rules.
> 2) After drivers are loaded how do I see what hardware is using which
> driver?
The above file should have a comment before each line indicating what
driver the device needs. Apart from that, you can probably peek
into /sys. On my system, there seems to exist a directory named
/sys/class/net/<device>/device/driver/module/drivers/pci\:<module>/, for
instance for eth0 it's
/sys/class/net/eth0/device/driver/module/drivers/pci\:3c59x/
So I see that eth0 is using driver 3c59x. This is a totally homebrew
method, the result of 5-minute search, and most likely better method
exist (which I'd like to know too).
--
gentoo-user@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] Change NIC ordering
2008-05-11 18:28 ` Etaoin Shrdlu
@ 2008-05-11 18:40 ` Mark Knecht
0 siblings, 0 replies; 5+ messages in thread
From: Mark Knecht @ 2008-05-11 18:40 UTC (permalink / raw
To: gentoo-user
On Sun, May 11, 2008 at 11:28 AM, Etaoin Shrdlu
<shrdlu@unlimitedmail.org> wrote:
> On Sunday 11 May 2008, 20:03, Mark Knecht wrote:
> > Hi,
> > In a machine with two NICs:
> >
> > 1) How do I configure which is considered eth0?
>
> Probably editing /etc/udev/rules.d/70-persistent-net.rules.
>
>
> > 2) After drivers are loaded how do I see what hardware is using which
> > driver?
>
> The above file should have a comment before each line indicating what
> driver the device needs. Apart from that, you can probably peek
> into /sys. On my system, there seems to exist a directory named
> /sys/class/net/<device>/device/driver/module/drivers/pci\:<module>/, for
> instance for eth0 it's
>
> /sys/class/net/eth0/device/driver/module/drivers/pci\:3c59x/
>
> So I see that eth0 is using driver 3c59x. This is a totally homebrew
> method, the result of 5-minute search, and most likely better method
> exist (which I'd like to know too).
> --
> gentoo-user@lists.gentoo.org mailing list
>
>
Thanks. As per the note I sent a couple of minutes ago I found the
persistant-net.rules file. I've modified it, rebooted and things are
working as I want them to. eth0 is still IP address 192.168.1.57 but
it's moved to the Intel e100 NIC. Other machine on my network can see
it.
Thanks for the pointer to the /sys/class stuff. I've only looked at
that once trying to understand frame buffer stuff. This was a big
help. With the changes I now see:
/sys/class/net/eth0/device/driver/module/drivers/pci\:e100/
/sys/class/net/eth1/device/driver/module/drivers/pci\:3c59x/
which is what I want for now.
Again, thanks for the great info.
Cheers,
Mark
--
gentoo-user@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-05-11 18:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-11 18:03 [gentoo-user] Change NIC ordering Mark Knecht
2008-05-11 18:13 ` Dirk Heinrichs
2008-05-11 18:24 ` Mark Knecht
2008-05-11 18:28 ` Etaoin Shrdlu
2008-05-11 18:40 ` Mark Knecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox