Adding Bridged Interfaces
ClearOS is capable of using multiple NICs and bridging the network traffic across them. Great care needs to be exercised when doing this to prevent the creation of network loops.
Bridges can be useful for performing transparent operations or to join multiple network topologies and technologies into the same logical network subnet. This is especially useful for adding wireless networks onto Ethernet networks.
The controls for managing bridges under ClearOS are evolving but the backend technology is the same. We document that here in case you are using an older version of ClearOS or need to understand what is going on in the backend.
The directory which contains the configuration files for each individual NIC is /etc/sysconfig/network-scripts/.
A bridge device will need to be created and existing network cards will be added to that bridge. The virtual bridge interface will handle the elements of the IP stack and devices will be subordinate to that device.
Create the file /etc/sysconfig/network-scripts/ifcfg-br0 using your favorite editor. The file will contain the following:
Now modify all interfaces that you want to exist on this bridge. For this example we add eth2 and eth3, effectively turning them into a switch.
Now modify your network configuration in /etc/clearos/network.conf. Change LANIF to remove all the interfaces that you have bridged and add br0. In this example change:
Leave in any other LAN interfaces you have not bridged.
If your of your interfaces is wireless you may want to edit /etc/hostapd/hostapd.conf and uncomment the line:
Then restart hostapd.
To put this configuration into effect, restart the network service:
service network restart
Then your DHCP server will need to be sorted (Network|Infrastructure|DHCP Server). You will want to delete the settings from the interfaces you have deleted and configure the DHCP server for br0.
At this point, if the DHCP server is not running on br0, you may have to temporarily configure your workstation with a static IP in the same subnet as br0 as your workstation may not be picking up an IP address
In Webconfig, you will see the bridge enumerated. On older versions of ClearOS (5.x) it will show the bridge device and will have the control to modify it. You should NOT modify the bridge using Webconfig in ClearOS 5.x.
To undo the bridge on a running system, not only will you have to undo the edits, but before you remove ifcfg-br0
you will also have to take the bridge down:
brctl delbr br0