linux:linux-networking:redhat-ifcfg
ifcfg-ethX
/etc/sysconfig/network-scripts/ifcfg-ethX
Option | Variable(s) | Note |
---|---|---|
Standard Options | ||
DEVICE | ethX | Device name for NIC |
BOOTPROTO | none/bootp/dhcp | For readability reasons, some people use static instead of none |
ONBOOT | yes/no | Turn on at boot time/network startup? |
IPADDR | IP | IP Address |
NETMASK | NM | Netmask |
GATEWAY | GW | Gateway IP address |
USERCTL | yes/no | “yes” Non-root users are allowed to control this device. “no” Non-root users are not allowed to control this device. |
HWADDR | MAC | Specify the real MAC address of the device, to tie it down to it |
ETHTOOL_OPTS | “autoneg off speed 1000 duplex full” | Any device-specific options supported by ethtool. Note: Changing speed or duplex settings almost always requires disabling autonegotiation with the autoneg off option. This needs to be stated first, as the option entries are order-dependent |
Non Standard Options | ||
---|---|---|
METRIC | Metric for the default route using GATEWAY | |
HOTPLUG | yes/no | |
MTU | ||
WINDOW | ||
SCOPE | Set to “scope SCOPE-ID” to set a non-default scope. Supported only on Ethernet with BOOTPROTO=none. | |
SRCADDR | use the specified source address for outgoing packets | |
MACADDR | MAC | Set the MAC to this. Do not use in conjunction with HWADDR |
NOZEROCONF | Set this to not set a route for dynamic link-local addresses over this device. | |
ARP | yes/no | adds 'arp' flag to ifconfig, for use with the ethertap device |
LINKDELAY | time in seconds | Time that the system should pause after the specific interface is enabled. This may be useful if one interface is connected to a switch which has spanning tree enabled and must wait for STP to converge before the interface should be considered usable. |
BRIDGE | br* device | If set, the ethernet device is not assigned an address. It is added to the specified bridge device instead. |
PROMISC | yes/no | enable or disable promiscuous mode |
ALLMULTI | yes/no | enable or disable all-multicast mode |
NAME | A Friendly Name | Only used in front ends, not really necessary |
Bonding Specific | ||
---|---|---|
MASTER | bondX | Specifies master device to bind to. This directive is used in conjunction with the SLAVE directive |
SLAVE | yes/no | “yes” This device is controlled by the channel bonding interface specified in the MASTER directive. “no” This device is not controlled by the channel bonding interface specified in the MASTER directive. |
VLAN Specific | ||
---|---|---|
REORDER_HDR | yes/no | When enabled the VLAN device will move the ethernet header around to make it look exactly like a real ethernet device. This may help programs such as ISC dhcpd which read the raw ethernet packet and make assumptions about the location of bytes. If you don't need it turn it off because there is a small performance penalty. Default is on. |
DHCP Specific | ||
---|---|---|
PERSISTENT_DHCLIENT | yes/no/1/0 | Without this option, or if it is 'no'/'0', and BOOTPROTO=dhcp, dhclient is run for the interface in “one-shot” mode; if the dhcp server does not respond for a configurable timeout, then dhclient exits and the interface is not brought up - the '-1' option is given to dhclient. If PERSISTENT_DHCLIENT=yes, then dhclient will keep on trying to contact the dhcp server when it does not respond - no '-1' option is given to dhclient. |
DHCPRELEASE | yes/no/1/0 | With this option set to 'yes' (1), when a dhcp configured interface is brought down with 'ifdown', the lease will be released. Otherwise, leases are not released. |
DHCLIENT_IGNORE_GATEWAY | yes/no/1/0 | If set to 'yes', it will cause dhclient-script to ignore any $GATEWAY setting that may be in the ifcfg file for this interface. Otherwise, the dhclient session which obtains an ip-address on the same subnet as $GATEWAY will set the default route to be via $GATEWAY, and no other dhclient session will set the default route. |
DNS Specific | ||
---|---|---|
PEERDNS | yes/no | “yes” modify /etc/resolv.conf if the DNS directive is set. If using DHCP, then yes is the default. “no” Do not modify /etc/resolv.conf. |
DNS{1,2} | IP | provide DNS addresses that are dropped into the resolv.conf file if PEERDNS is not set to “no”. |
Deprecated Options | ||
---|---|---|
NETWORK | Deprecated; will be calculated automatically with ipcalc | |
BROADCAST | Deprecated; will be calculated automatically with ipcalc |
linux/linux-networking/redhat-ifcfg.txt · Last modified: by 127.0.0.1