[CALUG] Random Network Interfaces
Rajiv Gunja
opn.src.rocks at gmail.com
Wed Mar 23 14:43:55 EDT 2011
Open BSD does not follow most UNIX convention while scanning for hardware.
It not only scans the bus, but it also looks at the type of hardware and
connection to give it a name/number designation.
Linux on the other hand, more like Solaris, scans the PCI and assigns the
name/number as and when it finds it.
So if you have 8 cards or ports, the first port(according to the kernel) is
always going to be eth0, so even if you plug your network into 8th port, it
wont be called eth0, but eth7. (Of course assuming that all ports have
different mac address, on solaris/sparc, you can assign the same mac address
to all ports on the SAME card.)
If you are in doubt as to what the network name/number is assigned, just
check 'dmesg'. Use lspci to find all your network devices.
@ work, many years ago, when we built RHEL 2 and 3 servers, we always cabled
all the servers(dell) the same way(4 ports of ethernet, of which 2 will be
used). None of them had an issue with different network names. At one point
we built 22 servers in 24 hours.
Summary: What you see on Linux is normal behavior for Linux, HP-UX, AIX,
Irix and Solaris.
-GGR
--
Rajiv G Gunja
Blog: http://ossrocks.blogspot.com
On Wed, Mar 23, 2011 at 12:41, <jecottrell3 at comcast.net> wrote:
> This is totally unrelated, but it makes a good story.
>
> Last year I was building servers in a rack and found out that altho the
> NICs are numbered 0 thru 3 on the chassis, Linux calls NIC 0 "eth2".
>
> The only way i found this out was by ifconfig'ing each interfact up
> individually until one worked. I'm not sure what the rest of the mapping
> are.
>
> The reason for this is most likely that there are actually two different
> type of ethernets, each with two ports, and the devices are probed in a
> differrent order than SUn (it's a SunFire X4200) would do it.
>
> JIM
>
> ----- Original Message -----
> From: "Jim Bauer" <jfbauer at comcast.net>
> To: calug at unknownlamer.org
> Sent: Wednesday, March 23, 2011 6:58:50 AM
> Subject: Re: [CALUG] Random Network Interfaces
>
> On 03/22/2011 11:32 PM, Randal T. Rioux wrote:
> > Greetings.
> >
> > I haven't used Linux as a router/firewall in 15 years. Usually use
> > OpenBSD or dedicated appliances. I wanted to give RHEL6 a shot and
> > experienced some oddities.
> >
> > I've also tested this with Slackware 13.1 for the record.
> >
> > I have 8 NICs on an IBM x345. With OpenBSD, I can reboot and switch
> > cables and networks and the NIC devices are always named the same.
> >
> > Doing the same with RHEL and Slackware keeps
> > incrementing/adding/removing eth's each time (messing up IP assignments
> > and causing general mayhem), i.e. eth0 because eth3, eth5 is gone, etc.
> >
> > Is this a feature? Can somebody explain this to me? My Web search foo
> > must be weak this evening.
> >
>
> This might be the same thing I noticed a while back with ubuntu when I
> replaced some ancient network cards with something more modern and the
> eth numbers all changed (except for the one card I left in place). I
> tracked it to udev. It remembers the MAC addresses and if eth0 had
> 01:02:03:04:05:06 then eth0 will always have that mac address. So it
> you replace that card with another, the new card will get the next
> available ethN. And if you ever put back that old card, it'll reappear
> as eth0. I believe /etc/udev/rules.d/70-persistent-net.rules is where
> that is recorded.
>
>
> _______________________________________________
> CALUG mailing list
> CALUG at unknownlamer.org
> http://lists.unknownlamer.org/listinfo/calug
>
> _______________________________________________
> CALUG mailing list
> CALUG at unknownlamer.org
> http://lists.unknownlamer.org/listinfo/calug
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.unknownlamer.org/pipermail/calug/attachments/20110323/8e2ced19/attachment.htm
More information about the CALUG
mailing list