[lug] need routing help with kvm

John Hernandez jph at jph.net
Fri Oct 24 22:56:11 MDT 2014


 Maybe the packet is making it to corp host, but corp host has no
route back to your VM because the echo request has a .122.x source
address (NAT fubar'd?)  Easy way to figure this out would be to get a
pcap (wireshark) on corp host.

On Fri, Oct 24, 2014 at 11:58 AM, Michael J. Hammel
<mjhammel at graphics-muse.org> wrote:
> I'm trying to setup routing for a vm on a host that is on a subnet that
> is on our corp net.  I want the VM to be able to reach the corp net.
> The VM is a KVM guest running CentOS.  The VM host is also running
> CentOS.
>
> The default NAT on the vm (via virt-manager) sets up the VMs subnet as
> 192.168.122.x.  This VM guest is 192.168.122.26.  The vm host is
> 192.168.2.129 and 192.168.122.1.  The .2 gateway to the .1 network is
> 192.168.2.65.  A host on the corp net is 192.168.1.63.
>
> The VM can ping .122 hosts (including the vm host).  It can also ping
> anything on the .2 network (of which the vm host is a member).  It
> cannot reach anything on the .1 network (or anything in the outside
> world, which is on the other side of the .1 network, but I just need
> access to .1 for now).
>
> The VM host can access the VM guests, the .2 network and hosts on .1.
>
> The VM guest's route table is:
> 192.168.122.0  *             255.255.255.0  U   1  0  0 eth1
> default        192.168.122.1 0.0.0.0        UG  0  0  0 eth1
>
> The VM host routes are:
> 192.168.100.0 *            255.255.255.0 U  0    0 0 virbr2
> 192.168.2.0   *            255.255.255.0 U  0    0 0 br0
> 192.168.109.0 *            255.255.255.0 U  0    0 0 virbr1
> 192.168.122.0 *            255.255.255.0 U  0    0 0 virbr0
> link-local    *            255.255.0.0   U  1003 0 0 br0
> default       169.254.0.0  0.0.0.0       UG 0    0 0 br0
> default       192.168.2.65 0.0.0.0       UG 0    0 0 br0
>
> br0 is a bridge to the physical interface on the vm host.  virbr? are
> bridges created via the virt-manager interface.
>
> I've tried all kinds of route changes to the VM and the vm host.  It
> seems the vm host will not route through the 2.65 gateway for the VM
> guest.  I'm not certain at this point if the routing is a problem with
> the route tables in the VM guest and/or VM host or a configuration
> problem with libvirt's network configuration for default.xml.  I've
> tried creating new networks via virt-manager but that didn't do much
> different than what was in default.xml.
>
> Any pointers?
> --
> Michael J. Hammel                                    Principal Software Engineer
> mjhammel at graphics-muse.org                           http://graphics-muse.org
> ------------------------------------------------------------------------------
>                 Everything should be made as simple as possible.
>                     But not simpler.  --  Albert Einstein.
>
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety


More information about the LUG mailing list