Network configuration in Anaconda

Radek Vykydal
7 Feb 2016

Overview

Stages and targets of configuration

Dracut - early configuration in initramfs

Dracut - boot options

Dracut - processing kickstart config

network --device=ens3 --bootproto static \
--ip 10.34.102.223 --netmask 255.255.255.0 --gateway 10.34.102.254 --nameserver 10.34.39.2 \
--activate --onboot=no

Dracut - debugging

Anaconda - after switch root

%include /tmp/ksnetconf
%pre
echo "network --device ens9 --bootproto dhcp --activate --onboot=no" >> /tmp/ksnetconf
%end

Anaconda - after switch root - GUI/TUI

iBFT firmware configuration

Target system

%post
# simple eth0 config, again not hard-coded to the build hardware
cat > /etc/sysconfig/network-scripts/ifcfg-eth0 << EOF
DEVICE="eth0"
BOOTPROTO="dhcp"
ONBOOT="yes"
TYPE="Ethernet"
PERSISTENT_DHCLIENT="yes"
EOF
%end

Supported device types

network --device bond0 --bootproto=static \
--ip 10.34.107.233 --netmask 255.255.255.0 --gateway 10.34.107.255 --nameserver 10.34.107.1 \
--bondslaves=eth0,eth1 --bondopts=mode=active-backup,miimon=100,use_carrier=1 \
--onboot=no --activate --noipv6

Limitations