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=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:

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.

文档来源:

https://docs.oracle.com/cd/E37670_01/E41138/html/ol_about_netconf.html

[THE END]

CentOS(Oracle_Linux)系统网卡配置文件参数详解的更多相关文章

  1. Linux网卡配置文件 参数详解

    之所以弄这玩意儿是图个清晰方便,最近这段时间弄了好十来次虚拟机网络了ubuntu,centos,rhat7各种折腾,其实把网上各种命令行下的攻略折腾最后关键无非都是对/etc/sysconfig/ne ...

  2. Nginx 主配置文件参数详解

    Nginx 主配置文件参数详解 Nginx 安装完毕后,会有响应的安装目录,安装目录里 nginx.conf 为 nginx 的主配置文件, ginx 主配置文件分为 4 部分,main(全局配置). ...

  3. sshd_config 配置文件参数详解

    sshd_config配置详解 名称sshd_config - OpenSSH SSH 服务器守护进程配置文件 大纲/etc/ssh/sshd_config 描述sshd(8) 默认从 /etc/ss ...

  4. compose配置文件参数详解

    转自:https://www.cnblogs.com/jsonhc/p/7814138.html 本文介绍compose配置文件参数的使用,熟练编写compose文件 [root@docker lnm ...

  5. Linux学习之Centos(三)------系统文件目录及含义详解

    Linux学习之Centos 之三------文件目录及含义 在了解了每个文件的相关种类与属性,以及了解了如何更改文件属性/权限的相关信息后,再来要了解的就是, 为什么每套Linux distribu ...

  6. nginx配置文件参数详解

    nginx配置文件主要分为4部分:main(全局设置)    main部分设置的指令将影响其他所有设置server(主机设置)server部分的指令主要用于指定主机和端口upstream(负载均衡服务 ...

  7. <正则吃饺子> :关于redis配置文件参数详解

    来源于网络博文,感谢作者的分享,转载只为学习,方便查找,原文地址:http://blog.csdn.net/ljl890705/article/details/51540427 Redis是一个应用非 ...

  8. linux rsync配置文件参数详解

    一.全局参数 在[moudle]之前的参数都是全局参数,也可以在全局参数下定义部分模块参数,这时该参数的值就是所有模块的默认值. port:指定后台程序使用的端口号,默认是873 logfile:指定 ...

  9. mysql配置文件参数详解

    (一) [client]port = 3306socket = /tmp/mysql.sock [mysqld]port = 3306socket = /tmp/mysql.sock basedir ...

随机推荐

  1. Windows bat脚本的for语句

    Windows bat脚本的for语句基本形态如下: 在cmd窗口中:for %I in (command1) do command2 在批处理文件中:for %%I in (command1) do ...

  2. 一文透彻掌握 Python 编码问题

    一.当我说字符时,我在说什么? 当我们提起字符串时,每个程序员都能理解到,我们说的是一个字符序列.但是,当我们说字符时,很多人就困惑了. 写在纸上的字符很容易辨识,但是为了将不同的字符在计算机中标识出 ...

  3. PAT乙级1011

    题目链接 https://pintia.cn/problem-sets/994805260223102976/problems/994805312417021952 题解 很明显这题是考数值范围的,i ...

  4. 布隆算法(BloomFilter)

          BloomFilter算法,是一种大数据排重算法.在一个数据量很大的集合里,能准确断定一个对象不在集合里:判断一个对象有可能在集合里,而且占用的空间不大.它不适合那种要求准确率很高的情况, ...

  5. Date 对象

    JavaScript Date 对象 Date 对象 Date 对象用于处理日期与时间. 创建 Date 对象: new Date() 以下四种方法同样可以创建 Date 对象: var d = ne ...

  6. prompt不生效之解决

    配置文件路径: /data/mysql/mysql3306/my.cnf [client]port = 3306 [mysql]auto-rehashprompt="\\u@\\h:\\p ...

  7. 几台WEB经常宕机,求分析原因

    几台WEB服务器经常宕机,平时运行得好好的,负载也都在2以下,偶尔会突然负高上去就宕机,init 6也无法重启成功 只能echo 'b'>/proc/sysrq-trigger 硬重启才行,dm ...

  8. Acwing-198-反素数(约数, 数学)

    链接: https://www.acwing.com/problem/content/200/ 题意: 对于任何正整数x,其约数的个数记作g(x),例如g(1)=1.g(6)=4. 如果某个正整数x满 ...

  9. Vim常用插件命令手册

    此文章记录了,笔者使用的插件中的主要命令. junegunn/vim-plug :PlugInstall 安装插件 :PlugClean 清理插件 :PlugUpgrade 升级插件管理器 :Plug ...

  10. php+大文件管理

    用过浏览器的开发人员都对大文件上传与下载比较困扰,之前遇到了一个php文件夹上传下载的问题,无奈之下自己开发了一套文件上传控件,在这里分享一下.希望能对你有所帮助.此控件PC全平台支持包括mac,li ...