I am working on setting up a KVM environment and normally I just take it for granted that the networking has been set up. I am running into difficulty getting the public IPs accessible from the VMs. Node and VM are running CentOS 7

Here is the current state:

VM:  -> IP on physical node: (pingable)
VM: -> Neighbouring physical node: (pingable)
VM: -> Outside IP: (network unreahable)
Physical Node: -> VM: ( Destination Host Unreachable )
Physical Node: -> Outside: (pingable)
Outside -> Physical Node: (pingable)

I have the Range configured on br1 on the physical node which has eth1 bound to it.

The VM has the bridge network added - and noteable arping from both the VM ( and the Node ( both get the correct answers as expected.

<interface type='bridge'>
  <mac address='52:54:00:84:e5:e1'/>
  <source bridge='br1'/>
  <model type='virtio'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>

As per the DC I am working with guide, on the VM created an /etc/sysconfig/network-scripts/route-eth0 and rule-eth0 file:

# cat route-eth0 
default via dev eth0 table 125

# cat rule-eth0 
from table 125

VM Routes:

# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface U         0 0          0 eth0

Node Routes:

 Kernel IP routing table
    Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface         UG        0 0          0 br0   U         0 0          0 br0 U         0 0          0 eth1 U         0 0          0 br1   U         0 0          0 eth1

Any pointers on what to check or where I may have gone wrong much appreciated.... and just to clarify - no those are not the real IPs, they are just made up for example sake.

Thanks in advance.

  • Also attach "brctl show" output on the host. Is net.ipv4.conf.all.forwarding enabled on the host? Anyhow it seems like what you're trying to achieve is to connect the VM via bridging to an outside network on eth1. Is eth1 part of br1? – ZaphodB Jun 20 '16 at 17:41

Try this sysctl:


You need your bridge working as a "switch" without any routing and NATing. And there is no need to set "net.ipv4.conf.all.forwarding" unless you have NATed virtual networtks too. Standard libvirt iptables rules are working well with NATed connections from the default network to the Internet, but can mess with bridged connections.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.