Debian Developers - Problem: 2.6.x and network (e1000 Intel 82546EB)

This is Interesting: Free IT Magazines  
Home > Archive > Debian Developers > April 2004 > Problem: 2.6.x and network (e1000 Intel 82546EB)





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Problem: 2.6.x and network (e1000 Intel 82546EB)
W. Borgert

2004-04-08, 7:40 am

Hi,

after installing a fresh sarge on a Sun (dual XEON) with two
e1000 Intel 82546EB Gigabit Ethernet Controller everything
worked fine so far with the default 2.4.x kernel. But after
changing to 2.6.x the network just does not work anymore. I
use e1000 as the driver and the official kernel images
(kernel-image-2.6.[34]-1-686-smp. Of course, I looked in
/var/log/* for interesting messages, but got nothing out of
it. rmmod e1000; modprobe e1000; /etc/init.d/networking
restart gave "Ignoring unknown interface eth0=hotplug" and
"Ignoring unknown interface eth1=hotplug". Hotplug?

Any ideas? Thanks in advance!
--
W. Borgert <debacle@debian.org>, http://people.debian.org/~debacle/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
J.D. Hood

2004-04-08, 7:40 am

--- "W. Borgert" <debacle@debian.org> wrote:
> "Ignoring unknown interface eth0=hotplug"


Read hotplug's README.Debian.
--
Thomas Hood


________________________________________
________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
W. Borgert

2004-04-11, 3:13 pm

Quoting "W. Borgert" <debacle@debian.org>:
> after installing a fresh sarge on a Sun (dual XEON) with two
> e1000 Intel 82546EB Gigabit Ethernet Controller everything
> worked fine so far with the default 2.4.x kernel. But after
> changing to 2.6.x the network just does not work anymore. I


OK, a colleague gave the hint to check the order of network
devices. In fact, 2.4 and 2.6 associate eth0 and eth1
differently to the network interface cards! After using the
other interface, everything went fine.

Question: Is there a way to force the system to use a specific
interface card for eth0? Something in /etc/modules or
/etc/network/interfaces?

Thanks in advance!
--
W. Borgert <debacle@debian.org>, http://people.debian.org/~debacle/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Wouter Verhelst

2004-04-11, 3:13 pm

On Thu, Apr 08, 2004 at 05:08:23PM +0200, W. Borgert wrote:
> Question: Is there a way to force the system to use a specific
> interface card for eth0? Something in /etc/modules or
> /etc/network/interfaces?


Forget all about hotplug and put
alias eth0=<driver for eth0>
in your modules.conf or equivalent.

that won't make the system force to do it this way, but it'll help. If
both NICs use the same driver, you should be able to specify which is
which by using the "eth0=" boot parameters, but I don't know its
syntaxis by heart.

--
EARTH
smog | bricks
AIR -- mud -- FIRE
soda water | tequila
WATER
-- with thanks to fortune


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Robert Lemmen

2004-04-11, 3:13 pm

On Thu, Apr 08, 2004 at 05:08:23PM +0200, W. Borgert wrote:
> Question: Is there a way to force the system to use a specific
> interface card for eth0? Something in /etc/modules or
> /etc/network/interfaces?


i have a pre-up in my interfaces:

iface eth1 inet static
address 192.168.0.254
netmask 255.255.255.0
pre-up /usr/local/bin/check-mac-address.sh eth1 00:30:84:76:68:B2

and the script referenced there looks like this:

#!/bin/sh -e

iface="$1"
targetmac="$2"
mac=$(/sbin/ifconfig $iface | sed -n 's/^.*HWaddr \([0-9A-Za-z:]*\).*/\1/p')

if [ "$targetmac" = "$mac" ]; then exit 0; else exit 1; fi

found this somewhere on the net...

cu robert
--
Robert Lemmen http://www.semistable.com

Per Olofsson

2004-04-11, 3:13 pm

On Thu, Apr 08, 2004 at 18:09 +0200, Robert Lemmen wrote:
> On Thu, Apr 08, 2004 at 05:08:23PM +0200, W. Borgert wrote:
>
> i have a pre-up in my interfaces:


Uh, I don't think you're supposed to do it that way. There are two
other methods: mappings and ifrename. See
/usr/share/doc/ifupdown/examples/network-interfaces.gz and the
ifrename package.

--
Pelle


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
J.D. Hood

2004-04-11, 3:13 pm

--- Robert Lemmen <robertle@semistable.com> wrote:
> iface eth1 inet static
> address 192.168.0.254
> netmask 255.255.255.0
> pre-up /usr/local/bin/check-mac-address.sh eth1 00:30:84:76:68:B2
>
> and the script referenced there looks like this:
>
> #!/bin/sh -e
>
> iface="$1"
> targetmac="$2"
> mac=$(/sbin/ifconfig $iface | sed -n 's/^.*HWaddr \([0-9A-Za-z:]*\).*/\1/p')
>
> if [ "$targetmac" = "$mac" ]; then exit 0; else exit 1; fi


This script comes from /usr/share/doc/ifupdown/examples .

What your configuration achieves is to make "ifup eth1" fail if
eth1's MAC isn't 00:30:84:76:68:B2 . I doubt that that is what
you really want.

The fact that the kernel can assign different interface names
to the same adapter at different times is a problem. You
should think of a kernel-assigned interface name as a handle.
Handles are distinct and they give access to adapters but which
adapter a handle refers to can't be read off its face. Instead
you should use the mapping mechanism to assign to the interface
a "logical interface" that is appropriate to the actual adapter.
The mapping script uses the handle to examine the properties of
the underlying adapter (such as its MAC) which the script then
uses to choose an appropriate logical interface.
--
Thomas Hood

________________________________________
________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Don Armstrong

2004-04-11, 3:13 pm

On Thu, 08 Apr 2004, W. Borgert wrote:
> Is there a way to force the system to use a specific interface card
> for eth0? Something in /etc/modules or /etc/network/interfaces?


You can use nameif(8) to change the names of the interfaces and cause
an interface with a specific mac address to be associated with a
specific eth0 or eth1.

You'll have to call nameif before ifupdown gets called though, so add
it to /etc/init.d/networking (or some other script that gets called
before networking.)[1]


Don Armstrong

1: /etc/init.d/networking should probably call nameif -s if
/etc/mactab exists by default.
--
America was far better suited to be the World's Movie Star. The
world's tequila-addled pro-league bowler. The world's acerbic bi-polar
stand-up comedian. Anything but a somber and tedious nation of
socially responsible centurions.

-- Bruce Sterling, _Distraction_ p122

http://www.donarmstrong.com
http://rzlab.ucr.edu


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Milan P. Stanic

2004-04-11, 3:13 pm

On Thu, Apr 08, 2004 at 06:56:00PM +0100, J.D. Hood wrote:[color=darkred]
> --- Robert Lemmen <robertle@semistable.com> wrote:

There is nameif utility in net-tools.

man nameif


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Marco d'Itri

2004-04-11, 3:13 pm

On Apr 08, "W. Borgert" <debacle@debian.org> wrote:

> Question: Is there a way to force the system to use a specific
> interface card for eth0? Something in /etc/modules or
> /etc/network/interfaces?

udev will let you rename easily the network devices.

--
ciao, |
Marco | [5623 seDuYuITWJUxo]


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Bernd Eckenfels

2004-04-11, 3:13 pm

On Thu, Apr 08, 2004 at 05:08:23PM +0200, W. Borgert wrote:
> Question: Is there a way to force the system to use a specific
> interface card for eth0? Something in /etc/modules or
> /etc/network/interfaces?


yes you can use nameif from net-tools, but it does not yet provide a ready
startup script. It can rename the interfaces based on their mac address.
Normally you rename them to something more verbose than etxX like "lan0" or
"dmz0" or something like that.

Greetings
Bernd
--
(OO) -- Bernd_Eckenfels@Mörscher_Strasse_8.76185Karlsruhe.de --
( .. ) ecki@{inka.de,linux.de,debian.org} http://www.eckes.org/
o--o 1024D/E383CD7E eckes@IRCNet v:+497211603874 f:+497211603875
(O____O) When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl!


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Bernd Eckenfels

2004-04-11, 3:13 pm

On Thu, Apr 08, 2004 at 11:48:23AM -0700, Don Armstrong wrote:
> 1: /etc/init.d/networking should probably call nameif -s if
> /etc/mactab exists by default.


yes, see
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=203718

problem is that nameif is provided by net-tools and /etc/init.d/networking
is in netbase, but I try to coordinate this.

Greetings
Bernd
--
(OO) -- Bernd_Eckenfels@Mörscher_Strasse_8.76185Karlsruhe.de --
( .. ) ecki@{inka.de,linux.de,debian.org} http://www.eckes.org/
o--o 1024D/E383CD7E eckes@IRCNet v:+497211603874 f:+497211603875
(O____O) When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl!


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Don Armstrong

2004-04-11, 3:13 pm


On Thu, 08 Apr 2004, Bernd Eckenfels wrote:
> yes, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=203718
>
> problem is that nameif is provided by net-tools and
> /etc/init.d/networking is in netbase, but I try to coordinate this.


Hrm. Is there any particular reason why netbase can't suggest or
recommend net-tools and just call nameif if it is appropriate?

While I understand some of the problems of one tool calling a program
packaged in another tool in its initscript, it seems kind of pointless
to have a separate init script just to handle this relatively optional
behavior, when it can so easily be handled in the least astonishing[1]
init script, /etc/init.d/networking.

Marco: As you reassigned this bug, any specific problems with calling
it from /etc/init.d/networking beyond the fact that nameif exists
elsewhere?


Don Armstrong

1: At least, I think it's the least astonishing...
--
She was alot like starbucks.
IE, generic and expensive.
-- hugh macleod http://www.gapingvoid.com/batch3.htm

http://www.donarmstrong.com
http://rzlab.ucr.edu


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Junichi Uekawa

2004-04-11, 3:14 pm

> Uh, I don't think you're supposed to do it that way. There are two
> other methods: mappings and ifrename. See
> /usr/share/doc/ifupdown/examples/network-interfaces.gz and the
> ifrename package.



Hmm...

'nameif' is in net-tools package.


regards,
junichi


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Anthony Towns

2004-04-11, 3:14 pm

On Thu, Apr 08, 2004 at 11:15:13PM +0200, Bernd Eckenfels wrote:
> On Thu, Apr 08, 2004 at 11:48:23AM -0700, Don Armstrong wrote:
> yes, see
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=203718
> problem is that nameif is provided by net-tools and /etc/init.d/networking
> is in netbase, but I try to coordinate this.


Hrm. Putting:

#!/bin/sh

if [ -e /etc/mactab -a "$MODE" = "start" ]; then
X=$(grep "^[[:space:]]*${IFACE}[[:space:]]" | head -n1)
if [ "$X" != "" ]; then
nameif -s $X
fi
fi

in /etc/network/if-pre-up.d/00nameif should do what you want. If nameif's
syntax was changed so it'd lookup the macaddress for a given interface itself,
that'd simplify to:

#!/bin/sh
if [ -e /etc/mactab -a "$MODE" = "start" ]; then
nameif -sn "$IFACE"
fi

Alternatively you could do:

iface ext0 inet static
...
name-by-mac 11:22:33:44:55:66

and have

#!/bin/sh
if [ "$IF_NAME_BY_MAC" != "" ]; then
nameif -s "$IFACE" "$IF_NAME_BY_MAC"
fi

in /etc/network/if-pre-up.d/00nameif (and have the configuration all be in
/etc/network/interfaces, rather than some of it be in /etc/mactab).

Cheers,
aj

--
Anthony Towns <aj@humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. GPG signed mail preferred.

Protect Open Source in Australia from over-reaching changes to IP law
http://www.petitiononline.com/auftaip/ & http://www.linux.org.au/fta/

Per Olofsson

2004-04-11, 3:14 pm

On Fri, Apr 09, 2004 at 09:12 +0900, Junichi Uekawa wrote:
>
>
> Hmm...
>
> 'nameif' is in net-tools package.


Yeah, nameif and ifrename are different programs. I mentioned ifrename
because I've seen it in /etc/hotplug/net.agent.

--
Pelle


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
W. Borgert

2004-04-11, 3:14 pm

Quoting Bernd Eckenfels <lists@lina.inka.de>:
> On Thu, Apr 08, 2004 at 05:08:23PM +0200, W. Borgert wrote:
>
> yes you can use nameif from net-tools, but it does not yet provide a ready
> startup script. It can rename the interfaces based on their mac address.
> Normally you rename them to something more verbose than etxX like "lan0" or
> "dmz0" or something like that.


Thanks a lot, I will try that. It would be cool to have the 'nameif'
functionality integrated into ifup and /etc/network/interfaces.
Maybe something like:

nameif <class> <hwaddress, depending on class> <name>

E.g.

nameif ether 00:11:22:33:44:55 dmz0

I don't know, how this would behave if one changes the hwaddress in a
later section :-)

Cheers, WB


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Robert Lemmen

2004-04-11, 3:14 pm

On Thu, Apr 08, 2004 at 06:56:00PM +0100, J.D. Hood wrote:
> What your configuration achieves is to make "ifup eth1" fail if
> eth1's MAC isn't 00:30:84:76:68:B2 . I doubt that that is what
> you really want.
>
> The fact that the kernel can assign different interface names
> to the same adapter at different times is a problem. You
> should think of a kernel-assigned interface name as a handle.
> Handles are distinct and they give access to adapters but which
> adapter a handle refers to can't be read off its face. Instead
> you should use the mapping mechanism to assign to the interface
> a "logical interface" that is appropriate to the actual adapter.
> The mapping script uses the handle to examine the properties of
> the underlying adapter (such as its MAC) which the script then
> uses to choose an appropriate logical interface.


right, that would be better. but how would i do that?

cu robert

--
Robert Lemmen http://www.semistable.com

Marco d'Itri

2004-04-11, 3:14 pm

On Apr 09, "W. Borgert" <debacle@debian.org> wrote:

> Thanks a lot, I will try that. It would be cool to have the 'nameif'
> functionality integrated into ifup and /etc/network/interfaces.
> Maybe something like:
>
> nameif <class> <hwaddress, depending on class> <name>
>
> E.g.
>
> nameif ether 00:11:22:33:44:55 dmz0

udev udev udev udev

--
ciao, |
Marco | [5642 deerPFkNyIrRI]


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
J.D. Hood

2004-04-11, 3:14 pm

AJT wrote:
> Putting [stuff] in /etc/network/if-pre-up.d/00nameif should do what you want.


I don't see how that could work. 00nameif would rename the interface
while ifup was trying to bring it up under the old name. Or am I
missing something?

--
Thomas Hood

________________________________________
________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com