标签:dia daemon logical tco logs interface script iter acea
Each physical and virtual network device on an Oracle Linux system has an associated configuration file named ifcfg- in the 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 are two configuration files for Ethernet interfaces, ifcfg-eth0 and ifcfg-eth1, and one for the loopback interface, ifcfg-lo. The system reads the configuration files at boot time to configure the network interfaces.
The following are sample entries from an ifcfg-eth0 file for a network interface that obtains its IP address using the Dynamic Host Configuration Protocol (DHCP):
DEVICE="eth0" NM_CONTROLLED="yes" ONBOOT=yes USERCTL=no TYPE=Ethernet BOOTPROTO=dhcp DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth0" UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 HWADDR=08:00:27:16:C3:33 PEERDNS=yes PEERROUTES=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=yes USERCTL=no TYPE=Ethernet BOOTPROTO=none DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth0" UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 HWADDR=08:00:27:16:C3:33 IPADDR=192.168.1.101 NETMASK=255.255.255.0 BROADCAST=192.168.1.255 PEERDNS=yes PEERROUTES=yes
The following configuration parameters are typically used in interface configuration files:
BOOTPROTOHow the interface obtains its IP address:
bootpBootstrap Protocol (BOOTP).
dhcpDynamic Host Configuration Protocol (DHCP).
noneStatically configured IP address.
BROADCASTIPv4 broadcast address.
DEFROUTEWhether this interface is the default route.
DEVICEName of the physical network interface device (or a PPP logical device).
HWADDRMedia access control (MAC) address of an Ethernet device.
IPADDRIPv4 address of the interface.
IPV4_FAILURE_FATALWhether the device is disabled if IPv4 configuration fails.
IPV6_FAILURE_FATALWhether the device is disabled if IPv6 configuration fails.
IPV6ADDRIPv6 address of the interface in CIDR notation. For example: IPV6ADDR="2001:db8:1e11:115b::1/32"
IPV6INITWhether to enable IPv6 for the interface.
MASTERSpecifies the name of the master bonded interface, of which this interface is slave.
NAMEName of the interface as displayed in the Network Connections GUI.
NETMASKIPv4 network mask of the interface.
NETWORKIPV4 address of the network.
NM_CONTROLLEDWhether the network interface device is controlled by the network management daemon, NetworkManager.
ONBOOTWhether the interface is activated at boot time.
PEERDNSWhether the /etc/resolv.conf file used for DNS resolution contains information obtained from the DHCP server.
PEERROUTESWhether the information for the routing table entry that defines the default gateway for the interface is obtained from the DHCP server.
SLAVESpecifies that this interface is a component of a bonded interface.
TYPEInterface type.
USERCTLWhether users other than root can control the state of this interface.
UUIDUniversally unique identifier for the network interface device.
From: http://docs.oracle.com/cd/E37670_01/E41138/html/ol_about_netconf.html
CentOS(Oracle Linux) 网卡配置文件参数说明
标签:dia daemon logical tco logs interface script iter acea
原文地址:http://www.cnblogs.com/lausaa/p/6655971.html