Re: 2 NIC's, assigned in wrong order
Jan:
On Mon, Dec 29, 2003 at 12:33:17AM +0100, Jan Minar wrote:
> On Sun, Dec 28, 2003 at 12:56:47PM -0700, Dean Allen Provins wrote:
> > I have two Ethernet cards (NICs) in a PII-300. The first recognized is
> > an NE2000 ISA clone at IRQ10, and the second is a PCI at (shared) IRQ
> > 12.
> >
> > I would like the second (the PCI) to be assigned as ETH0, and the first
> > (ISA) to be ETH1.
>
> I have rather similar problem. And what is the solution when the cards
> are the same type? -- The closest I got is:
>
> nameif (8) - name network interfaces based on MAC addresses
>
> But I couldn't find nameif called from anywhere--so I guess the right
> thing to do would be to call it from /etc/init.d/networking or
> /etc/networking/interfaces.
That seemed like such a good suggestion. I created scripts to assign
the desired names to the desired MAC addresses and placed them in
/etc/network/if-pre-up.d/, and then added invocation in the interfaces
file, but I keep getting the messages (in syslog):
Dec 28 19:11:31 ve6wvc nameif: cannot change name of eth1 to eth0: File exists
Dec 28 19:11:31 ve6wvc nameif: cannot change name of eth0 to eth1: Device or resource busy
A typical script was "eth0.sh":
#!/bin/sh
# Set up eth0 as the 3COM card (system sets it to eth1 at boot)
/sbin/nameif -s eth0 00:50:da:08:f0:4a
exit 0
with invocation in interfaces as:
auto eth0 eth1
iface eth0 inet static
pre-up /etc/network/if-pre-up.d/eth0.sh
address 192.168.0.3
network 192.168.0.0
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
iface eth1 inet static
pre-up /etc/network/if-pre-up.d/eth1.sh
address 192.168.0.30
network 192.168.0.0
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
Unfortunately it failed as noted above, even though I downed the network
and then restarted it. Any ideas or insights?
Merry Christmas to you too.
Dean
> Whoopy Xmas.
> Jan.
>
> > I've fiddled with the ether= append line for the kernel, and also the
> > contents of the interfaces file in /etc/network to no avail.
>
>
>
> --
> Jan Minar Had I any humility, I would be perfect.
--
Dean Provins
50.950333,-114.037916
provinsd@telusplanet.net
KeyID at at pgpkeys.mit.edu:11371: 0x9643AE65
Reply to: