kickstart network by script
I am running Satellite 5.6. I have been trying many different ways of generating a network statement through the kickstart wizard. I do not want to enter the network definition through the Advanced Options, but instead build a script that will generate the appropriate definition. As a test, I have a system with a bonded network adapter. I can get the appropriate configuration by entering the following either in the Advanced Options (without the network statement header) or by placing the network statement in the Partitioning text box:
network --device=bond0 --hostname=llrhnt00.ccci.org --ip=10.10.11.9 --gateway=10.10.11.254 --netmask=255.255.255.0 --nameserver=10.10.10.36,10.10.10.17,10.10.10.38 --bootproto=static --bondopts=mode=802.3ad,miimon=100,lacp_rate=fast --bondslaves=eth1,eth0
I have attempted to generate the network with a pre-script with an echo in a snippet in a pre-script and by writing the network statement into a /tmp/netinfo file and using %include /tmp/netinfo in the Partitioning box.
Responses
See fourth paragraph in this post...
Even though this bit is from 2006, it seems relevant. LACP 802.3ad, would use both sides of the two interfaces comprising the bonded nic. During kickstart, it would have to use one or the other of the nics and I believe with LACP properly set up on the switch, you'd need both.
If I'm wrong, I hope someone chimes in because this would be nice.
When I create bonded nics, I use a switch line from another port (a kickstart port only activated for a kickstart), build the system and then configure the bonded interface with the slave interface files.
Perhaps try this -> Perhaps use a non-LACP port and line from your switch (a kickstart port) where you can use it for the kickstart exclusively (like eth2, using ordinal numbering, this would be the third available physical interface). Then configure the others to fulfill LACP nic bonding. I place the network directives in the variables portion of the satellite's kickstart then cite the variables in the network line within the satellite's kickstart in the web gui.
Please do let us know how it goes, but I think I'll try this too sometime.
Kind Regards,
Rem
I think your syntax is just fine, it's just that the expectation of LACP working with Anaconda may be overreaching I believe. In my experience LACP, type 4 bonding must use both ports, never just 1 port. (Did you see that link I posted?) .
I do not believe (from my experience) that LACP will function during the anaconda environment. Type 4 bonding, LACP uses both ports simultaneously and requires both ports (I suspect I'm not telling you anything new with that last bit). Anaconda does not. As soon as I attempted the kickstart with a different port (not configured for bonding), it worked fine. Good luck, I hope it can be done for your sake.
If you can get LACP to work with Anaconda, please do let us know what you did. I doubt type 4 bonding with LACP is possible during kickstart and hope I am incorrect for your sake.
You could probably do this by running your kickstart on ifcfg-eth2 (ordinal numbering) on a non-LACP NIC and then in the post script or /etc/rc3.d/S999configbonding script you write -->run this, then delete the script and disable the non-LACP interface when complete:
(scroll to the right of the block of code below)
/bin/cat << EOF > /etc/sysconfig/network-scripts/ifcfg-bond0
<all your directives>
<go here>
EOF
/bin/cat << EOF > /etc/sysconfig/network-scripts/ifcfg-eth0
<all your directives>
<go here>
EOF
/bin/cat << EOF > /etc/sysconfig/network-scripts/ifcfg-eth1
<all your directives>
<go here>
EOF
See last post, and good luck
Nice, Thanks Tim,
I suspected bonding in general was supported. My question would be if Mode 4 – 802.3ad (active) link aggregation would work during anaconda kickstart because the switch would mandate both interfaces to be up and slaved to the ifcfg-bondX file... I suspect you may have touched on this above...
going to build a server today and may try this today...
I can validate the experience you had - that you can use a single NIC which is unbonded when plumbed to an LACP switch port. I don't know when this changed, but I too recall when back-in-the-day if you had LACP configured on the switch, but not the same on the host, it would simply not work. That no longer seems to be the case. I have not had a chance to validate this during a kickstart, however. When I had researched this before, I could not find any supporting docs that included lacp.
So - I looked at
RHEL 6 - Installation Guide sec 28.1.5.1
which then references
Deployment Guide (Working with Kernel Modules, Chap 28)... and then I'm lost again ;-)
Hello James
That is something I could add to the Deployment Guide in future. I did find this BTW: How to configure LACP 802.3ad with bonded interfaces
Hey Stephen,
The documentation is solid for configuring the bond once the OS is running. We are (were) struggling with kickstarting a host using LACP (see my post at the end). I think the biggest issue is not being able to use
mode=4 versus mode=802.3ad -- that is certainly not intuitive. (I am unable to find supporting doc indicating that you actually cannot use the numeric bond mode - so, it might be a bug?).
thanks
I'm pretty excited to update this thread... today I was able to kickstart using 802.3ad!
We use a fairly convuluted kickstart method.. but I think the general idea will still come across.
kickstart6 hostname=myhost.mycompany.com ip=10.5.102.27 netmask=255.255.254.0 gateway=10.5.102.1 bond=bond0:em1,em2:mode=802.3ad,miimon=100,lacp_rate=fast
kickstart6 is an "alias" for:
label kickstart6
kernel vmlinuz
append initrd=initrd.img noipv6 lang=en_US ks=http://satellite.mycompany.com/ks/cfg/org/1/label/kickstart6 dns=10.98.230.27,10.98.230.28
IMPORTANT: I think one item regarding the network setup for kickstarts, that is not obvious (nor well documented) is that you cannot use the numeric indicator for the Bond type. (i.e. you need 802.3ad not mode=4) I will try to find some documentation supporting that statement though.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
