ifcfg − common elements of network interface configuration
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
Choose when the interface should be set up.
Interface will be set up if ifup is called manually (without option boot or hotplug)
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.
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.
The interface will be controlled from ifplugd. At initial ifup only ifplugd 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.
Nearly like auto, but interfaces with this startmode will never be shut down via rcnetwork stop. ifdown <interface> still works. Use this when you use a root filesystem via network.
Will never be activated.
If there multiple interfaces have STARTMODE=ifplugd and a nonzero priority, only one of them will be set up at a time. Every time one of these interfaces is (un)plugged the interface with highest priority (and plugged cable) will be set up. Default is IFPLUGD_PRIORITY=’0’ causing set up as when the cable is plugged. Note: This is not supported for e.g. bridge interfaces or bridge ports.
Setup protocol. If this variable is empty or missing, it defaults to static.
A fixed addresses specified in IPADDR and related variables and static routing as defined in routes and ifroute-<interface name> files is configured.
dhcp4 dhcp6 dhcp
A DHCPv4, DHCPv6 or both
clients are started to configure the interface. The setup is
considered successful, when at least one dhcp client
configures the interface. Additionally to the dhcp client
configuration, fixed addresses and routes may also be
Static routes without explicit interfaces will also replace routes to the same destination (network) configured by dhcp clients on any interface!
Static routes with explicit interface will also replace routes to the same destination (network) configured by dhcp clients on this interface.
may be used for a IPv4 zeroconf setup or as fall back to autoip if dhcp fails.
to set up IPv6 tunnel interfaces running in the "6to4" mode.
See also ifcfg-tunnel(5) manual page.
For bonding slaves and bridge ports to skip the interface configuration. It is also recommended (instead of static) for interfaces configured with STARTMODE=nfsroot (for nfs- and iscsi-root installation), where the setup is done in the initrd and inconsistencies could break it.
For interfaces with iSCSI Boot Firmware Table (iBFT) firmware, defined in ACPI 3.0b specification, intended to use together with STARTMODE=nfsroot. Causes reading of the iBFT settings (/sys/firmware/ibft) for the interface and override the BOOTPROTO setting internally to dhcp when the origin flag is set to IpPrefixOriginDdhcp (3), otherwise to none.
IP address, either IPv4 or IPv6. You may add /<prefixlength> in both cases and omit NETMASK or PREFIXLEN. If you need more then one IP address use this variable multiple times with different suffixes added. See section Multiple addresses below. If no address is configured the interface will just be activated (UP).
Number of bits in IPADDR that form the network address. Alternatively add a prefix-length to IPADDR or use NETMASK. PREFIXLEN is preferred over NETMASK. but highest priority has a prefix-length added to the IP address in the variable IPADDR.
Network mask. Alternatively add a prefix-length to IPADDR or use PREFIXLEN. This variable is ignored if a prefix-length is specified.
Network broadcast. If you omit the broadcast address, it will be calculated from netmask or prefix-length. You can affect the calculation with the variable DEFAULT_BROADCAST in /etc/sysconfig/network/config. See the description there.
The remote IP address of a point to point connection
Each address may be tagged with a label string. In order to preserve compatibility with Linux-2.0 net aliases, this string must coincide with the name of the device or must be prefixed with the device name followed by colon. This may be useful with Multiple addresses (see below).
The scope of the area where this address is valid. The available scopes are listed in file /etc/iproute2/rt_scopes. Predefined scope values are:
global - the address is globally valid.
site - (IPv6 only) the address is site local, i.e. it is valid inside this site.
link - the address is link local, i.e. it is valid only on this device.
host - the address is valid only inside this host.
Set the maximum transfer unit (MTU) for this interface.
Any other option you may want to give to the ip add add ... command. This string is appended to the command.
Set an individual link layer address (MAC address).
Here you may add any option valid with ip link set up ...
In case ifup cannot determine the interface type properly, you may specify the correct type in this variable to override the behavior and force ifup to handle the interface differently than it detected from system or config. Please always open a bug report when it is required to set the type.
If this variable is not empty ifup will call ethtool with this options. See the ethtool (8) manual page for available options. If the option string starts with a ’-’ (e.g. ’-K iface rx on’), then the second word in the string will be replaced with the current interface name. Otherwise (e.g. ’autoneg off speed 10’) ifup prepends ’-s <interface>’.
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 getcfg. 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 executed after the interface is really up which may be much later if dhcp did not get a lease immediately. And pre down scripts are called after dhcp shut down the interface (not before as ’pre’ would indicate. This is a problem of dhcpcd).
Using this variable you may set up different tunnels. See ifcfg-tunnel (5) manual page.
Needed only for virtual LANs (802.1q). It contains the real interface to use for the vlan interface. See ifcfg-vlan (5) manual page.
BONDING_MASTER, BONDING_SLAVE_*, BONDING_OPTS, BONDING_MODULE_OPTS
These are used to set up interface bonding. See ifcfg-bonding (5) manual page.
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
Please see the description of these variables in /etc/sysconfig/network/config.
You can extend the variable name IPADDR by any string you like. For example IPADDR_1, IPADDR-FOO or IPADDRxxx. 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: BROADCAST, NETMASK, PREFIXLEN, REMOTE_IPADDR, LABEL, SCOPE, IP_OPTIONS.
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.
Please report bugs at <http://www.suse.de/feedback>
<firstname.lastname@example.org> -- ifup script
Michal Svec <email@example.com> -- ifup script
Bjoern Jacke -- ifup script
Mads Martin Joergensen <firstname.lastname@example.org> -- ifup manual page
Michal Ludvig <email@example.com> -- tunnel support
Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.
Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.
Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.
Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.
The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.
Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.
Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.
Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.