Skip to content

Commit e7b4a92

Browse files
committed
Merge pull request pykickstart#86 from rvykydal/master-update-network-command-doc
Master update network command documentation
2 parents 9e753ac + 0e38503 commit e7b4a92

File tree

1 file changed

+137
-89
lines changed

1 file changed

+137
-89
lines changed

docs/kickstart-docs.rst

Lines changed: 137 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,178 +1107,226 @@ disabled by default.
11071107
network
11081108
-------
11091109

1110-
Configures network information for target system and activates network
1111-
devices in installer environment. Device of the first network command is
1112-
activated if network is required, e.g. in case of network installation
1113-
or using vnc. Activation of the device can be also explicitly required
1114-
by ``--activate`` option. If the device has already been activated to
1115-
get kickstart file (e.g. using configuration provided with boot options
1116-
or entered in loader UI) it is re-activated with configuration from
1117-
kickstart file.
1110+
Configures network information for target system and activates network devices
1111+
in installer environment. The device specified in the first network command is
1112+
activated automatically. Activation of the device can be also explicitly
1113+
required by ``--activate`` option.
11181114

1119-
The device given by the first network command is activated also in case of
1120-
non-network installs, and this device is not re-activated using kickstart
1121-
configuration.
1115+
``--device=``
11221116

1123-
``--activate``
1117+
Specifies the device to be configured (and eventually activated in
1118+
Anaconda) with the network command.
11241119

1125-
As noted above, using this option ensures any matching devices
1126-
beyond the first will also be activated.
1120+
You can specify a device to be activated in any of the following ways:
11271121

1128-
``--bootproto=[dhcp|bootp|static|ibft]``
1122+
- the device name of the interface, for example, ``em1``
1123+
- the MAC address of the interface, for example, ``01:23:45:67:89:ab``
1124+
- the keyword ``link``, which specifies the first interface with its link
1125+
in the up state
1126+
- the keyword ``bootif``, which uses the MAC address that pxelinux set in
1127+
the ``BOOTIF`` variable. Set ``IPAPPEND 2`` in your pxelinux.cfg file to
1128+
have pxelinux set the ``BOOTIF`` variable.
11291129

1130-
The default setting is dhcp. bootp and dhcp are treated the same.
1130+
For example:
11311131

1132-
The DHCP method uses a DHCP server system to obtain its networking
1133-
configuration. As you might guess, the BOOTP method is similar,
1134-
requiring a BOOTP server to supply the networking configuration.
1132+
::
11351133

1136-
The static method requires that you enter all the required
1137-
networking information in the kickstart file. As the name implies,
1138-
this information is static and will be used during and after the
1139-
installation. The line for static networking is more complex, as you
1140-
must include all network configuration information **on one line**. You
1141-
must specify the IP address, netmask, gateway, and nameserver. For
1142-
example:
1134+
network --bootproto=dhcp --device=ens3
11431135

1144-
::
11451136

1146-
network --device=link --bootproto=static --ip=10.0.2.15 --netmask=255.255.255.0 --gateway=10.0.2.254 --nameserver=10.0.2.1
1137+
If the ``--device=`` option is missing on the first use of the network
1138+
command, the value of the ``ksdevice=`` Anaconda boot option is used, if
1139+
available. If ``ksdevice=`` is not set, ``link`` value is used. Note that
1140+
this is considered deprecated behavior; in most cases, you should always
1141+
specify a ``--device=`` for every network command. The behavior of any
1142+
subsequent network command in the same Kickstart file is unspecified if its
1143+
``--device=`` option is missing. Make sure you specify this option for any
1144+
network command beyond the first.
11471145

1148-
If you use the static method, be aware of the following restriction:
1146+
``--bootproto=[dhcp|static|ibft]``
11491147

1150-
All static networking configuration information must be specified
1151-
on one line; you cannot wrap lines using a backslash, for example.
1148+
The method of IPv4 configuration. For IPv6 configuration use ``--ipv6`` option.
11521149

1153-
ibft setting is for reading the configuration from iBFT table.
1150+
The default setting is ``dhcp``. To turn
1151+
IPv4 configuration off use ``--noipv4`` option.
11541152

1155-
``--device=``
1153+
- The ``dhcp`` method uses a DHCP server system to obtain its networking
1154+
configuration.
11561155

1157-
Specifies device to be configured and/or activated with the network
1158-
command. The device can be specified in the same ways as
1159-
`ksdevice <https://rhinstaller.github.io/anaconda/boot-options.html#ksdevice>`__
1160-
boot option. For example:
1156+
- The ``static`` method requires that you specify at least IP address and
1157+
netmask with ``--ip`` and ``--netmask`` options. For example:
11611158

1162-
``network --bootproto=dhcp --device=eth0``
1159+
::
11631160

1164-
``--ip=``
1161+
network --device=link --bootproto=static --ip=10.0.2.15 --netmask=255.255.255.0 --gateway=10.0.2.254 --nameserver=10.0.2.1
11651162

1166-
IP address for the interface.
1163+
- ``ibft`` setting is for reading the configuration from iBFT table.
11671164

1168-
``--ipv6=``
1165+
``--ip=``
11691166

1170-
IPv6 address for the interface. This can be the static address in
1171-
form ``<IPv6 address>[/<prefix length>]``, e.g. 3ffe:ffff:0:1::1/128
1172-
(if prefix is omitted 64 is assumed), "auto" for address assignment
1173-
based on automatic neighbor discovery, or "dhcp" to use the DHCPv6
1174-
protocol.
1167+
IPv4 address for the interface.
11751168

1176-
``--gateway=``
1169+
``--netmask=``
11771170

1178-
Default gateway, as an IPv4 or IPv6 address.
1171+
IPv4 network mask of the device.
11791172

1180-
``--nodefroute``
1173+
``--gateway=``
11811174

1182-
Prevents grabbing of the default route by the device. It can be
1183-
useful when activating additional devices in installer using
1184-
``--activate`` option.
1175+
Default gateway, as a single IPv4 address.
11851176

1186-
``--nameserver=``
1177+
``--noipv4``
11871178

1188-
Primary nameserver, as an IP address. Multiple nameservers must be
1189-
comma separated.
1179+
Disable IPv4 configuration of this device.
11901180

1191-
``--nodns``
1181+
``--ipv6=``
11921182

1193-
Do not configure any DNS server.
1183+
IPv6 address for the interface. This can be
11941184

1195-
``--netmask=``
1185+
- the static address in form ``<IPv6 address>[/<prefix length>]``,
1186+
e.g. ``3ffe:ffff:0:1::1/128`` (if prefix is omitted 64 is assumed),
1187+
- ``auto`` for stateless automatic address autoconfiguration, or
1188+
- ``dhcp`` for DHCPv6-only configuration (no router advertisements).
11961189

1197-
Netmask for the installed system.
1190+
``--ipv6gateway=``
11981191

1199-
``--hostname=``
1192+
Default gateway, as a single IPv6 address.
12001193

1201-
Hostname for the installed system.
1194+
``--noipv6``
12021195

1203-
``--ethtool=``
1196+
Disable IPv6 configuration of this device.
12041197

1205-
Specifies additional low-level settings for the network device which
1206-
will be passed to the ethtool program.
1198+
``--nameserver=``
12071199

1208-
``--essid=``
1200+
Primary nameserver, as an IP address. Multiple nameservers must be
1201+
comma separated.
12091202

1210-
The network ID for wireless networks.
1203+
``--activate``
12111204

1212-
``--wepkey=``
1205+
Activate this device in the installation environment.
12131206

1214-
The WEP encryption key for wireless networks.
1207+
If the device has already been activated (for example, an interface you
1208+
configured with boot options so that the system could retrieve the
1209+
Kickstart file) the device is reactivated to use the configuration
1210+
specified in the Kickstart file.
12151211

1216-
``--wpakey=``
1212+
``--nodefroute``
12171213

1218-
The WPA encryption key for wireless networks.
1214+
Prevents the interface being set as the default route. Use this option when
1215+
you activate additional devices with the ``--activate=`` option, for
1216+
example, a NIC on a separate subnet for an iSCSI target.
12191217

12201218
``--onboot=``
12211219

12221220
Whether or not to enable the device a boot time.
12231221

1224-
``--dhcpclass=``
1222+
``--hostname=``
12251223

1226-
The DHCP class.
1224+
The host name for the installed system.
1225+
1226+
The host name can either be a fully-qualified domain name (FQDN) in the
1227+
format hostname.domainname, or a short host name with no domain. Many
1228+
networks have a DHCP service which automatically supplies connected systems
1229+
with a domain name; to allow DHCP to assign the domain name, only specify a
1230+
short host name.
12271231

12281232
``--mtu=``
12291233

12301234
The MTU of the device.
12311235

1232-
``--noipv4``
1236+
``--ethtool=``
12331237

1234-
Disable IPv4 on this device.
1238+
Specifies additional low-level settings for the network device which
1239+
will be passed to the ethtool program.
12351240

1236-
``--noipv6``
1241+
``--dhcpclass=``
12371242

1238-
Disable IPv6 on this device.
1243+
Specifies the DHCP vendor class identifier. The dhcpd service will see this
1244+
value as vendor-class-identifier.
12391245

1240-
``--bondslaves``
1246+
``--bondslaves=``
12411247

1242-
Bonded device with name specified by ``--device`` option will be
1243-
created using slaves specified in this option. Example:
1244-
``--bondslaves=eth0,eth1``.
1248+
Bonded device with name specified by ``--device`` option will be created
1249+
using slaves specified in this option. Example:
12451250

1246-
``--bondopts``
1251+
::
1252+
1253+
network --device bond0 --bootproto static --ip=10.34.102.222 --netmask=255.255.255.0 --gateway=10.34.102.254 --nameserver=10.34.39.2 --bondslaves=ens7,ens8 --bondopts=mode=active-backup,primary=ens7 --activate
1254+
1255+
``--bondopts=``
12471256

12481257
A comma-separated list of optional parameters for bonded interface
12491258
specified by ``--bondslaves`` and ``--device`` options. Example:
12501259
``--bondopts=mode=active-backup,primary=eth1``. If an option itself
12511260
contains comma as separator use semicolon to separate the options.
1261+
Example: ``--bondopts=mode=active-backup,balance-rr;primary=eth1``
12521262

1253-
``--vlanid``
1263+
``--vlanid=``
12541264

12551265
Id (802.1q tag) of vlan device to be created using parent device
12561266
specified by ``--device`` option. For example
12571267
``network --device=eth0 --vlanid=171`` will create vlan device
12581268
``eth0.171``.
12591269

1260-
``--teamslaves``
1270+
``--interfacename=``
1271+
1272+
Specify a custom interface name for a virtual LAN device. This option
1273+
should be used when the default name generated by the ``--vlanid=`` option
1274+
is not desirable. This option must be used along with ``--vlanid=``. For
1275+
example:
1276+
1277+
::
1278+
1279+
network --device=em1 --vlanid=171 --interfacename=vlan171
1280+
1281+
The above command creates a virtual LAN interface named ``vlan171`` on the
1282+
em1 device with an ID of 171. The interface name can be arbitrary (for
1283+
example, ``my-vlan``), but in specific cases, the following conventions
1284+
must be followed:
1285+
1286+
If the name contains a dot (.), it must take the form of NAME.ID. The NAME
1287+
is arbitrary, but the ID must be the VLAN ID. For example: ``em1.171`` or
1288+
``my-vlan.171``. Names starting with vlan must take the form of vlanID -
1289+
for example: ``vlan171``.
1290+
1291+
``--teamslaves=``
12611292

12621293
Team device with name specified by ``--device`` option will be
12631294
created using slaves specified in this option. Slaves are separated
1264-
by comma. A slave can be followed by its configuration which is a
1295+
by commas. A slave can be followed by its configuration which is a
12651296
single-quoted json format string with double qoutes escaped by
12661297
``'\'`` character. Example:
12671298
``--teamslaves="p3p1'{\"prio\": -10, \"sticky\": true}',p3p2'{\"prio\": 100}'"``.
12681299
See also ``--teamconfig`` option.
12691300

1270-
``--teamconfig``
1301+
``--teamconfig=``
12711302

12721303
Double-quoted team device configuration which is a json format
12731304
string with double quotes escaped with ``'\'`` character. The device
12741305
name is specified by ``--device`` option and its slaves and their
12751306
configuration by ``--teamslaves`` option. Example:
12761307

1277-
::
1308+
::
1309+
1310+
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\"}}"
1311+
1312+
``--bridgeslaves=``
1313+
1314+
When this option is used, the network bridge with device name specified
1315+
using the ``--device=`` option will be created and devices defined in the
1316+
``--bridgeslaves=`` option will be added to the bridge. For example:
1317+
1318+
::
1319+
1320+
network --device=bridge0 --bridgeslaves=em1
1321+
1322+
``--bridgeopts=``
12781323

1279-
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 \
1280-
--teamslaves="p3p1'{\"prio\": -10, \"sticky\": true}',p3p2'{\"prio\": 100}'" \
1281-
--teamconfig="{\"runner\": {\"name\": \"activebackup\"}}"
1324+
An optional comma-separated list of parameters for the bridged interface.
1325+
Available values are ``stp``, ``priority``, ``forward-delay``,
1326+
``hello-time``, ``max-age``, and ``ageing-time``. For information about
1327+
these parameters, see the bridge setting table in the nm-settings(5) man
1328+
page or at
1329+
https://developer.gnome.org/NetworkManager/0.9/ref-settings.html.
12821330

12831331

12841332
part or partition

0 commit comments

Comments
 (0)