Command to display nm-settings-ifcfg-rh manual in Linux: $ man 5 nm-settings-ifcfg-rh
nm-settings-ifcfg-rh - Description of ifcfg-rh settings plugin
NetworkManager is based on the concept of connection profiles that contain network configuration (see nm-settings (5) for details). The profiles can be stored in various formats. NetworkManager uses plugins for reading and writing the data. The plugins can be configured in NetworkManager.conf (5).
The ifcfg-rh plugin is used on the Fedora and Red Hat Enterprise Linux distributions to read/write configuration from/to the traditional /etc/sysconfig/network-scripts/ifcfg-* files. Each NetworkManager connection maps to one ifcfg-* file, with possible usage of keys-* for passwords, route-* for static IPv4 routes and route6-* for static IPv6 routes. The plugin currently supports reading and writing Ethernet, Wi-Fi, InfiniBand, VLAN, Bond, Bridge, and Team connections. Unsupported connection types (such as WWAN, PPPoE, VPN, or ADSL) are handled by keyfile plugin ( nm-settings-keyfile (5)). The main reason for using ifcfg-rh plugin is the compatibility with legacy configurations for ifup and ifdown (initscripts).
The ifcfg-rh config format is a simple text file containing VARIABLE="value" lines. The format is described in sysconfig.txt of initscripts package. Note that the configuration files may be sourced by initscripts , so they must be valid shell scripts. That means, for instance, that # character can be used for comments, strings with spaces must be quoted, special characters must be escaped, etc.
Users can create or modify the ifcfg-rh connection files manually, even if that is not the recommended way of managing the profiles. However, if they choose to do that, they must inform NetworkManager about their changes (see monitor-connection-file in nm-settings (5), and nmcli con (re)load ).
Some ifcfg-rh configuration examples: .
Simple DHCP ethernet configuration: NAME=ethernet UUID=1c4ddf70-01bf-46d6-b04f-47e842bd98da TYPE=Ethernet BOOTPROTO=dhcp DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=no ONBOOT=yes
Simple ethernet configuration with static IP: TYPE=Ethernet BOOTPROTO=none IPADDR=10.1.0.25 PREFIX=24 GATEWAY=10.1.0.1 DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes IPV6_FAILURE_FATAL=no NAME=ethernet-em2 UUID=51bb3904-c0fc-4dfe-83b2-0a71e7928c13 DEVICE=em2 ONBOOT=yes
WPA2 Enterprise WLAN (TTLS with inner MSCHAPV2 authentication): ESSID="CompanyWLAN" MODE=Managed KEY_MGMT=WPA-EAP TYPE=Wireless IEEE_8021X_EAP_METHODS=TTLS IEEE_8021X_IDENTITY=joe IEEE_8021X_PASSWORD_FLAGS=ask IEEE_8021X_INNER_AUTH_METHODS=MSCHAPV2 IEEE_8021X_CA_CERT=/home/joe/.cert/company.crt BOOTPROTO=dhcp DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=no IPV6INIT=no NAME=MyCompany UUID=f79848ff-11a6-4810-9e1a-99039dea84c4 ONBOOT=yes
Bridge and bridge port configuration: ifcfg-bridge: ifcfg-bridge-port: NAME=bridge NAME=bridge007-port-eth0 UUID=4be99ce0-c5b2-4764-8b77-ec226e440125 UUID=3ad56c4a-47e1-419b-b0d4-8ad86eb967a3 DEVICE=bridge007 DEVICE=eth0 STP=yes ONBOOT=yes TYPE=Bridge TYPE=Ethernet BRIDGING_OPTS=priority=32768 BRIDGE=bridge007 ONBOOT=yes BOOTPROTO=dhcp
Bonding configuration: ifcfg-BOND: ifcfg-BOND-slave: NAME=BOND NAME=BOND-slave UUID=b41888aa-924c-450c-b0f8-85a4f0a51b4a UUID=9bb048e4-286a-4cc3-b104-007dbd20decb DEVICE=bond100 DEVICE=eth0 BONDING_OPTS="mode=balance-rr miimon=100" ONBOOT=yes TYPE=Bond TYPE=Ethernet BONDING_MASTER=yes MASTER=bond100 ONBOOT=yes SLAVE=yes BOOTPROTO=dhcp
Team and team port configuration: ifcfg-my_team0: DEVICE=team0 TEAM_CONFIG="< \"device\": \"team0\", \"runner\": , \"ports\": , \"eth2\": <>> >" DEVICETYPE=Team BOOTPROTO=dhcp NAME=team0-profile UUID=1d3460a0-7b37-457f-a300-fe8d92da4807 ONBOOT=yes ifcfg-my_team0_slave1: NAME=team0-slave1 UUID=d5aed298-c567-4cc1-b808-6d38ecef9e64 DEVICE=eth1 ONBOOT=yes TEAM_MASTER=team0 DEVICETYPE=TeamPort ifcfg-my_team0_slave2: NAME=team0-slave2 UUID=94e75f4e-e5ad-401c-8962-31e0ae5d2215 DEVICE=eth2 ONBOOT=yes TEAM_MASTER=team0 DEVICETYPE=TeamPort
The UUID values in the config files must be unique. You can use uuidgen command line tool to generate such values. Alternatively, you can leave out UUID entirely. In that case NetworkManager will generate a UUID based on the file name.
The main differences of NetworkManager ifcfg-rh plugin and traditional initscripts are:
NM_CONTROLLED=yes|no NM_CONTROLLED is NetworkManager-specific variable used by NetworkManager for determining whether the device of the ifcfg file should be managed. NM_CONTROLLED=yes is supposed if the variable is not present in the file. Note that if you have more ifcfg files for a single device, NM_CONTROLLED=no in one of the files will cause the device not to be managed. The profile may not even be the active one.
New variables NetworkManager has introduced some new variable, not present in initscripts, to be able to store data for its new features. The variables are marked as extensions in the tables below.
Semantic change of variables NetworkManager had to slightly change the semantic for a few variables.
• PEERDNS - initscripts interpret PEERDNS=no to mean "never touch resolv.conf". NetworkManager interprets it to say "never add automatic (DHCP, PPP, VPN, etc.) nameservers to resolv.conf".
• ONBOOT - initscripts use ONBOOT=yes to mark the devices that are to be activated during boot. NetworkManager extents this to also mean that this profile can be used for auto-connecting at any time.
• BOOTPROTO - NetworkManager supports traditional values none (static), dhcp . But it also allows additional values to enable new addressing methods. They are autoip for IPv4 link-local addressing using Avahi daemon and shared for connection sharing. When shared is used, NetworkManager assigns the interface 10.42.0.1, or it uses the first static address, if configured.
• HWADDR - initscripts compare the currently set hardware address of a device, while NetworkManager considers the permanent one.
See the next section for detailed mapping of NetworkManager properties and ifcfg-rh variables. Variable names, format and usage differences in NetworkManager and initscripts are documented in the tables below.
ifcfg-rh plugin variables marked with (+) are NetworkManager specific extensions not understood by traditional initscripts.
Table 1. 802-1x setting
Property | Ifcfg-rh Variable | Default | Description |
eap | IEEE_8021X_EAP_METHODS (+) | EAP method for 802.1X authentication. |
Allowed values: "LEAP", "PWD", "TLS", "PEAP", "TTLS", "FAST"
Example: IEEE_8021X_IDENTITY=itsme
Example: IEEE_8021X_PAC_FILE=/home/joe/my-fast.pac
Example: IEEE_8021X_CA_CERT=/home/joe/cacert.crt
Example: IEEE_8021X_SUBJECT_MATCH="Red Hat"
Example: IEEE_8021X_ALTSUBJECT_MATCHES="s1.domain.cc"
Example: IEEE_8021X_CLIENT_CERT=/home/joe/mycert.crt
Allowed values: 0, 1
Allowed values: yes, no
Example: IEEE_8021X_FAST_PROVISIONING="allow-auth allow-unauth"
Allowed values: space-separated list of these values [allow-auth, allow-unauth]
Example: IEEE_8021X_PHASE1_AUTH_FLAGS="tls-1-0-disable tls-1-1-disable"
Allowed values: space-separated list of authentication flags names
Allowed values: "PAP", "CHAP", "MSCHAP", "MSCHAPV2", "GTC", "OTP", "MD5" and "TLS"
Example: IEEE_8021X_INNER_AUTH_METHODS="MSCHAPV2 EAP-TLS"
Allowed values: "EAP-MD5", "EAP-MSCHAPV2", "EAP-GTC", "EAP-OTP" and "EAP-TLS"
Example: IEEE_8021X_PHASE2_SUBJECT_MATCH="Red Hat"
Example: IEEE_8021X_INNER_CLIENT_CERT=/home/joe/mycert.crt
Example: IEEE_8021X_PRIVATE_KEY=/home/joe/mykey.p12
Table 2. bond setting
Property | Ifcfg-rh Variable | Default | Description |
options | BONDING_OPTS | Bonding options. |
Example: BONDING_OPTS="miimon=100 mode=broadcast"
Table 3. bridge-port setting
Property | Ifcfg-rh Variable | Default | Description |
priority | BRIDGING_OPTS: priority= | 32 | STP priority. |
Allowed values: 0 - 63
Allowed values: 1 - 65535
Table 4. bridge setting
Property | Ifcfg-rh Variable | Default | Description |
mac-address | MACADDR (+) | MAC address of the bridge. Note that this requires a recent kernel support, originally introduced in 3.15 upstream kernel) MACADDR for bridges is an NM extension. | |
stp | STP | no | Span tree protocol participation. |
priority | BRIDGING_OPTS: priority= | 32768 | STP priority. |
Allowed values: 0 - 32768
Allowed values: 2 - 30
Allowed values: 1 - 10
Allowed values: 6 - 40
Allowed values: 0 - 1000000
Allowed values: 0 or 1
Table 5. connection setting
Property | Ifcfg-rh Variable | Default | Description |
id | NAME (+) | User friendly name for the connection profile. | |
uuid | UUID (+) | UUID for the connection profile. When missing, NetworkManager creates the UUID itself (by hashing the filename). | |
stable-id | STABLE_ID (+) | Token to generate stable IDs. | |
interface-name | DEVICE | Interface name of the device this profile is bound to. The variable can be left out when the profile should apply for more devices. Note that DEVICE can be required for some connection types. | |
type | TYPE (DEVICETYPE, DEVICE) | Base type of the connection. DEVICETYPE is used for teaming connections. |
Example: TYPE=Ethernet; TYPE=Bond; TYPE=Bridge; DEVICETYPE=TeamPort
Allowed values: Ethernet, Wireless, InfiniBand, Bridge, Bond, Vlan, Team, TeamPort
Example: USERS="joe bob"
Allowed values: -999 to 999
Allowed values: -1 (use global default), 0 (forever) or a positive value
Example: ZONE=Work
Example: GATEWAY_PING_TIMEOUT=5
Allowed values: yes,no,unknown
Allowed values: boolean value or 'rx'
Table 6. dcb setting
Property | Ifcfg-rh Variable | Default | Description |
app-fcoe-flags | DCB_APP_FCOE_ENABLE, DCB_APP_FCOE_ADVERTISE, DCB_APP_FCOE_WILLING | no | FCOE flags. |
Example: DCB_APP_FCOE_ENABLE=yes DCB_APP_FCOE_ADVERTISE=yes
Allowed values: 0 - 7
Allowed values: fabric, vn2vn
Allowed values: 0 - 7
Allowed values: 0 - 7
Example: DCB_PFC_UP=01101110
Example: DCB_PG_ID=1205f173
Example: DCB_PG_PCT=10,5,10,15,10,10,10,30
Example: DCB_PG_UPPCT=7,13,10,10,15,15,10,20
Example: DCB_PG_STRICT=01101110
Example: DCB_PG_UP2TC=01623701
All DCB related configuration is a NetworkManager extension. DCB=yes must be used explicitly to enable DCB so that the rest of the DCB_* variables can apply.
Table 7. dummy setting
Property | Ifcfg-rh Variable | Default | Description |
Table 8. infiniband setting
Property | Ifcfg-rh Variable | Default | Description |
mac-address | HWADDR | IBoIP 20-byte hardware address of the device (in traditional hex-digits-and-colons notation). Note that for initscripts this is the current MAC address of the device as found during ifup. For NetworkManager this is the permanent MAC address. Or in case no permanent MAC address exists, the MAC address initially configured on the device. |
Example: HWADDR=01:02:03:04:05:06:07:08:09:0A:01:02:03:04:05:06:07:08:09:11
Example: PKEY=yes PKEY_ID=2 PHYSDEV=mlx4_ib0 DEVICE=mlx4_ib0.8002
Example: PHYSDEV=ib0
Table 9. ipv4 setting
Property | Ifcfg-rh Variable | Default | Description |
method | BOOTPROTO | none | Method used for IPv4 protocol configuration. |
Allowed values: none, dhcp (bootp), static, ibft, autoip, shared
Example: DNS1=1.2.3.4 DNS2=10.0.0.254 DNS3=8.8.8.8
Example: IPADDR=10.5.5.23 PREFIX=24 IPADDR1=1.1.1.2 PREFIX1=16
Example: GATEWAY=10.5.5.1
Example: IPV4_DNS_PRIORITY=20
Example: DHCP_CLIENT_ID=ax-srv-1
Example: ARPING_WAIT=2
Example: IPV4_DHCP_TIMEOUT=10
Example: DHCP_FQDN=foo.bar.com
Table 10. ipv6 setting
Property | Ifcfg-rh Variable | Default | Description |
method | IPV6INIT, IPV6FORWARDING, IPV6_AUTOCONF, DHCPV6C | IPV6INIT=yes; IPV6FORWARDING=no; IPV6_AUTOCONF=!IPV6FORWARDING, DHCPV6=no | Method used for IPv6 protocol configuration. ignore ~ IPV6INIT=no; auto ~ IPV6_AUTOCONF=yes; dhcp ~ IPV6_AUTOCONF=no and DHCPV6C=yes |
dns | DNS1, DNS2, . | List of DNS servers. NetworkManager uses the variables both for IPv4 and IPv6. | |
dns-search | DOMAIN | List of DNS search domains. | |
addresses | IPV6ADDR, IPV6ADDR_SECONDARIES | List of static IP addresses. |
Example: IPV6ADDR=ab12:9876::1 IPV6ADDR_SECONDARIES="ab12:9876::2 ab12:9876::3"
Example: IPV6_DEFAULTGW=abbe::1
Example: IPV6_DNS_PRIORITY=20
Example: IPV6_PRIVACY=rfc3041 IPV6_PRIVACY_PREFER_PUBLIC_IP=yes
Allowed values: IPV6_PRIVACY: no, yes (rfc3041 or rfc4941); IPV6_PRIVACY_PREFER_PUBLIC_IP: yes, no
Allowed values: IPV6_ADDR_GEN_MODE: eui64, stable-privacy
Example: IPV6_TOKEN=::53
Table 11. macsec setting
Property | Ifcfg-rh Variable | Default | Description |
Table 12. proxy setting
Property | Ifcfg-rh Variable | Default | Description |
method | PROXY_METHOD (+) | none | Method for proxy configuration. For "auto", WPAD is used for proxy configuration, or set the PAC file via PAC_URL or PAC_SCRIPT. |
Allowed values: none, auto
Example: PAC_URL=http://wpad.mycompany.com/wpad.dat
Example: PAC_SCRIPT=/home/joe/proxy.pac
Table 13. team-port setting
Property | Ifcfg-rh Variable | Default | Description |
config | TEAM_PORT_CONFIG | Team port configuration in JSON. See man teamd.conf for details. |
Table 14. team setting
Property | Ifcfg-rh Variable | Default | Description |
config | TEAM_CONFIG | Team configuration in JSON. See man teamd.conf for details. |
Table 15. user setting
Property | Ifcfg-rh Variable | Default | Description |
Table 16. 802-3-ethernet setting
Property | Ifcfg-rh Variable | Default | Description |
port | (none) | The property is not saved by the plugin. | |
speed | ETHTOOL_OPTS | Fixed speed for the ethernet link. It is added as "speed" parameter in the ETHTOOL_OPTS variable. | |
duplex | ETHTOOL_OPTS | Fixed duplex mode for the ethernet link. It is added as "duplex" parameter in the ETHOOL_OPTS variable. | |
auto-negotiate | ETHTOOL_OPTS | Whether link speed and duplex autonegotiation is enabled. It is not saved only if disabled and no values are provided for the "speed" and "duplex" parameters (skips link configuration). | |
mac-address | HWADDR | Hardware address of the device in traditional hex-digits-and-colons notation (e.g. 00:22:68:14:5A:05). Note that for initscripts this is the current MAC address of the device as found during ifup. For NetworkManager this is the permanent MAC address. Or in case no permanent MAC address exists, the MAC address initially configured on the device. | |
cloned-mac-address | MACADDR | Cloned (spoofed) MAC address in traditional hex-digits-and-colons notation (e.g. 00:22:68:14:5A:99). | |
generate-mac-address-mask | GENERATE_MAC_ADDRESS_MASK (+) | the MAC address mask for generating randomized and stable cloned-mac-address. | |
mac-address-blacklist | HWADDR_BLACKLIST (+) | It denies usage of the connection for any device whose address is listed. |
Example: HWADDR_BLACKLIST="00:22:68:11:69:08 00:11:22:11:44:55"
Example: SUBCHANNELS=0.0.b00a,0.0.b00b,0.0.b00c
Allowed values: "qeth", "lcs" or "ctc"
Table 17. 802-11-wireless-security setting
Property | Ifcfg-rh Variable | Default | Description |
key-mgmt | KEY_MGMT (+) | Key management menthod. |
Allowed values: IEEE8021X, WPA-PSK, WPA-EAP
Allowed values: 1, 2, 3, 4
Allowed values: restricted, open, leap
Allowed values: yes, no
Allowed values: CCMP, TKIP
Allowed values: CCMP, TKIP, WEP40, WEP104
Example: WPA_PSK_FLAGS=user
Example: KEY1=s:ahoj, KEY1=0a1c45bc02, KEY_PASSPHRASE1=mysupersecretkey
Table 18. 802-11-wireless setting
Property | Ifcfg-rh Variable | Default | Description |
ssid | ESSID | SSID of Wi-Fi network. |
Example: ESSID="Quick Net"
Allowed values: Ad-Hoc, Managed (Auto) [case insensitive]
Allowed values: a, bg
Example: CHANNEL=6
Example: BSSID=00:1E:BD:64:83:21
Allowed values: default, ignore, enable, disable
Allowed values: default, never, always
The following settings are not supported by ifcfg-rh plugin:
adsl, bluetooth, ppp, pppoe, serial, generic, gsm, cdma, 802-11-olpc-mesh, wimax, vpn, macvlan, vxlan, tun, ip-tunnel
Each secret property in a NetworkManager setting has an associated flags property that describes how to handle that secret. In the fcfg-rh plugin variables for secret flags have a _FLAGS suffix. The variables contain one or more of the following values (space separated). Missing (or empty) *_FLAGS variable means that the password is owned by NetworkManager.
• user - a user-session secret agent is responsible for providing and storing this secret; when it is required, agents will be asked to provide it.
• ask - the associated password is not saved but it will be requested from the user each time it is required.
• unused - in some situations it cannot be automatically determined that a secret is required or not. This flag hints that the secret is not required and should not be requested from the user.