RE: 2.6 kernel network interface assignment order
Thanks for the responses everyone. I have some reading to do. ;) Eric
RE: 2.6 kernel network interface assignment order
Thanks for the responses everyone. I have some reading to do. ;) Eric -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: 2.6 kernel network interface assignment order
On Thu, Jan 29, 2004 at 03:53:57PM -0600, Rich Puhek wrote: > If it's really critical, or happens often, perhaps you'll want to write > a custom init script that looks at the hardware address of the > interface, and configures the appropriate IP settings for the interface. > > Something like the following crude outline: > > devs="eth0 eth1 eth2" [snipped] You don't need to hack around that problem with custom init scripts; Debian's ifupdown supports it nicely. See /usr/share/doc/ifupdown/examples/network-interfaces.gz. HTH, - Keegan
Re: 2.6 kernel network interface assignment order
On Thu, Jan 29, 2004 at 03:53:57PM -0600, Rich Puhek wrote: > If it's really critical, or happens often, perhaps you'll want to write > a custom init script that looks at the hardware address of the > interface, and configures the appropriate IP settings for the interface. > > Something like the following crude outline: > > devs="eth0 eth1 eth2" [snipped] You don't need to hack around that problem with custom init scripts; Debian's ifupdown supports it nicely. See /usr/share/doc/ifupdown/examples/network-interfaces.gz. HTH, - Keegan -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
RE: 2.6 kernel network interface assignment order
Option 1: Use modules instead of kernel built in drivers. You can setup aliases, something like alias eth0 8139too alias eth1 via-rhine in /etc/modutils/aliases Option 2: Make a script that configure each interface using it MAC address, something like auto eth0 eth1 mapping eth0 eth1 script /path/to/get-mac-addr.sh map 00:48:54:65:AA:AA internal map 00:48:54:65:BB:BB external iface internal inet static address 192.168.0. netmask 255.255.255.0 pre-up /path/to/internal-firewall.sh $IFACE iface internet inet dhcp pre-up /path/to/internet-firewall.sh $IFACE in /etc/network/interfaces Matias Lambert OSInet Telecomunicaciones Capital Federal - Buenos Aires Argentina - CA1185ACA http://www.osinet.com.ar > -Mensaje original- > De: Eric Sproul [mailto:[EMAIL PROTECTED] > Enviado el: Jueves, 29 de Enero de 2004 05:47 p.m. > Para: debian-isp@lists.debian.org > Asunto: Re: 2.6 kernel network interface assignment order > > > On Thu, 2004-01-29 at 14:55, Franz Georg Köhler wrote: > > This occasionally happens with new kernel releases. > > I'd like to know why. > > > Swap your configuration... > > Again, I'd like to know *why* it happens rather than blindly changing > configs. What if I had 3 interfaces, what would happen then? I > wouldn't know which would end up where. > > Anyone have any more constructive advice? > Eric > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact > [EMAIL PROTECTED] > > BEGIN:VCARD VERSION:2.1 N:Lambert;Matias;German FN:Matias Lambert ( OSInet ) ORG:OSInet TeleComunicaciones TEL;WORK;VOICE:+54 11 4861 5616 TEL;HOME;VOICE:+54 11 4861 5616 TEL;CELL;VOICE:+54 11 (15) 4429 9469 TEL;WORK;FAX:+54 11 4861 5616 TEL;HOME;FAX:+54 11 4861 5616 ADR;WORK:;;Panamá 933 12 E;Capital Federal;Buenos Aires;C1185ACA;Argentina LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Panam=E1 933 12 E=0D=0ACapital Federal, Buenos Aires C1185ACA=0D=0AArgentina URL;WORK:http://www.osinet.com.ar EMAIL;PREF;INTERNET:[EMAIL PROTECTED] REV:20030313T150013Z END:VCARD
Re: 2.6 kernel network interface assignment order
Take a look at: http://www.xenotime.net/linux/doc/network-interface-names.txt This seems to be what you want. Pete -- http://www.elbnet.com ELB Internet Service, Inc. Web Design, Computer Consulting, Internet Hosting Tommy Moore wrote: > > You won't be able to do this I don't think if the cards you are using > operate off the same module. > > Tommy > > On Thu, Jan 29, 2004 at 10:15:09PM +0100, Franz Georg K??hler wrote: > > On Do, Jan 29, 2004 at 03:47:26 -0500, Eric Sproul <[EMAIL PROTECTED]> > > wrote: > > > On Thu, 2004-01-29 at 14:55, Franz Georg K??hler wrote: > > >> This occasionally happens with new kernel releases. > > > > > > I'd like to know why. > > > > I think this is related to the pci-bus initialization-, ACPI-code, etc. > > Upgrading to a new major release also means experiencing major changes. > > > > I noticed this when I upgraded from 2.2 to 2.4 . > > > > If you're using a modular kernel you should be able to influence the > > device names by loading the modules in a specific order. > > > > > > -- > > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] > > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: 2.6 kernel network interface assignment order
Eric Sproul wrote: On Thu, 2004-01-29 at 14:55, Franz Georg Köhler wrote: This occasionally happens with new kernel releases. I'd like to know why. Swap your configuration... Again, I'd like to know *why* it happens rather than blindly changing configs. What if I had 3 interfaces, what would happen then? I wouldn't know which would end up where. Anyone have any more constructive advice? Eric I don't know of any way to reliably ensure that a given card = eth(n). It's obviously a big deal on any multi-card platform. Another problem is if you have multiple cards (often to ensure connectivity if one goes down) and eth0, for instance dies. Now on reboot, all the cards shift over one number, and nothing works (if they're on seperate subnets. Same problem, but can happen without a kernel change. Yuck. If it's really critical, or happens often, perhaps you'll want to write a custom init script that looks at the hardware address of the interface, and configures the appropriate IP settings for the interface. Something like the following crude outline: devs="eth0 eth1 eth2" setconfig () { case "$1" in 11:11:11:11:11:11) configint $1 ;; 22:22:22:22:22:22) configint $1 ;; # (etc. etc.) esac; } configint () { int=$1 ip=$2 mask=$3 gateway=$4 ifconfig $int netmask $mask $ip #etc... } for dev in $devs; do addr=`ifconfig $dev | grep HWaddr | sed -e's/.*HWaddr //'` setconfig $addr done --Rich
Re: 2.6 kernel network interface assignment order
You won't be able to do this I don't think if the cards you are using operate off the same module. Tommy On Thu, Jan 29, 2004 at 10:15:09PM +0100, Franz Georg K??hler wrote: > On Do, Jan 29, 2004 at 03:47:26 -0500, Eric Sproul <[EMAIL PROTECTED]> wrote: > > On Thu, 2004-01-29 at 14:55, Franz Georg K??hler wrote: > >> This occasionally happens with new kernel releases. > > > > I'd like to know why. > > I think this is related to the pci-bus initialization-, ACPI-code, etc. > Upgrading to a new major release also means experiencing major changes. > > I noticed this when I upgraded from 2.2 to 2.4 . > > If you're using a modular kernel you should be able to influence the > device names by loading the modules in a specific order. > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] >
RE: 2.6 kernel network interface assignment order
Option 1: Use modules instead of kernel built in drivers. You can setup aliases, something like alias eth0 8139too alias eth1 via-rhine in /etc/modutils/aliases Option 2: Make a script that configure each interface using it MAC address, something like auto eth0 eth1 mapping eth0 eth1 script /path/to/get-mac-addr.sh map 00:48:54:65:AA:AA internal map 00:48:54:65:BB:BB external iface internal inet static address 192.168.0. netmask 255.255.255.0 pre-up /path/to/internal-firewall.sh $IFACE iface internet inet dhcp pre-up /path/to/internet-firewall.sh $IFACE in /etc/network/interfaces Matias Lambert OSInet Telecomunicaciones Capital Federal - Buenos Aires Argentina - CA1185ACA http://www.osinet.com.ar > -Mensaje original- > De: Eric Sproul [mailto:[EMAIL PROTECTED] > Enviado el: Jueves, 29 de Enero de 2004 05:47 p.m. > Para: [EMAIL PROTECTED] > Asunto: Re: 2.6 kernel network interface assignment order > > > On Thu, 2004-01-29 at 14:55, Franz Georg Köhler wrote: > > This occasionally happens with new kernel releases. > > I'd like to know why. > > > Swap your configuration... > > Again, I'd like to know *why* it happens rather than blindly changing > configs. What if I had 3 interfaces, what would happen then? I > wouldn't know which would end up where. > > Anyone have any more constructive advice? > Eric > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact > [EMAIL PROTECTED] > > BEGIN:VCARD VERSION:2.1 N:Lambert;Matias;German FN:Matias Lambert ( OSInet ) ORG:OSInet TeleComunicaciones TEL;WORK;VOICE:+54 11 4861 5616 TEL;HOME;VOICE:+54 11 4861 5616 TEL;CELL;VOICE:+54 11 (15) 4429 9469 TEL;WORK;FAX:+54 11 4861 5616 TEL;HOME;FAX:+54 11 4861 5616 ADR;WORK:;;Panamá 933 12 E;Capital Federal;Buenos Aires;C1185ACA;Argentina LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Panam=E1 933 12 E=0D=0ACapital Federal, Buenos Aires C1185ACA=0D=0AArgentina URL;WORK:http://www.osinet.com.ar EMAIL;PREF;INTERNET:[EMAIL PROTECTED] REV:20030313T150013Z END:VCARD
Re: 2.6 kernel network interface assignment order
Take a look at: http://www.xenotime.net/linux/doc/network-interface-names.txt This seems to be what you want. Pete -- http://www.elbnet.com ELB Internet Service, Inc. Web Design, Computer Consulting, Internet Hosting Tommy Moore wrote: > > You won't be able to do this I don't think if the cards you are using > operate off the same module. > > Tommy > > On Thu, Jan 29, 2004 at 10:15:09PM +0100, Franz Georg K??hler wrote: > > On Do, Jan 29, 2004 at 03:47:26 -0500, Eric Sproul <[EMAIL PROTECTED]> wrote: > > > On Thu, 2004-01-29 at 14:55, Franz Georg K??hler wrote: > > >> This occasionally happens with new kernel releases. > > > > > > I'd like to know why. > > > > I think this is related to the pci-bus initialization-, ACPI-code, etc. > > Upgrading to a new major release also means experiencing major changes. > > > > I noticed this when I upgraded from 2.2 to 2.4 . > > > > If you're using a modular kernel you should be able to influence the > > device names by loading the modules in a specific order. > > > > > > -- > > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] > > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: 2.6 kernel network interface assignment order
On Do, Jan 29, 2004 at 03:47:26 -0500, Eric Sproul <[EMAIL PROTECTED]> wrote: > On Thu, 2004-01-29 at 14:55, Franz Georg KÃhler wrote: >> This occasionally happens with new kernel releases. > > I'd like to know why. I think this is related to the pci-bus initialization-, ACPI-code, etc. Upgrading to a new major release also means experiencing major changes. I noticed this when I upgraded from 2.2 to 2.4 . If you're using a modular kernel you should be able to influence the device names by loading the modules in a specific order.
Re: 2.6 kernel network interface assignment order
Eric Sproul wrote: On Thu, 2004-01-29 at 14:55, Franz Georg Köhler wrote: This occasionally happens with new kernel releases. I'd like to know why. Swap your configuration... Again, I'd like to know *why* it happens rather than blindly changing configs. What if I had 3 interfaces, what would happen then? I wouldn't know which would end up where. Anyone have any more constructive advice? Eric I don't know of any way to reliably ensure that a given card = eth(n). It's obviously a big deal on any multi-card platform. Another problem is if you have multiple cards (often to ensure connectivity if one goes down) and eth0, for instance dies. Now on reboot, all the cards shift over one number, and nothing works (if they're on seperate subnets. Same problem, but can happen without a kernel change. Yuck. If it's really critical, or happens often, perhaps you'll want to write a custom init script that looks at the hardware address of the interface, and configures the appropriate IP settings for the interface. Something like the following crude outline: devs="eth0 eth1 eth2" setconfig () { case "$1" in 11:11:11:11:11:11) configint $1 ;; 22:22:22:22:22:22) configint $1 ;; # (etc. etc.) esac; } configint () { int=$1 ip=$2 mask=$3 gateway=$4 ifconfig $int netmask $mask $ip #etc... } for dev in $devs; do addr=`ifconfig $dev | grep HWaddr | sed -e's/.*HWaddr //'` setconfig $addr done --Rich -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: 2.6 kernel network interface assignment order
You won't be able to do this I don't think if the cards you are using operate off the same module. Tommy On Thu, Jan 29, 2004 at 10:15:09PM +0100, Franz Georg K??hler wrote: > On Do, Jan 29, 2004 at 03:47:26 -0500, Eric Sproul <[EMAIL PROTECTED]> wrote: > > On Thu, 2004-01-29 at 14:55, Franz Georg K??hler wrote: > >> This occasionally happens with new kernel releases. > > > > I'd like to know why. > > I think this is related to the pci-bus initialization-, ACPI-code, etc. > Upgrading to a new major release also means experiencing major changes. > > I noticed this when I upgraded from 2.2 to 2.4 . > > If you're using a modular kernel you should be able to influence the > device names by loading the modules in a specific order. > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] > -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: 2.6 kernel network interface assignment order
On Thu, 2004-01-29 at 14:55, Franz Georg Köhler wrote: > This occasionally happens with new kernel releases. I'd like to know why. > Swap your configuration... Again, I'd like to know *why* it happens rather than blindly changing configs. What if I had 3 interfaces, what would happen then? I wouldn't know which would end up where. Anyone have any more constructive advice? Eric
Re: 2.6 kernel network interface assignment order
On Do, Jan 29, 2004 at 03:47:26 -0500, Eric Sproul <[EMAIL PROTECTED]> wrote: > On Thu, 2004-01-29 at 14:55, Franz Georg KÃhler wrote: >> This occasionally happens with new kernel releases. > > I'd like to know why. I think this is related to the pci-bus initialization-, ACPI-code, etc. Upgrading to a new major release also means experiencing major changes. I noticed this when I upgraded from 2.2 to 2.4 . If you're using a modular kernel you should be able to influence the device names by loading the modules in a specific order. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: 2.6 kernel network interface assignment order
On Thu, 2004-01-29 at 14:55, Franz Georg Köhler wrote: > This occasionally happens with new kernel releases. I'd like to know why. > Swap your configuration... Again, I'd like to know *why* it happens rather than blindly changing configs. What if I had 3 interfaces, what would happen then? I wouldn't know which would end up where. Anyone have any more constructive advice? Eric -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: 2.6 kernel network interface assignment order
On Do, Jan 29, 2004 at 02:22:28 -0500, Eric Sproul <[EMAIL PROTECTED]> wrote: > All, > I am having a weird problem and I don't know if it's my config or > something about the 2.6 kernel. In a machine with two integrated NICs > (Penguin Relion 125), the 2.6 kernel reverses the assignment order of > the physical interfaces to eth0 & eth1. Such that my > /etc/network/interfaces configs end up on the wrong device. This occasionally happens with new kernel releases. > Has anyone else seen this, know why it happens? Is there a fix, other > than physically swapping the cables (which isn't always practical when > working on machines in remote datacenters)? Swap your configuration... >
Re: 2.6 kernel network interface assignment order
On Do, Jan 29, 2004 at 02:22:28 -0500, Eric Sproul <[EMAIL PROTECTED]> wrote: > All, > I am having a weird problem and I don't know if it's my config or > something about the 2.6 kernel. In a machine with two integrated NICs > (Penguin Relion 125), the 2.6 kernel reverses the assignment order of > the physical interfaces to eth0 & eth1. Such that my > /etc/network/interfaces configs end up on the wrong device. This occasionally happens with new kernel releases. > Has anyone else seen this, know why it happens? Is there a fix, other > than physically swapping the cables (which isn't always practical when > working on machines in remote datacenters)? Swap your configuration... > -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]