Bare-metal provisioning with VLAN over bond/team as main interface

Hello, folk.
Our network has complex structure with trunc and access VLANs. Moreover on every hardware server we use bond(team) interfaces. Typical IP configuration, for example (ip a commnad, approximate output):
2: em1:…
3. em2:…
4: bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master bond0 state UP group default
5: bond0@vlan111: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:cf:3c:ad:60 brd ff:ff:ff:ff:ff:ff
inet brd scope global docker0
valid_lft forever preferred_lft forever
inet6 fe80::42:cfff:fe3c:ad60/64 scope link
valid_lft forever preferred_lft forever

We have one specific VLAN for foreman’s DHCP (/24) and we want to to use it only for provisioning (in others VLANs we have static IP addresses). What I mean: we are configuring bond and VLAN during provision (how?), setting IP address and hostname from needed VLAN and then releasing DHCP-reservation (i.g. foreman makes our VLAN over BOND as main interface for management).
Is it possible?

Hey there!

Too broad question, too little information. So quick answer: No.

Let me ellaborate, I am familiar with Red Hats and Anaconda, I haven’t tried this myself and we don’t have anything in our PXE templates to support this out of box, but there are options to set up bonds for provisioning:

Generally, I don’t understand why anyone would do this - OS installation is easily repeatable. If there was a connection drop on one provisioning interface, you get an error and you restart the installation. If you have poor connection, then set a timer and restart all servers which did not check into Foreman after 3 hours automatically.

My advice would be - only setup provisioning interface as simple NIC (VLAN trunk if needed - easy change in PXE template) and that’s about it. Then configure all networking via the installer and reboot into OS to reconnect properly.

Anyway, if you must do this then try it. It is technically possible with Red Hats, you will need to change your templates a bit, test it. Share with us what the changes were or file PRs into our repo.

Hi, lzap!
Thanks for the answer.
Let me explain our purpose in more detail: we want to use that configuration (VLAN over bond) not only for installation, but for system too (I would say it is even main goal).
My first question was about possibility using DHCP only for installation (without reservation IP-address). In other words - can we use VLAN-over-bond (with static IP) interface as a primary (associated with hostname) for foreman management after installation?

You can configure anything you want, if Foreman does not directly support this in its model/API/UI, then you can create scriplet which will post-configure any NIC configuration you need. Not sure what do you ask for, we do support bonds, vlans, static IPs.