CentOS(Oracle Linux) 網卡設定檔參數說明

來源:互聯網
上載者:User

標籤:dia   daemon   logical   tco   logs   interface   script   iter   acea   

About Network Interfaces

Each physical and virtual network device on an Oracle Linux system has an associated configuration file named ifcfg-interface in the /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=yesUSERCTL=noTYPE=EthernetBOOTPROTO=dhcpDEFROUTE=yesIPV4_FAILURE_FATAL=yesIPV6INIT=noNAME="System eth0"UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03HWADDR=08:00:27:16:C3:33PEERDNS=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=08:00:27:16:C3:33IPADDR=192.168.1.101NETMASK=255.255.255.0BROADCAST=192.168.1.255PEERDNS=yesPEERROUTES=yes

The following configuration parameters are 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 that defines the default gateway for the interface is obtained from the DHCP server.

SLAVE

Specifies that this interface is a component of a bonded interface.

TYPE

Interface type.

USERCTL

Whether users other than root can control the state of this 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) 網卡設定檔參數說明

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.