About Network Interfaces
Each physical and virtual network device on a Oracle Linux system has a associated configuration file named in the ifcfg-interface
/etc/sysconfig/network-scripts
directory, where interface
is the name of the interface. For example:
# cd/etc/sysconfig/network-scripts# ls ifcfg-*ifcfg-eth0 ifcfg-eth1 Ifcfg-lo
In this example, there is the configuration files for Ethernet interfaces, ifcfg-eth0
and ifcfg-eth1
, and one for the loopback inte Rface, ifcfg-lo
. The system reads the configuration files at boot time to configure the network interfaces.
The following is sample entries from ifcfg-eth0
a file for a network interface that obtains its IP address using the Dynamic Host Configuration Protocol (DHCP):
Device="eth0"nm_controlled="Yes"Onboot=Yesuserctl=Notype=Ethernetbootproto=Dhcpdefroute=Yesipv4_failure_fatal=Yesipv6init=NoNAME="System eth0"UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03hwaddr= ,:xx: -: -: C3: -Peerdns=yespeerroutes=yes
If the interface is configured with a static IP address, the file contains entries such as the following:
Device="eth0"nm_controlled="Yes"Onboot=Yesuserctl=Notype=Ethernetbootproto=Nonedefroute=Yesipv4_failure_fatal=Yesipv6init=NoNAME="System eth0"UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03hwaddr= ,:xx: -: -: C3: -ipaddr=192.168.1.101NETMASK=255.255.255.0Broadcast=192.168.1.255Peerdns=yespeerroutes=yes
The following configuration parameters is typically used in interface configuration files:
-
-
BOOTPROTO
-
-
How the interface obtains its IP address:
-
bootp
-
Bootstrap Protocol (BOOTP).
-
dhcp
-
Dynamic Host Configuration Protocol (DHCP).
-
none
-
Statically configured IP address.
-
-
BROADCAST
-
-
IPV4 broadcast address.
-
-
DEFROUTE
-
-
Whether This interface is the default route.
-
-
DEVICE
-
-
Name of the Physical network Interface device (or a PPP logical device).
-
-
HWADDR
-
-
Media access Control (MAC) address of an Ethernet device.
-
-
IPADDR
-
-
IPV4 address of the interface.
-
-
IPV4_FAILURE_FATAL
-
-
Whether The device is disabled if IPV4 configuration fails.
-
-
IPV6_FAILURE_FATAL
-
-
Whether The device is disabled if IPV6 configuration fails.
-
-
IPV6ADDR
-
-
IPV6 address of the interface in CIDR notation. For example:IPV6ADDR="2001:db8:1e11:115b::1/32"
-
-
IPV6INIT
-
-
Whether to enable IPV6 for the interface.
-
-
MASTER
-
-
Specifies the name of the master bonded interface, of which this interface is slave.
-
-
NAME
-
-
Name of the interface as displayed in the Network Connections GUI.
-
-
NETMASK
-
-
IPV4 Network mask of the interface.
-
-
NETWORK
-
-
IPV4 address of the network.
-
-
NM_CONTROLLED
-
-
Whether the network interface device is controlled by the network management daemon NetworkManager
.
-
-
ONBOOT
-
-
Whether the interface is activated at boot time.
-
-
PEERDNS
-
-
Whether the /etc/resolv.conf
file used for DNS resolution contains information obtained from the DHCP server.
-
-
PEERROUTES
-
-
Whether the information for the routing table entry This defines the default gateway for the interface are obtained from th e DHCP server.
-
-
SLAVE
-
-
Specifies that this interface is a component of a bonded interface.
-
-
TYPE
-
-
Interface type.
-
-
USERCTL
-
-
Whether users other than can control the state of this root
interface.
-
-
UUID
-
-
Universally unique identifier for the network interface device.
From:http://docs.oracle.com/cd/e37670_01/e41138/html/ol_about_netconf.html
-
CentOS (Oracle Linux) NIC configuration file parameter description