YaST/installation-network

From openSUSE

This is only brief preview of documentation for installation network

Contents

Network setup

There are several places where you can set up network during installation:

  • in bootloader prompt (documented in http://en.opensuse.org/Linuxrc)
  • in the network setup dialog in 1st stage of installation (it appears when you select Add-on product installation or Comunity Repositories setup)
    • if the network is configured here, this configuration is saved to the installed system
  • in 2nd stage in the regular network proposal and configuration dialog
    • network proposal is activated only if there is no configuration yet
  • with autoyast

Reasons to set up network

Why do we need network during installation:

  • inst-sys (installation setup system) is on the network resource (accesible via ftp/http/nfs)
  • network installation software repositories (ftp/http/nfs)
  • network based storage system (iSCSI/nfs)
  • installation via ssh, vnc
  • setting up time via ntp
  • configuring additional (network) software repositories (or editing/enabling repositories from previous system)
  • downloading updates

Types of network control

There are 2 different types of network control:

  • NetworkManager (NM)
  • "usual" (NetControl, ifup, sysconfig)
  • for laptops NM is proposed
  • for others NetControl is used instead
  • in case of NM, all interfaces are proposed to be configured with DHCP
  • in case of NetControl, only the first connected (plugged-in) device is proposed to be configured with DHCP


NetworkManager vs NetControl

NM vs ifplugd

  • ifplugd is a daemon, which sets the interface up when there is carrier (a cable is plugged in, a wireless card is associated with AP)
  • you can setup priority of devices controlled with ifplugd
  • NM has its own implementation for such case
  • NM and ifplugd are mutually conflicting
  • STARTMODE interface parameter states when and how the interface is to be brought up
  • default proposal is STARTMODE=onboot for NM and STARTMODE=ifplugd for NetControl
  • there is special case when root (/) filesystem is on nfs or iSCSI, then the configured interface has STARTMODE=nfsroot (this device should never be brought be down)


Temporary vs persistent network

  • network settings from the installation are saved into installed system and kept, except for the case when you change it in network proposal dialog or by autoyast
  • there is a special case when you can change running network in Internet test dialog

IPv6

Linuxrc: with parameter ipv6only=1 or ipv6=1 you can setup IPv6 based address HostIP=2001:15c0:668e::5/48 and you will have such network configuration from begin of installation (openSUSE 11.1)

Device names, network configuration names

  • configuration name should be based on the device name (example - device eth0 has its configuration in /etc/sysconfig/network/ifcfg-eth0 file)
  • device names come from kernel, syntax is 'devicetype+incremental order number')
  • we can't rely on this because the order number depends on the order of loading kernel modules (and some other rules)
  • because of this, there is udev mechanism to rename devices immediatelly according to some rules (/etc/udev/rules.d/70-persistent-net.rules)
  • you can set your own rule by matching MAC address or busID
  • if any udev rule matches, it is applied, otherwise a new rule is created to remain persistent

Device names in AutoYaST

During AutoYaST installation there are several ways to store persistent interface names:

  • copy rules file from 1st stage
    • when boot up installation system, udev creates default rules file
    • this file (/etc/udev.d/rules/70-persistent-net.rules) is copy into installed system at the end of 1st stage by save_network.ycp
  • using rules from AutoYaST profile

Example:

<networking>
 ...
  <net-udev config:type="list">
   <rule>
    <rule>ATTR{address}</rule>
    <value>08:00:27:07:a2:2d</value>
    <name>eth0</name>
   </rule>
  </net-udev>
 ...
</networking>

This will create /etc/udev/rules/70-persistent-net.rules file (and replace old one!):

# Generated by autoyast
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:07:a2:2d", NAME="eth0"


  • "migration" from old AutoYaST profile (generate rules)
    • if AY profile contains old-style configuration file names (eth-id-$MAC_ADDRESS), YaST will create udev rule from $MAC_ADDRESS and rename file configuration info ethX

Profile example:

<networking>
...
 <interfaces config:type="list">
   <interface>
     <bootproto>dhcp</bootproto>
     <device>eth-id-08:00:27:07:a2:2d</device>
     <name>79c970 [PCnet32 LANCE]</name>
     <startmode>auto</startmode>
     <usercontrol>no</usercontrol>
   </interface>
 </interfaces>
...
</networking>

This will create configuration file /etc/sysconfig/network/ifcfg-eth0 and /etc/udev/rules/70-persistent-net.rules

# Generated by autoyast
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:07:a2:2d", NAME="eth0"