Install RPMs
yum install yum-plugin-fastestmirror -y
yum clean all
yum install kvm libvirt --enablerepo=clearos-core
Configure Bridge
• http://www.clearfoundation.com/docs/howtos/network_bridging
1. Add the bridge interface br0 to /etc/clearos/network.conf
# Network mode
MODE="gateway"
# Network interface roles
EXTIF="eth2"
LANIF="br0 eth1"
DMZIF=""
HOTIF=""
2. Create the bridge interface /etc/sysconfig/network-scripts/ifcfg-br0 with:
DEVICE=br0
TYPE="Bridge"
ONBOOT="yes"
USERCTL="no"
BOOTPROTO="static"
IPADDR="192.168.2.1"
NETMASK="255.255.255.0"
STP="off"
3. Add eth0 to the bridge by editing /etc/sysconfig/network-scripts/ifcfg-eth0 with:
DEVICE=eth0
TYPE="Ethernet"
ONBOOT="yes"
USERCTL="no"
BOOTPROTO="none"
BRIDGE=br0
4. Reboot
yum install yum-plugin-fastestmirror -y
yum clean all
yum install kvm libvirt --enablerepo=clearos-core
Configure Bridge
• http://www.clearfoundation.com/docs/howtos/network_bridging
1. Add the bridge interface br0 to /etc/clearos/network.conf
# Network mode
MODE="gateway"
# Network interface roles
EXTIF="eth2"
LANIF="br0 eth1"
DMZIF=""
HOTIF=""
2. Create the bridge interface /etc/sysconfig/network-scripts/ifcfg-br0 with:
DEVICE=br0
TYPE="Bridge"
ONBOOT="yes"
USERCTL="no"
BOOTPROTO="static"
IPADDR="192.168.2.1"
NETMASK="255.255.255.0"
STP="off"
3. Add eth0 to the bridge by editing /etc/sysconfig/network-scripts/ifcfg-eth0 with:
DEVICE=eth0
TYPE="Ethernet"
ONBOOT="yes"
USERCTL="no"
BOOTPROTO="none"
BRIDGE=br0
4. Reboot
Share this post:
Responses (6)
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
Sorry to resurrect an old thread. But I am still confused about this. I am trying to set up KVM and the network changes are confusing me and its further complicated by the fact that my server is headless so whenever I mess up its a major pain for me as I have to unplug the server and move it to where there is a screen.
So currently I have in etc/clearos/network.conf
# cat /etc/network.conf
# Network mode
MODE="standalone"
# Network interface roles
EXTIF="eth0"
LANIF=""
DMZIF=""
HOTIF=""
# Domain and Internet Hostname
DEFAULT_DOMAIN="zzz.org"
INTERNET_HOSTNAME="fs1.zzz.org"
# Extra LANS
EXTRALANS=""
and
cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE="Ethernet"
ONBOOT="yes"
USERCTL="no"
BOOTPROTO="static"
IPADDR="192.168.1.252"
NETMASK="255.255.255.0"
GATEWAY="192.168.1.254"
If I look at http://www.clearfoundation.com/docs/howtos/network_bridging it says in addition to altering the 2 files above I need to alter /etc/firewall but I am on 6.x and this file doesnt exist. So dont know about this.
So in summary I think I need to alter etc/clearos/network.conf so that EXTIF will now equal the bridge i.e
EXTIF="br0"
Create /etc/sysconfig/network-scripts/ifcfg-br0
That containsDEVICE=br0
TYPE="Bridge"
ONBOOT="yes"
USERCTL="no"
BOOTPROTO="static"
IPADDR="192.168.1.252"
NETMASK="255.255.255.0"
BRIDGE_STP="yes"
edit /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE="Ethernet"
ONBOOT="yes"
USERCTL="no"
HWADDR="00:00:00:00:00:00"
BRIDGE=br0
But where do I put the gateway address? What do I do about the etc/firewall file? I seem to remember last time I tried this it didnt accept the gateway address in the ifcfg-br0 file. I know I can probably figure this out but wondered if anyone had done this so that I can just make the change once and hopefully not have to move the server. I should add that the server only has one NIC.
Thanks in advance for any help or suggestions. -
Accepted Answer
The guys at ClearCenter need to review their doc links. That link you posted about bridging is for 5.x and the files/locations for ClearOS stuff are a little different in 6.x. Have a look at this doc. I know nothing about setting up a KVM so I can't help with the rest of the set up. I don't think the gateway goes in the ifcfg- file and it may get set up by the routing. -
Accepted Answer
Paul wrote:
But where do I put the gateway address? What do I do about the etc/firewall file? I seem to remember last time I tried this it didnt accept the gateway address in the ifcfg-br0 file. I know I can probably figure this out but wondered if anyone had done this so that I can just make the change once and hopefully not have to move the server. I should add that the server only has one NIC.
Until about two weeks ago, there was a rather fine manual on how to do this, something mentioning the words "inline" for some configuration. I used the method to get one-nic'ed systems running with it, especially for kvm cases too.
The magic ingredient is one line in /etc/sysconfig/network
NETWORKING=yes
HOSTNAME="clearsystem.system.lan"
NOZEROCONF="yes"
GATEWAYDEV="br0“ <---- THIS IS THE MAGIC LINE!
The current howtos all miss this important information. I had to manually set a default gw. Luckily, one of the oldest linux commands I had to learn.
ifconfig br0 default gw ip.of.your.gateway
Having bridged ethernet on one-nic'ed servers is a blessing for lots of use cases. Should be default, same as installing on a lvm, kinda.
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »