Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When setting up servers, I have to bond our network interfaces. We use SuSE Enterprise, and since it sucks at bonding with Yast I just do it manually. This requires that I know which hardware address goes to which nic (which we generally have at least eth0-5). I can do an lspci | grep Ethernet and come up with a list of addresses and which NIC is detected... but when all of the cards are the same model it makes it kind of hard. I have to usually enslave the wrong interfaces at least once before I can figure out which NIC goes to which address.
My question is this: is there a good way to know which pci address goes to which nic specifically without trial and error? I can run an lspci | grep Ethernet and get this:
@TBC Cosmo:
Thanks! I'll check that in the morning. I saw that directory, but I never took a look at the hwup script in it.
@evilted:
That still won't tell me which hardware address is assigned to which NIC... that will just tell me which interface is assigned to which NIC. I have to do that regardless to find out which interface is which.
actually the output of ifconfig will tell you the mac of the interface...
Code:
ifconfig
eth1 Link encap:Ethernet HWaddr 01:02:03:04:05:06
i dont have a command hwup!
Code:
hwup
-bash: hwup: command not found
I have setup different forms of bonding, and for me all i am interested in is ethx and the port on the back of the machine... since i assign ethx to a mac, and not the name of the network card..
Code:
ifconfig eth0 hw ether 01:02:03:04:05:06
Last edited by evilted; 08-26-2009 at 08:00 PM.
Reason: add
What method are you using for bonding? When I bond, I'm looking for the actual pci hardware address, not the mac address. That is why a simple ifconfig wouldn't do the trick for me.
I'm looking at the 00:14:00.1 address. I would be happy to look into other bonding methods if it would simplify the configuration to just needing which ethX it is...
I've seen that before, but that requires that you apply some kind of network settings to each interface in yast so that it will create the ifcfg-eth-id-mac files. Otherwise none of those files exist. I wonder where yast gets its information about which mac goes to which hw address and which of those goes to which ethX.
What method are you using for bonding? When I bond, I'm looking for the actual pci hardware address, not the mac address. That is why a simple ifconfig wouldn't do the trick for me.
I'm looking at the 00:14:00.1 address. I would be happy to look into other bonding methods if it would simplify the configuration to just needing which ethX it is...
its pretty simple, just add the bondx interface to modprobe.conf
alias bond0 bonding
options bond0 mode=balance-alb miimon=100
then in your ifcfg-ethx scripts put a line like
MASTER=bond0
lastly you need to create your bondx scripts which contain real ip's..
the options in modprobe tell what type of bond ur using in the above example its active-load balancing..
but it all depends on the type of bond you require
this definately works on centos. not sure about gentoo/Suse? or other distro's. but ive been running like this on one machine for more than a year, no prob's
also we used to run fedore core. but i migrated a while back to cent, and i will say im not looking back. for a server install its stable and fast. it may not have all the bells and whistles, but for what were doing its the best distro ive used (and i have tried a few). i dont need fancy graphics and pretty things. i want networking, and i want it too be fast and stable, and thats basically it. were running 6 dell servers and 1 HP, and i took the hp offline a few months ago because the damn fans inside it are too loud!
Last edited by evilted; 08-28-2009 at 08:43 AM.
Reason: added info
options in the ifcfg-bondX scripts. This way it doesn't require that you make separate ifcfg-ethX scripts for the enslaved interfaces, it just does it via the hardware address. Maybe it would just be easier for me to do it the other way...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.