Michael C. Toren on 8 Sep 2006 18:27:33 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] iface detection differences between 2.4 & 2.6 kernels?


On Fri, Sep 08, 2006 at 01:50:17PM -0400, W. Chris Shank wrote:
> I just had a weird problem. I have a system with 2 ethernet cards (one
> intel e1000 on-board) and one realtek PCI running debian. If I boot the
> 2.4 kernel eth0 is the on-board intel e1000 and the realtek is eth1. If
> I boot the 2.6 kernel eth0 is the realtek and eth1 is the intel. 
> 
> Why would this happen? Is there a way to insure that a specific adapter
> comes up with a specified designation? this could be a real problem for
> a system with multiple cards with different networks. 

You can try to solve this problem using the eth= kernel boot parameter,
but I haven't had much luck with this in the past.  An alternative is to
configure your /etc/network/interfaces file to detect which interface
is which based on the MAC address of the cards in question.  For Debian
stable, see /usr/share/doc/ifupdown/examples/network-interfaces.gz,
around line 100:

	# Two ethernet interfaces, one connected to a trusted LAN, the
	# other to the untrusted Internet, identified by MAC address
	# rather than interface name:

	auto eth0 eth1
	mapping eth0 eth1
	    script /path/to/get-mac-address.sh
	    map 11:22:33:44:55:66 lan
	    map AA:BB:CC:DD:EE:FF internet
	iface lan inet static
	    address 192.168.42.1
	    netmask 255.255.255.0
	    pre-up /usr/local/sbin/enable-masq $IFACE
	iface internet inet dhcp
	    pre-up /usr/local/sbin/firewall $IFACE

The get-mac-address.sh script can be found at
/usr/share/doc/ifupdown/examples/get-mac-address.sh

HTH,
-mct
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug