From Fedora Project Wiki
No edit summary
Line 1: Line 1:
== incomplete ==
== Network enablement and network configuration ==
== Network enablement and network configuration ==


Line 15: Line 13:
== Modes of configuration ==
== Modes of configuration ==
{{Anchor|boot}}
{{Anchor|boot}}
==== boot options ====
==== Boot options ====
These [[Anaconda_Boot_Options | anaconda boot options]] can be used to enable network in loader (e.g. for getting kickstart, updates image, or for network installation): '''asknetwork, dhcpclass, dhcptimeout, dns, essid, ethtool, gateway, ip, ipv6, ksdevice, linksleep, mtu, netmask, nicdelay, noipv4, noipv6, wepkey'''
These [[Anaconda_Boot_Options | anaconda boot options]] can be used to enable network in loader (e.g. for getting kickstart, updates image, or for network installation): '''asknetwork, dhcpclass, dhcptimeout, dns, essid, ethtool, gateway, ip, ipv6, ksdevice, linksleep, mtu, netmask, nicdelay, noipv4, noipv6, wepkey'''


{{Anchor|kickstart}}
{{Anchor|kickstart}}
==== kickstart ====
==== Kickstart ====
[[Anaconda/Kickstart | Kickstart]] '''network''' command can be used both to enable and configure devices. The behaviour has changed in the course of adoption of NM.
[[Anaconda/Kickstart | Kickstart]] '''network''' command can be used both to enable and configure devices. The behaviour has changed in the course of adoption of NM.
* '''RHEL 5''' - the first '''network''' command from kickstart activates or reactivates (if the device has already been enabled e.g. to get kickstart using configuration given in [[Anaconda/Network#boot | boot parameters]]) relevant device with configuration set by the command. Other '''network''' commands only set configuration for target system, the devices are not enabled in installer.
* '''RHEL 5''' - the first '''network''' command from kickstart activates or reactivates (if the device has already been enabled e.g. to get kickstart using configuration given in [[Anaconda/Network#boot | boot parameters]]) relevant device with configuration set by the command. Other '''network''' commands only set configuration for target system, the devices are not enabled in installer.
Line 27: Line 25:
For RHEL 6.0, Fedora 14, and later, devices that are supposed not to be activated in installer and have '''onboot''' option set can be activated just before getting packages due to [[Anaconda/Network#onboot| ONBOOT side-effect]]. We have no reports of problems caused by this, but in some cases activation of the device could cause change of routing table making packages inaccessible.
For RHEL 6.0, Fedora 14, and later, devices that are supposed not to be activated in installer and have '''onboot''' option set can be activated just before getting packages due to [[Anaconda/Network#onboot| ONBOOT side-effect]]. We have no reports of problems caused by this, but in some cases activation of the device could cause change of routing table making packages inaccessible.


==== loader text UI ====
==== Loader text UI ====
Serves for selection and configuration of a network device that will be enabled in loader (which happens if kickstart or updates image should be fetched from network or in case of network installation). It will not be run if the information is provided via [[Anaconda/Network#boot | boot options]] or [[Anaconda/Network#kickstart | kickstart]] unless required by boot option '''asknetwork'''. Configuration options of this UI are a subset of '''nm-c-e''' which is used in [[Anaconda/Network#GUI | GUI]].
Serves for selection and configuration of a network device that will be enabled in loader (which happens if kickstart or updates image should be fetched from network or in case of network installation). It will not be run if the information is provided via [[Anaconda/Network#boot | boot options]] or [[Anaconda/Network#kickstart | kickstart]] unless required by boot option '''asknetwork'''. Configuration options of this UI are a subset of '''nm-c-e''' which is used in [[Anaconda/Network#GUI | GUI]].


Line 35: Line 33:


TODO explain ipv6 options
TODO explain ipv6 options
TODO ipv4 succ and ipv6 fail


{{Anchor|text}}
{{Anchor|text}}
==== text mode UI ====
==== Text mode UI ====
TODO
TODO limits
{{Anchor|gui}}
{{Anchor|gui}}
==== anaconda GUI ====
==== Anaconda GUI ====
TODO
TODO limits, problems, need for '''NM Applet'''
 
{{Anchor|configfiles}}
{{Anchor|configfiles}}
==== editing configuration files ====
==== Editing configuration files ====
'''Anaconda''' communictes with '''NetworkManager''' mostly with <code>ifcfg</code> files ('''nm-c-e''' stores its configuration there too). It can be handy to edit them directly for debugging or as workaround solution. Files can be edited using shell in virtual terminal <code>tty2</code> ('''[Ctrl][Alt][F2]'''). Their location is <code>/etc/sysconfig/netwrok-scripts/ifcfg-<device name></code>. The configuration will be applied in installer after the device is disconnected and reactivated. The device is disconnected if its <code>ifcfg</code> file is removed. It will be activated if an <code>ifcfg</code> file will be copied back to its location with <code>ONBOOT=yes</code> set. So configuration of active device for installer environment can be changed this way:
'''Anaconda''' communictes with '''NetworkManager''' mostly with <code>ifcfg</code> files ('''nm-c-e''' stores its configuration there too). It can be handy to edit them directly for debugging or as workaround solution. Files can be edited using shell in virtual terminal <code>tty2</code> ('''[Ctrl][Alt][F2]'''). Their location is <code>/etc/sysconfig/netwrok-scripts/ifcfg-<device name></code>. The configuration will be applied in installer after the device is disconnected and reactivated. The device is disconnected if its <code>ifcfg</code> file is removed. It will be activated if an <code>ifcfg</code> file will be copied back to its location with <code>ONBOOT=yes</code> set. So configuration of active device for installer environment can be changed this way:
<pre>
<pre>
Line 72: Line 69:
* Support for stateless dhcp6 in loader UI - should happen in '''nm-c-e''' first as we provide only subset of it [https://bugzilla.redhat.com/show_bug.cgi?id=656335 bug 656335]
* Support for stateless dhcp6 in loader UI - should happen in '''nm-c-e''' first as we provide only subset of it [https://bugzilla.redhat.com/show_bug.cgi?id=656335 bug 656335]


*  
* Check that anaconda works well with new (F15) [[Features/ConsistentNetworkDeviceNaming | Consistent Network Device Naming ]]


* For media installs sshd can be started uselessly without networking - [https://bugzilla.redhat.com/show_bug.cgi?id=643738 bug 643738]
* For media installs sshd can be started uselessly without networking - [https://bugzilla.redhat.com/show_bug.cgi?id=643738 bug 643738]
Line 87: Line 84:


== Wireless ==
== Wireless ==
Passing SSID and WEP key with [[Anaconda/Network#boot | boot parameters]] or [[Anaconda/Network#kickstart | kickstart]] is supported in Fedora 14. Other methods of authentication can be set in [[Anaconda/Network#gui | GUI]] using '''nm-c-e''', although there are some issues with AP selection which should be solved with integration of '''NetworkManager Applet'''.


Status updates can be found in comments of [https://bugzilla.redhat.com/show_bug.cgi?id=473803 bug 473803]
Status updates can be found in comments of [https://bugzilla.redhat.com/show_bug.cgi?id=473803 bug 473803]
or on feature page [[Anaconda/Features/WirelessSupport | Support wireless networking during installation]].
or on feature page [[Anaconda/Features/WirelessSupport | Support wireless networking during installation]].
Passing SSID and WEP key with [[Anaconda/Network#boot | boot parameters]] or [[Anaconda/Network#kickstart | kickstart]] is supported in Fedora 14. Other forms on authentication can be set in [[Anaconda/Network#gui | GUI]] using '''nm-c-e''', although there are some issues with AP selection which should be solved with integration of '''NetworkManager Applet'''.

Revision as of 15:03, 12 January 2011

Network enablement and network configuration

Two tasks:

  • Network enablement for installer - configure and activate one device to be used during installation, e.g. to get kickstart, packages, or for network-backed storage. It can be configured using boot parameters, or kickstart, or if needed user can be prompted to enable network in loader UI (when fetching kickstart or updates image over network), or in text mode UI and GUI (when setting up network storage (iscsi, fcoe) or network repository). Additional devices can be activated only in GUI, using NetworkManager Connection Editor (nm-c-e) by checking Connect Automatically
    • There is a bug requiring an option of activation of additional devices in kickstart.
    • Once the device is activated, it can't be reactivated with changed configuration (e.g. static configuration with fixed nameserver, see bug 504983). I want to offer this possibility in GUI which requires option to activate/disconnect a device on demand (see device activation). In some cases it can be worked around by editing configuration files.
  • Network configuration of target system. Can be done with kickstart or in GUI using nm-c-e. Undesirably, checking Connect Automatically will activate the device after the configuration is applied (see ONBOOT side-effect). We are not aware of any problems caused by this side effect which is invisible to the user (Anaconda doesn't wait for NetworkManager activating the device), but I can imagine there might be some lurking.

As you can see, configuration of installer environment and target system is not well separated. It is because in GUI we use nm-c-e for enablement, and we have to use same configuration files for installer and target system configuration.

On Live CD, network is configured in Live CD environment using NetworkManager Applet on panel.

Modes of configuration

Boot options

These anaconda boot options can be used to enable network in loader (e.g. for getting kickstart, updates image, or for network installation): asknetwork, dhcpclass, dhcptimeout, dns, essid, ethtool, gateway, ip, ipv6, ksdevice, linksleep, mtu, netmask, nicdelay, noipv4, noipv6, wepkey

Kickstart

Kickstart network command can be used both to enable and configure devices. The behaviour has changed in the course of adoption of NM.

  • RHEL 5 - the first network command from kickstart activates or reactivates (if the device has already been enabled e.g. to get kickstart using configuration given in boot parameters) relevant device with configuration set by the command. Other network commands only set configuration for target system, the devices are not enabled in installer.
  • RHEL 6.0, Fedora 14 - the same as in RHEL 5, but already activated device is not reactivated with configuration set in network command, it is only set for the target system.
  • RHEL 6.1, Fedora 15 - expected behaviour is the same as in RHEL 5 (bug 668395) with option to activate additional devices using new network --activate option (bug 638131). Note that the device from first network command is (re)activated regardless of the option (to keep the behaviour of RHEL 5).

For RHEL 6.0, Fedora 14, and later, devices that are supposed not to be activated in installer and have onboot option set can be activated just before getting packages due to ONBOOT side-effect. We have no reports of problems caused by this, but in some cases activation of the device could cause change of routing table making packages inaccessible.

Loader text UI

Serves for selection and configuration of a network device that will be enabled in loader (which happens if kickstart or updates image should be fetched from network or in case of network installation). It will not be run if the information is provided via boot options or kickstart unless required by boot option asknetwork. Configuration options of this UI are a subset of nm-c-e which is used in GUI.

Once the device is successfully activated, there is no possibility to change its configuration in loader UI (see bug 504983).

TODO screenshots

TODO explain ipv6 options

Text mode UI

TODO limits

Anaconda GUI

TODO limits, problems, need for NM Applet

Editing configuration files

Anaconda communictes with NetworkManager mostly with ifcfg files (nm-c-e stores its configuration there too). It can be handy to edit them directly for debugging or as workaround solution. Files can be edited using shell in virtual terminal tty2 ([Ctrl][Alt][F2]). Their location is /etc/sysconfig/netwrok-scripts/ifcfg-<device name>. The configuration will be applied in installer after the device is disconnected and reactivated. The device is disconnected if its ifcfg file is removed. It will be activated if an ifcfg file will be copied back to its location with ONBOOT=yes set. So configuration of active device for installer environment can be changed this way:

mv /etc/sysconfig/network-scripts/ifcfg-eth0 /tmp
vi /tmp/ifcfg-eth0
mv /tmp/ifcfg-eth0 /etc/sysconfig/network-scripts

At the end of the installation, ifcfg files are copied to target system tree to directory /mnt/sysimage/etc/sysconfig/network-scripts.

Bugs and issues

  • DVD install defaults to ONBOOT=no leaving networking down after reboot - bug 498207. This is rather hot issue. Only devices enabled during install will have set ONBOOT=yes by default. For other devices, the setting has to be configured.

  • No more than one device can be activated in installer with kickstart (e.g.: one NIC for repositories, another for iSCSI). Bug 638181.
  • Reading configuration from iBFT in anaconda instead of passing the task to NetworkManager and dracut. Bug 634016.

  • Configuration of successfully activated device in installer environment can't be changed (related bugs: bug 592856, 504983, 635239). There is no way to disconnect the device and activate it so that changed configuration could be applied (except for workaround by editing configuration files). In desktop, this is done with NetworkManager Applet which offers also selection of access points for wireless connection. I proposed two solutions for GUI on anaconda-devel-list:
  • IPV4_FAILURE_FATAL=yes by default and disabling ipv4 in loader UI or with noipv4 doesn't seem to work, so ipv6 only network configuration is problematic. bug 633815.
  • Support for stateless dhcp6 in loader UI - should happen in nm-c-e first as we provide only subset of it bug 656335

Wireless

Passing SSID and WEP key with boot parameters or kickstart is supported in Fedora 14. Other methods of authentication can be set in GUI using nm-c-e, although there are some issues with AP selection which should be solved with integration of NetworkManager Applet.

Status updates can be found in comments of bug 473803 or on feature page Support wireless networking during installation.