I’m having some trouble setting up bonded interfaces in a CentOS 6.5
kickstart script. I have 8 physical network interfaces, which want to be configured in pairs as 4 bonded network interfaces.
My network settings are as below:
network --device=bond0 --noipv6 --bootproto=static --onboot=yes --ip=172.123.1.22 --netmask=255.255.255.0 --bondslaves=eth0,eth1 --bondopts=mode=active-backup,primary=eth0,miimon=80,updelay=60000
network --device=bond1 --noipv6 --bootproto=static --onboot=yes --ip=172.123.2.22 --netmask=255.255.255.0 --bondslaves=eth2,eth3 --bondopts=mode=active-backup,primary=eth2,miimon=80,updelay=60000
network --device=bond2 --noipv6 --bootproto=static --onboot=yes --ip=172.123.3.22 --netmask=255.255.255.0 --bondslaves=eth4,eth5 --bondopts=mode=active-backup,primary=eth4,miimon=80,updelay=60000
network --device=bond3 --noipv6 --bootproto=static --onboot=yes --ip=172.123.4.22 --netmask=255.255.255.0 --bondslaves=eth6,eth7 --bondopts=mode=active-backup,primary=eth6,miimon=80,updelay=60000
network --device=eth0 --noipv6 --nodns --bootproto=static --onboot=yes
network --device=eth1 --noipv6 --nodns --bootproto=static --onboot=yes
network --device=eth2 --noipv6 --nodns --bootproto=static --onboot=yes
network --device=eth3 --noipv6 --nodns --bootproto=static --onboot=yes
network --device=eth4 --noipv6 --nodns --bootproto=static --onboot=yes
network --device=eth5 --noipv6 --nodns --bootproto=static --onboot=yes
network --device=eth6 --noipv6 --nodns --bootproto=static --onboot=yes
network --device=eth7 --noipv6 --nodns --bootproto=static --onboot=yes
My problem is this: bond0
is set up correctly, but bond1
, bond2
and bond3
are not set up.
I have seen a number of messageboard posts on similar topics, and the resolution always seems to be to put in a custom bash script for the purpose of setting up the bonded interfaces. However, I don’t think I believe that this is the only way to do it. Why would there be a mechanism in the kickstart file for setting up bonded interfaces if it doesn’t work properly?
You may have to include
--activate
for each of theeth{1..7}
interfaces, as only the first interface is activated by default. (And I wonder if your bonded interface is only in reality usingeth0
, if that's the only active interface.)The ability to configure bonded interfaces in your kickstart if a pretty recent addition in the RHEL line of releases; and possibly 6.4 was the first to support it. Have you tried with a 6.6?
From the RHEL 6.4 Release Notes
That said, the technical notes for 6.5 and 6.6 don't give much to go on. (although there is a bit about a 'nicedelay' option for slow network devices)
My best advice would be to capture the output of anaconda.
I suspect the first is working because it contains eth0, which is presumably already up, or the driver is already loaded.
Do the others perhaps not exist at the time of configuration? Perhaps you should report the results of
ifconfig -a
into a file in the %pre or similar, as shown in the Tips and Tricks part of the CentOS Kickstart wiki page