/etc/sysconfig/network-scripts/
directory called ifcfg-brN
, replacing N with the number for the interface, such as 0
.
DEVICE
directive is given an interface name as its argument in the format brN
, where N is replaced with the number of the interface.
TYPE
directive is given an argument Bridge
or Ethernet
. This directive determines the device type and the argument is case sensitive.
IP
address whereas the physical interface configuration file must only have a MAC address (see below).
DELAY=0
, is added to prevent the bridge from waiting while it monitors traffic, learns where hosts are located, and builds a table of MAC addresses on which to base its filtering decisions. The default delay of 30 seconds is not needed if no routing loops are possible.
NM_CONTROLLED=no
should be added to the Ethernet interface to prevent NetworkManager from altering the file. It can also be added to the bridge configuration file.
IP
address:
Example 6.1. Sample ifcfg-br0 Interface Configuration File
DEVICE=br0 TYPE=Bridge IPADDR=192.168.1.1 NETMASK=255.255.255.0 ONBOOT=yes BOOTPROTO=none NM_CONTROLLED=no DELAY=0
/etc/sysconfig/network-scripts/ifcfg-ethX
, where X is a unique number corresponding to a specific interface, as follows:
Example 6.2. Sample ifcfg-ethX Interface Configuration File
DEVICE=ethX TYPE=Ethernet HWADDR=AA:BB:CC:DD:EE:FF BOOTPROTO=none ONBOOT=yes NM_CONTROLLED=no BRIDGE=br0
Note
DEVICE
directive, almost any interface name could be used as it does not determine the device type. TYPE=Ethernet
is not strictly required. If the TYPE
directive is not set, the device is treated as an Ethernet device (unless it's name explicitly matches a different interface configuration file.)
HWADDR
directive will influence the device naming procedure as explained in Chapter 8, Consistent Network Device Naming.
Warning
root
issue the following command:
~]# systemctl network restart
DEVICE=ethX TYPE=Ethernet SLAVE=yes MASTER=bond0 BOOTPROTO=none HWADDR=AA:BB:CC:DD:EE:FF NM_CONTROLLED=no
Note
ethX
as the interface name is common practice but almost any name could be used.
/etc/sysconfig/network-scripts/ifcfg-bond0
, as follows:
DEVICE=bond0 ONBOOT=yes BONDING_OPTS='mode=1 miimon=100' BRIDGE=brbond0 NM_CONTROLLED=noFor further instructions and advice on configuring the bonding module and to view the list of bonding parameters, see the Fedora 20 System Administrator's Reference Guide.
/etc/sysconfig/network-scripts/ifcfg-brbond0
, as follows:
DEVICE=brbond0 ONBOOT=yes TYPE=Bridge IPADDR=192.168.1.1 NETMASK=255.255.255.0 NM_CONTROLLED=no
MASTER=bond0
directive. These point to the configuration file named /etc/sysconfig/network-scripts/ifcfg-bond0
, which contains the DEVICE=bond0
directive. This ifcfg-bond0
in turn points to the /etc/sysconfig/network-scripts/ifcfg-brbond0
configuration file, which contains the IP
address, and acts as an interface to the virtual networks inside the host.
root
issue the following command:
~]# systemctl network restart