Re: 2 NIC's, assigned in wrong order

From: Dean Allen Provins (provinsd_at_telusplanet.net)
Date: 12/29/03

  • Next message: Roman Joost: "Re: latex & prosper"
    Date: Sun, 28 Dec 2003 19:22:04 -0700
    To: Jan Minar <Jan.Minar@seznam.cz>, debian-user@lists.debian.org
    
    

    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
    -- 
    To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Roman Joost: "Re: latex & prosper"

    Relevant Pages

    • Re: Help request: network connectivity
      ... > Jeff Liebermann wrote: ... even makes a suggestion about start scripts or config files so people will ... The start scripts obviously need to change. ... The config files look good to me. ...
      (comp.unix.sco.misc)
    • Re: "unexpected newline or end of string" in XP awk bat script
      ... Your suggestion ... In batch files, % is a special character - one level is removed at ... >tools like sed, awk, sort, and diff inside a windows script. ... >possible to write scripts that simply call installed .exe's including ...
      (comp.lang.awk)
    • Re: EXAMPLE -- Re: Strange issue with `CHOMP not working...
      ... Computers are not random. ... Then, obviously, there is nothing wrong with the scripts you wrote, and ... I asked for suggestions, and received one good suggestion to check the ... I then reviewed the module and found a bug (not certainly related to ...
      (comp.lang.perl.misc)
    • Re: "unexpected newline or end of string" in XP awk bat script
      ... Your suggestion ... I am finding it very challenging to make .bat scripts that combine ... tools like sed, awk, sort, and diff inside a windows script. ... the unix tools. ...
      (comp.lang.awk)
    • Re: 2 NICs, assigned in wrong order
      ... > the desired names to the desired MAC addresses and placed them in ... # nameif eth0 ... # nameif eth1 <HWADDR1> ... in both the scripts, _before_ the real naming. ...
      (Debian-User)