Operating System - Linux
1753865 Members
7509 Online
108809 Solutions
New Discussion юеВ

Not configuring Bond0 but appears in ifconfig report?

 
SOLVED
Go to solution
Qcheck
Super Advisor

Not configuring Bond0 but appears in ifconfig report?

Hello, I am configuring only bond1 and bond2 in kickstart. But how come bond0 appears in "ifconfig -a" even though it is not up. I don't want to see the bond0 in my ifconfig output. Any ideas are greatly appreciated.

Thank you.....
9 REPLIES 9
Jupinder Bedi
Respected Contributor

Re: Not configuring Bond0 but appears in ifconfig report?

you can configure your ip manually as follows and let me know the status

/etc/sysconfig/network-scripts/ifcfg-bond0

and
/etc/sysconfig/network-scripts/ifcfg-bond1


and do

service network stop
srvice network start

and than check

also you can do it by using

#neat
All things excellent are as difficult as they are rare
Qcheck
Super Advisor

Re: Not configuring Bond0 but appears in ifconfig report?

ifcfg-bond0 is not at all configured, but still appears in the ifconfig -a output. I only configured bond1 and bond2 in the /etc/sysconfig/network-scripts as ifcfg-bond1 and ifcfg-bond2. Reserved ifcfg-bond0 for infiniband configuration. I don't see anything for bond0 in /etc/sysconfig/network-scripts, but how come once the server is up and running I see unconfigured bond0, but I don't want to see bond0 in the ifconfig -a output.

When server boots where does it looks for bonding information other than in /etc/sysconfig/network-scripts?

Advance thank you for the help.
Matti_Kurkela
Honored Contributor
Solution

Re: Not configuring Bond0 but appears in ifconfig report?

When the "bonding" kernel module is loaded, it will always provide at least one bonding interface, i.e. bond0.

There is a max_bonds=N option for the bonding module. If you specify you want to create N bonds, the module would auto-create bonding interfaces from bond0 to bond(N-1), inclusive. So bond1 cannot exist before bond0 does, and bond2 cannot exist before bond1.

When you configure network interfaces with RedHat configuration tools (kickstart, system-config-network, etc.), those tools will automatically insert the proper option lines for the bonding module to /etc/modprobe.conf for you.


The same naming algorithm is used by the kernel to assign default names for real NICs: the first NIC detected will always be eth0, the next eth1, and so on. However, the "nameif" command can be used to change these names.

Most modern distributions include built-in scripting (either udev-based or included in the network configuration scripts) to save the MAC addresses of each detected NIC and keep the same ethX name assigned to it persistently.

In theory, you could set max_bonds=2 to allocate just bond0 and bond1, then re-name them to bond1 and bond2 before using them... but the nameif command requires you to identify the interface to be renamed by the MAC address, and an unconfigured bonding interface does not *have* a unique MAC address. Also, an interface must not be configured while it's being renamed. Making such a configuration work might be more trouble than it's worth.

If you have a 4-port Ethernet card, and you use only 3 ports of it, the remaining 4th port will also be visible in the "ifconfig -a" listing, and you cannot easily remove it. If some hardware monitoring application sees an unconfigured bond/NIC as an error, a better solution would be to find out how to configure that application to ignore the unconfigured NIC.

MK
MK
Qcheck
Super Advisor

Re: Not configuring Bond0 but appears in ifconfig report?

Thank you Mk for your response and time. So what you are saying is, bond0 appears no matter what when I try to configure bond1 and bond2, even if I specify max_bonds=2. I didn't try max_bonds=2 yet though.....

My question to you is, so if unconfigured bond0 definition appears in ifconfig -a output, can that be used for infiniband bonding?

Thank you...
Matti_Kurkela
Honored Contributor

Re: Not configuring Bond0 but appears in ifconfig report?

Sorry, I don't have any experience with Infiniband.

However, the bonding.txt in Linux kernel documentation seems to say that basic Infiniband failover support is there:

http://www.mjmwired.net/kernel/Documentation/networking/bonding.txt

-----
2. What type of cards will work with it?

[...]

Starting with version 3.2.1, bonding also supports Infiniband slaves in active-backup mode.
-----

Use "modinfo bonding | grep version" to see the version number of the bonding driver.

MK
MK
Qcheck
Super Advisor

Re: Not configuring Bond0 but appears in ifconfig report?

Mk or Any Gurus,

Thank you for the response. I am not sure the type of card Infiniband uses. Even I am new to this place and Infiniband.

Is there a way to remove unconfigured bond0? Even though bond0 definition doesn't exist in network-scripts or modprobe, is there any command to remove bond0?

Thank you in advance!
KarloChacon
Honored Contributor

Re: Not configuring Bond0 but appears in ifconfig report?

Pratibha
did you have any luck with this bond0?

I'm in the same situation I remove the ifcfg-bond0 and the entry on modprobe.conf

and network restart but

bond0 is still there

any way to remove it?
Didn't your momma teach you to say thanks!
KarloChacon
Honored Contributor

Re: Not configuring Bond0 but appears in ifconfig report?

Pratibha

I just fixed it

you know I removed ifcfg-bond0 and the entry on modprobe.conf and restarted network services which did not remove the bond on ifconfig command neither ip addr list

since I had ifcfg-eth3

I copied cp ifcfg-eth3 ifcfg-bond0

after that nano ifcfg-bond0
DEVICE=bond0
and remove any MAC address assigned to eth3

save changes

restart network services and DONE :)

I hope it works for you
Didn't your momma teach you to say thanks!
Qcheck
Super Advisor

Re: Not configuring Bond0 but appears in ifconfig report?

Karlo,

Thank you for the update, sorry I didn't check my emails yesterday. Anyways, the work around for me is as follows:

echo -bond0 > /sys/class/net/bonding_masters

That worked for me.

Thank you