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:
DEVICE=br0 TYPE="Bridge" ONBOOT="yes" USERCTL="no" BOOTPROTO="static" IPADDR="192.168.11.1" NETMASK="255.255.255.0" BRIDGE_STP="yes"
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.
DEVICE=eth2 TYPE="Ethernet" IPV6INIT="yes" ONBOOT="yes" USERCTL="no" BRIDGE=br0 PROMISC="yes"
DEVICE=eth3 TYPE="Ethernet" IPV6INIT="yes" ONBOOT="yes" USERCTL="no" BRIDGE=br0 PROMISC="yes"
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 (<navigation>Network|Infrastructure|DHCP Server</navigation>). You will want to delete the settings from the interfaces you have deleted and configure the DHCP server for br0.
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.
ifdown br0 brctl delbr br0