IFCFG(5)

NAME
ifcfg - common elements of network interface configuration

SYNOPSIS
/etc/sysconfig/network/ifcfg-*

VARIABLES
The following is a list of variables that can be put in the configuration file, with an example in parentheses. * marks the default. For the meaning of suffix, see the section Multiple addresses.

STARTMODE {manual*|auto|hotplug|ifplugd|off}
    Choose when the interface should be set up.
    manual
        Interface will be set up if ifup is called manually (without option boot or hotplug)
    auto
        Interface will be set up as soon as it is available (and service network was started). This either happens at boot time when network is starting or via hotplug when a interface is added to the system (by adding a device or loading a driver). To be backward compliant onboot, on and boot are aliases for auto.
    hotplug
        This mode is nearly the same as auto. The difference between auto and hotplug is that the latter does not make rcnetwork fail if the interface cannot be brought up.
    ifplugd
        The interface will be controlled from ifplugd. At initial ifup only iflugd will be started for this interface. Then if ifplugd detects a link if calls ifup again which finally sets the interface up. See also variable IFPLUGD_PRIORITY below.
    off Will never be activated.

IFPLUGD_PRIORITY
    If there multiple interfaces have STARTMODE=ifplugd and a nonzero priority, only one of them will be set up at a time. Everytime one of these interfaces is (un)plugged the interface with highest priority (and plugged cable) will be set up.

BOOTPROTO {static*|dhcp|autoip|dhcp+autoip|6to4}
    Setup protocol. If missing or static, a fixed address is used. Fixed addresses may also be configured together with dhcp. Use 6to4 to set up IPv6 tunnel interfaces running in the "6to4" mode. See also ifcfg-tunnel(5).

IPADDR[suffix] {IPv4|IPv6}[/PREFIXLEN]
    IP address, either IPv4 or IPv6. If you need more than one IP address see section Multiple addresses below. If no address is configured the interface will just be activated (UP).

PREFIXLEN[suffix]
    Number of bits in IPADDR that form the network address. Alternatively add prefixlength to IPADDR or use NETMASK.

NETMASK[suffix]
    Network mask. Alternatively add prefixlength to IPADDR or use PREFIXLEN.

NETWORK[suffix]
    Obsolete, not used, computed instead.

BROADCAST[suffix]
    Network broadcast. If you omit the broadcast address, it will be calculated from netmask or prefixlength. You can affect the calculation with the variable DEFAULT_BROADCAST in /etc/sysconfig/network/config. See the description there.

LABEL[suffix]
    Each address may be tagged with a label string. For details see manpage of ip

SCOPE[suffix]
    The scope of the area where this address is valid. For details see manpage of ip

MTU hallo

IP_OPTIONS[suffix]
    Any other option you may want to give to the ip command. This string is appended to the command.

REMOTE_IPADDR[suffix]
    The remote IP address of a point to point connection

RUN_POLL_TCPIP {yes*|no}
    Controls running /etc/ppp/poll.tcpip when a dialup connection is established.

PRE_UP_SCRIPT, POST_UP_SCRIPT, PRE_DOWN_SCRIPT and POST_DOWN_SCRIPT
    Here you can hook a script (better: an executable) to perform individual actions before/after the interface is set up or before/after the interface is set down. If you use relative filenames ifup will look for them in /etc/sysconfig/network/scripts but you may use absolute paths as well. They were called scripts, because they usually are scripts, but you may add also binaries here. If they are scripts, they must be made executable. These scripts will be called with nearly the same arguments as ifup. The only difference is that the configuration-name (optional for ifup) is always set with the name determined by getcgf. The configuration name is stored in the variable $CONFIG which may be used inside the ifcfg- configuration file. If BOOTPROTO=dhcp then the post up and pre down scripts will not be executed immediately by ifup/ifdown. Instead dhcpcd calls ifup/ifdown with a special option always after it sets, changes or removes the IP address. Therefore post up scripts will be excuted after the interface is really up which may be much later if dhcp did not get a lease immedialetly. And pre down scripts are called after dhcp shut down the interface (not before as 'pre' would indicate. This is a problem of dhcpcd).

GENERAL VARIABLES
There are some general settings in the file /etc/sysconfig/network/config. If needed you can also set every general variable as an individual variable in the ifcfg-* files.

DEFAULT_BROADCAST

GLOBAL_POST_UP_EXEC

GLOBAL_PRE_DOWN_EXEC

CHECK_DUPLICATE_IP

DEBUG

USE_SYSLOG=

MODIFY_RESOLV_CONF_DYNAMICALLY

MODIFY_NAMED_CONF_DYNAMICALLY

CONNECTION_SHOW_WHEN_IFSTATUS

CONNECTION_CHECK_BEFORE_IFDOWN

CONNECTION_CLOSE_BEFORE_IFDOWN

CONNECTION_UMOUNT_NFS_BEFORE_IFDOWN

CONNECTION_SEND_KILL_SIGNAL

MANDATORY_DEVICES

WAIT_FOR_INTERFACES

FIREWALL

LINKLOCAL_INTERFACES

IFPLUGD_OPTIONS

Please see the description of these variables in
    /etc/sysconfig/network/config.

Multiple addresses
You can extend the variable name IPADDR by any string you like (IPADDR_1, IPADDR-FOO, IPADDRxxx, ...) and use these variables for your IP addresses. If you need some additional parameters for these addresses, then just add the same extension to these variable names.
   IPADDR_AAA=1.2.3.4
   NETMASK_AAA=255.0.0.0
   BROADCAST_AAA=1.2.3.55
   IPADDR_BBB=10.10.2.3/16
   LABEL_BBB=BBB
   and so on ...

You do not need to set a label for any address. But then you should not use ifconfig any longer; go and use ip. If you want to use ifconfig then omit the label for your main address and set a number as label for every additional address.

BUGS
Please report bugs at <http://www.suse.de/feedback>

AUTHOR
Christian Zoz <zoz@suse.de> -- ifup script
Michal Svec <msvec@suse.cz> -- ifup script
Bjoern Jacke -- ifup script
Mads Martin Joergensen <mmj@suse.de> -- ifup manpage
Michal Ludvig <mludvig@suse.cz> -- tunnel support

SEE ALSO
/etc/sysconfig/network/ifcfg.template, ifcfg-bonding(5), ifcfg-tunnel(5), ifcfg-vlan(5), ifcfg-wireless(5), ifup(8).