top of page
Recent Posts
Writer's pictureMunshi Hafizul Haque

How to configure PXE Server in Advanced Way

Updated: Oct 3, 2021


In my previous post, I have described how to start with the PXE server for the network operating system installation. See the below link, if missed out.


Now I am going to add some more configuration in my existing setup based on my requirement:

  • PXE server has to configure multiple network interfaces during installation.

  • Need to have a default route as well as the static route via DHCP.

  • Could have a binding/teaming interface and so on.

Step:1 We need to do some necessary configuration changed in the DHCP server for a default route as well as the static route.

Note: Please make sure about the IP Address. I might use different IP Addresses in different scenarios.

Step:2 Need to change/add the configuration file (/var/lib/tftpboot/pxelinux.cfg/default) for the PXE server.


# vi /var/lib/tftpboot/pxelinux.cfg/default

::::::::::::: CUT SOME OUTPUT :::::::::::::
menu title ######## PXE Boot Menu ########  
label 1
menu label ^1) Install RHEL 7 1xETH
kernel rhcos/vmlinuz
append initrd=rhcos/initrd.img method=http://192.168.122.144/rhel7 devfs=nomount

label 2
menu label ^1) Install RHEL 7 2xETH
kernel rhcos/vmlinuz
append initrd=rhcos/initrd.img ip=:::::eth0:dhcp ip=192.168.123.112::192.168.123.1:255.255.255.0::eth1:none nameserver=192.168.122.254 method=http://192.168.122.144/rhel7 devfs=nomount

label 3
menu label ^1) Install RHEL 7 3xETH,BOND0
kernel rhcos/vmlinuz
append initrd=rhcos/initrd.img bond=bond0:eth1,eth2:mode=802.3ad,lacp_rate=fast,miimon=100,xmit_hash_policy=layer2+3 ip=:::::eth0:dhcp ip=192.168.123.112::192.168.123.1:255.255.255.0::bond0:none nameserver=192.168.122.254 method=http://192.168.122.144/rhel7 devfs=nomount

label 4
menu label ^1) Install RHEL 7 3xETH,BOND0,VLAN
kernel rhcos/vmlinuz
append initrd=rhcos/initrd.img bond=bond0.150:eth1,eth2:mode=802.3ad,lacp_rate=fast,miimon=100,xmit_hash_policy=layer2+3 ip=:::::eth0:dhcp ip=192.168.123.112::192.168.123.1:255.255.255.0::bond0.150:none vlan=bond0.150:bond0 nameserver=192.168.122.254 method=http://192.168.122.144/rhel7 devfs=nomount

::::::::::::: CUT SOME OUTPUT :::::::::::::
Note: The ip option on the kernel command line: ip<client-IP-number>:[<server-id>]:<gateway-IP-number>:<netmask>:<client-hostname>:<interface>:{dhcp|dhcp6|auto6|on|any|none|off}

Step:3 To verify and boot the client systems with the PXE boot option.

We can select the installation method (1,2,3..) from the PXE Boot menu screen. And after that, we can proceed with the installation.

After the successful boot up the system with the PXE boot server, we can check the network configuration at the anaconda command line terminal.

If we select installation method 4 (e.g. 3xETH,BOND0,VLAN), Then the network configuration at the anaconda command line terminal will be:

Step:3 After the successful operation system installation, we can verify the post-installation network configuration.

I did log in to the system from my laptop to verify the persistent bond0 interface configuration.

# ssh abc@192.168.122.112

Authorized users only. All activities may be monitored and reported.
abc@192.168.122.112's password: ********
Last login: Sat Jul 18 23:51:22 2019 from 192.168.122.144

Authorized users only. All activities may be monitored and reported.
$ sudo -i
[sudo] password for abc: ********

# cat /etc/sysconfig/network-scripts/ifcfg-bond0.150 
# Generated by dracut initrd
NAME="bond0.150"
ONBOOT=yes
NETBOOT=yes
UUID="d3cd3cb1-d2d6-4640-826b-db865823dc40"
IPV6INIT=yes
BOOTPROTO=none
IPADDR="192.168.123.112"
NETMASK="255.255.255.0"
GATEWAY="192.168.123.1"
TYPE=Vlan
DEVICE="bond0.150"
VLAN=yes
PHYSDEV="bond0"
BONDING_OPTS="mode=802.3ad lacp_rate=fast miimon=100 xmit_hash_policy=layer2+3"
NAME="bond0.150"
TYPE=Bond
DNS1="192.168.122.254"

Troubleshooting: I have tested this configuration in my libvirt (KVM) virtualization lab and it's working fine. It may require some little bit of change based on your scenarios.


Let us know if we can help with our best effort basis. though we all are busy with our professional life.


Hope this document will help.

26 views0 comments

Comments


!
Widget Didn’t Load
Check your internet and refresh this page.
If that doesn’t work, contact us.
bottom of page