[root@tau]# pwd
/etc/sysconfig
[root@tau]# cat network
NETWORKING=yes
HOSTNAME=tau.phas.ubc.ca
GATEWAY=br0
NTPSERVERARGS=iburst
[root@tau]# pwd
/etc/sysconfig/network-scripts
[root@tau]# cat ifcfg-br0
[root@tau network-scripts]# cat ifcfg-br0
DEVICE=br0
TYPE=Bridge
#HWADDR=E4:1F:13:B6:88:B0
BOOTPROTO=static
IPADDR=142.103.236.2
NETMASK=255.255.255.0
GATEWAY=142.103.236.254
BROADCAST=142.103.236.255
#DNS1=142.103.236.1
#DNS2=142.103.236.14
#DNS3=142.103.1.1
ONBOOT=yes
DELAY=0
USERCTL=no
IPV6INIT=no
PEERDNS=no
[root@tau]# cat ifcfg-br1
DEVICE=br1
TYPE=Bridge
#HWADDR=E4:1F:13:B6:88:B2
BOOTPROTO=static
IPADDR=192.168.1.2
NETMASK=255.255.255.0
BROADCAST=192.168.1.255
ONBOOT=yes
DELAY=0
USERCTL=no
IPV6INIT=no
PEERDNS=no
[root@tau]# cat ifcfg-eth0
cat ifcfg-eth0
DEVICE=eth0
BRIDGE=br0
NM_CONTROLLED=no
HWADDR=E4:1F:13:B6:88:B0
ONBOOT=yes
#DEFROUTE=yes
#IPV4_FAILURE_FATAL=yes
#IPV6INIT=no
#IPV6_AUTOCONF=yes
#NAME="System eth0"
#TYPE=Ethernet
#BOOTPROTO=none
#UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
[root@tau network-scripts]# cat ifcfg-eth1
DEVICE=eth1
BRIDGE=br1
NM_CONTROLLED=no
ONBOOT=yes
HWADDR=E4:1F:13:B6:88:B2
#UUID=9c92fad9-6ecb-3e6c-eb4d-8a47c6f50c04
And on virtual client computer:
[root@w3 sysconfig]# cat network
NETWORKING=yes
HOSTNAME=w3.phas.ubc.ca
[root@w3 network-scripts]# cat ifcfg-eth0
# Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.1.6
NETMASK=255.255.255.0
GATEWAY=192.168.1.254
HWADDR=52:54:00:90:41:04
[root@w3 network-scripts]# cat ifcfg-eth1
# Intel Corporation 82540EM Gigabit Ethernet Controller
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=static
IPADDR=142.103.236.6
NETMASK=255.255.255.0
GATEWAY=142.103.236.254
HWADDR=52:54:00:2C:5C:C6
Notes:
Reference:
linuxtopia.org
The Network Administration Tool (system-config-network) is an easy way to make
changes to the various network interface configuration files (refer to Chapter 5,
Network Configuration for detailed instructions on using this tool).
However, it is also possible to manually edit the configuration files for a
given network interface.
Below is a listing of the configurable parameters in an Ethernet interface
configuration file:
BONDING_OPTS=
sets the configuration parameters for the bonding device, and is used
in /etc/sysconfig/network-scripts/ifcfg-bond (see Section 4.2.2,
“Channel Bonding Interfaces”). These parameters are identical to those
used for bonding devices in /sys/class/net//bonding,
and the module parameters for the bonding driver as described in bonding
Module Directives.
This configuration method is used so that multiple bonding devices can
have different configurations. It is highly recommened to place all of
your bonding options after the BONDING_OPTS directive in ifcfg-.
Do not specify options for the bonding device in /etc/modprobe.d/.conf,
or in the deprecated /etc/modprobe.conf file.
BOOTPROTO=
where is one of the following:
* none — No boot-time protocol should be used.
* bootp — The BOOTP protocol should be used.
* dhcp — The DHCP protocol should be used.
BROADCAST=
where is the broadcast address. This directive is deprecated,
as the value is calculated automatically with ifcalc.
DEVICE=
where is the name of the physical device (except for
dynamically-allocated PPP devices where it is the logical name).
DHCP_HOSTNAME
Use this option only if the DHCP server requires the client to specify a
hostname before receiving an IP address.
DNS{1,2}=
where is a name server address to be placed in /etc/resolv.conf
if the PEERDNS directive is set to yes.
ETHTOOL_OPTS=
where are any device-specific options supported by ethtool.
For example, if you wanted to force 100Mb, full duplex:
ETHTOOL_OPTS="autoneg off speed 100 duplex full"
Instead of a custom initscript, use ETHTOOL_OPTS to set the interface speed
and duplex settings. Custom initscripts run outside of the network init script
lead to unpredictable results during a post-boot network service restart.
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.
GATEWAY=
where is the IP address of the network router or gateway device (if any).
HWADDR=
where is the hardware address of the Ethernet device in the
form AA:BB:CC:DD:EE:FF. This directive must be used in machines containing
more than one NIC to ensure that the interfaces are assigned the correct
device names regardless of the configured load order for each NIC's module.
This directive should not be used in conjunction with MACADDR.
IPADDR=
where is the IP address.
MACADDR=
where is the hardware address of the Ethernet device in the
form AA:BB:CC:DD:EE:FF. This directive is used to assign a MAC address to an
interface, overriding the one assigned to the physical NIC. This directive
should not be used in conjunction with HWADDR.
MASTER=
where is the channel bonding interface to which the Ethernet
interface is linked.
This directive is used in conjunction with the SLAVE directive.
Refer to Section 4.2.2, “Channel Bonding Interfaces” for more information
about channel bonding interfaces.
NETMASK=
where is the netmask value.
NETWORK=
where is the network address. This directive is deprecated, as the
value is calculated automatically with ifcalc.
ONBOOT=
where is one of the following:
* yes — This device should be activated at boot-time.
* no — This device should not be activated at boot-time.
PEERDNS=
where is one of the following:
* 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.
SLAVE=
where is one of the following:
* 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.
This directive is used in conjunction with the MASTER directive.
Refer to Section 4.2.2, “Channel Bonding Interfaces” for more about channel
bonding interfaces.
SRCADDR=
where is the specified source IP address for outgoing packets.
USERCTL=
where is one of the following:
* yes — Non-root users are allowed to control this device.
* no — Non-root users are not allowed to control this device.