Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
What determines the name of an ethernet interface like eth0? Is eth0 always linked to the first card in the server? Or is it the MAC address in the ifcfg-eth0 file that determines position?
For instance, say there are two cards in a server. The MAC address of the left (first) card is A, the MAC address of the right (second) card is B. If I create an ifcfg-eth0 that contains HWADDR=B does that make the second card eth0?
The MAC address is the key. You can logically "move" NICs by switching MAC addresses.
You want to be sure that you only have a given MAC in one config file at a time. Be sure not to make copies like "ifcfg-eth0.bak" or "ifcfg-eth0.20120309" as any file starting with ifcfg will be read during network start/stop (including reboots) and can cause issues if the same MAC is found in more than one. To save copies you can put them in /root or prepend the backup name (e.g. bak.ifcfg-eth0 or 20120309.ifcfg-eth0).
What about bonding? When I say bonding, with eth0 and eth1 as an example, most howtos will not include MAC addresses. Example from linux-corner.info below. (BTW I am running a Oracle Enterprise Linux 5 4 on HP blade ProLiant BL460c G6). My question is: How does bonding know the MAC address of the eth cards?
There should be a "HWADDR=" for MAC in each of the slave interface ifcfg files (e.g. ifcfg-eth1, ifcfg-eth2) that should be different. It should NOT be in the bond ifcfg file (e.g. ifcfg-bond0).
Typically the bond when seen in ifconfig will show the MAC address of the first slave interface. Depending on bonding mode you might actually see the same MAC on slaves in ifconfig even though they are actually different in the ifcfg files. Actually that is what I was used to on RHEL5 with bonding mode 0 using two NICs. Recently I realized a RHEL6 server using bonding mode 6 with three NICs shows the MAC addresses all different. But it still shows bond0 with same MAC as first NIC slave.
It's interesting that with my company's servers, a MAC is placed in one of two slave ifcfg files and the bond seems to work. I was told that the Oracle howto on bonding did not work and the engineer who configured this used a Red Hat tutorial. No matter, thanks for the input. @catkin, there is no persistent.net.rules on OEL 5 4; that must be a slackware attribute. It is present on Centos.