Product SiteDocumentation Site

A.3.2. network (optional) - Configure Network Interfaces

Configures network information for the target system and activates network devices in the installation environment. The device specified in the first network command is activated automatically. Activation of the device can be also explicitly required by the --activate option.
--activate
If you use the --activate option on a device that has already been activated (for example, an interface you configured with boot options so that the system could retrieve the Kickstart file) the device is reactivated to use the details specified in the Kickstart file.
Use the --nodefroute option to prevent the device from using the default route.
--no-activate
Prevents the configured device from automatically activating on boot.
--bootproto=
One of dhcp, bootp, ibft, or static. The default option is dhcp; the dhcp and bootp options are treated the same.
The DHCP method uses a DHCP server system to obtain its networking configuration. The BOOTP method is similar, requiring a BOOTP server to supply the networking configuration. To direct a system to use DHCP:
network --bootproto=dhcp
To direct a machine to use BOOTP to obtain its networking configuration, use the following line in the Kickstart file:
network --bootproto=bootp
To direct a machine to use the configuration specified in iBFT, use:
network --bootproto=ibft
The static method requires that you specify the IP address, netmask, gateway, and nameserver in the Kickstart file. This information is static and is used during and after the installation.
All static networking configuration information must be specified on one line; you cannot wrap lines using a backslash (\) as you can on a command line.
network --bootproto=static --ip=10.0.2.15 --netmask=255.255.255.0 --gateway=10.0.2.254 --nameserver=10.0.2.1
You can also configure multiple nameservers at the same time. To do so, use the --nameserver= options once for each name server you want to configure:
network --bootproto=static --ip=10.0.2.15 --netmask=255.255.255.0 --gateway=10.0.2.254 --nameserver=192.168.2.1 --nameserver=192.168.3.1
--device=
Specifies the device to be configured (and eventually activated in Anaconda) with the network command.
If the --device= option is missing on the first use of the network command, the value of the ksdevice= Anaconda boot option is used, if available. Note that this is considered deprecated behavior; in most cases, you should always specify a --device= for every network command.
The behavior of any subsequent network command in the same Kickstart file is unspecified if its --device= option is missing. Make sure you specify this option for any network command beyond the first.
You can specify a device to be activated in any of the following ways:
  • the device name of the interface, for example, em1
  • the MAC address of the interface, for example, 01:23:45:67:89:ab
  • the keyword link, which specifies the first interface with its link in the up state
  • the keyword bootif, which uses the MAC address that pxelinux set in the BOOTIF variable. Set IPAPPEND 2 in your pxelinux.cfg file to have pxelinux set the BOOTIF variable.
For example:
network --bootproto=dhcp --device=em1
--ip=
IP address of the device.
--ipv6=
IPv6 address of the device, in the form of address[/prefix length] - for example, 3ffe:ffff:0:1::1/128 . If prefix is omitted, 64 will be used. You can also use auto for automatic configuration, or dhcp for DHCPv6-only configuration (no router advertisements).
--gateway=
Default gateway as a single IPv4 address.
--ipv6gateway=
Default gateway as a single IPv6 address.
--nodefroute
Prevents the interface being set as the default route. Use this option when you activate additional devices with the --activate= option, for example, a NIC on a separate subnet for an iSCSI target.
--nameserver=
DNS name server, as an IP address. To specify more than one name server, use this parameter multiple times. For example:
network --bootproto=static --ip=10.0.2.15 --netmask=255.255.255.0 --gateway=10.0.2.254 --nameserver=192.168.2.1 --nameserver=192.168.3.1
--nodns
Do not configure any DNS server.
--netmask=
Network mask for the installed system.
--hostname=
Host name for the installed system. The host name can be either a fully-qualified domain name (FQDN) in the format hostname.domainname, or a short host name with no domain name. Many networks have a Dynamic Host Configuration Protocol (DHCP) service that automatically supplies connected systems with a domain name; to allow the DHCP service to assign the domain name to this machine, only specify the short host name.
--ethtool=
Specifies additional low-level settings for the network device which will be passed to the ethtool program.
--essid=
The network ID for wireless networks.
--wepkey=
The WEP encryption key for wireless networks.
--wpakey=
The WPA encryption key for wireless networks.
--onboot=
Whether or not to enable the device at boot time.
--dhcpclass=
The DHCP class.
--mtu=
The MTU of the device.
--noipv4
Disable IPv4 on this device.
--noipv6
Disable IPv6 on this device.
--bondslaves=
When this option is used, the network device specified in the --device= option will be created using slaves defined in the --bondslaves= option. For example:
network --device=mynetwork --bondslaves=em1,em2
The above command will create a bond device named mynetwork using the em1 and em2 interfaces as its slaves.
--bondopts=
A list of optional parameters for a bonded interface, which is specified using the --bondslaves= and --device= options. Options in this list must be separated by commas (",") or semicolons (";"). If an option itself contains a comma, use a semicolon to separate the options. For example:
network --bondopts=mode=active-backup,balance-rr;primary=eth1
Available optional parameters are listed in the Working with Kernel Modules chapter of the Fedora System Administrator's Guide, available at http://docs.fedoraproject.org/.

Important

The --bondopts=mode= parameter only supports full mode names such as balance-rr or broadcast, not their numerical representations such as 0 or 3.
--vlanid=
Specifies virtual LAN (VLAN) ID number (802.1q tag) for the device created using the device specified in --device= as a parent. For example, network --device=em1 --vlanid=171 will create a virtual LAN device em1.171.
--interfacename=
Specify a custom interface name for a virtual LAN device. This option should be used when the default name generated by the --vlanid= option is not desirable. This option must be used along with --vlanid=. For example:
network --device=em1 --vlanid=171 --interfacename=vlan171
The above command will create a virtual LAN interface named vlan171 on the em1 device with an ID of 171.
The interface name can be arbitrary (for example, my-vlan), but in specific cases, the following conventions must be followed:
  • If the name contains a dot (.), it must take the form of NAME.ID. The NAME is arbitrary, but the ID must be the VLAN ID. For example: em1.171 or my-vlan.171.
  • Names starting with vlan must take the form of vlanID - for example, vlan171.
--teamslaves=
Team device specified by the --device= option will be created using slaves specified in this option. Slaves are separated by commas. A slave can be followed by its configuration, which is a single-quoted JSON string with double quotes escaped by the \ character. For example:
network --teamslaves="p3p1'{\"prio\": -10, \"sticky\": true}',p3p2'{\"prio\": 100}'"
See also the --teamconfig= option.
--teamconfig=
Double-quoted team device configuration which is a single-quoted JSON string with double quotes escaped by the \ character. The device name is specified by --device= option and its slaves and their configuration by --teamslaves= option. For example:
network --device team0 --activate --bootproto static --ip=10.34.102.222 --netmask=255.255.255.0 --gateway=10.34.102.254 --nameserver=10.34.39.2 --teamslaves="p3p1'{\"prio\": -10, \"sticky\": true}',p3p2'{\"prio\": 100}'" --teamconfig="{\"runner\": {\"name\": \"activebackup\"}}"
--bridgeslaves=
When this option is used, the network bridge with device name specified using the --device= option will be created and devices defined in the --bridgeslaves= option will be added to the bridge. For example:
network --device=bridge0 --bridgeslaves=em1
--bridgeopts=
An optional comma-separated list of parameters for the bridged interface. Available values are stp, priority, forward-delay, hello-time, max-age, and ageing-time. For information about these parameters, see the bridge setting table in the nm-settings(5) man page or at https://developer.gnome.org/NetworkManager/0.9/ref-settings.html. Also see the Fedora Networking Guide, available at http://docs.fedoraproject.org/, for general information about network bridging.