public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Regarding routed networking with KVM
@ 2010-09-14  9:58 Rajiv Rajaian
  2010-09-14 10:15 ` Daniel P. Berrange
  0 siblings, 1 reply; 7+ messages in thread
From: Rajiv Rajaian @ 2010-09-14  9:58 UTC (permalink / raw)
  To: kvm

Hi all
I have installed KVM with fedora13 operating system and I have
successfully created guest operating system with virt-install.
Also I have configured routed networking in host machine. Here's my
routed networking configuration

[root@kvmcluster ~]# virsh net-dumpxml routed
<network>
  <name>routed</name>
  <uuid>78b64a7e-48ed-4296-8794-a8450798d283</uuid>
  <forward dev='eth0' mode='route'/>
  <bridge name='virbr1' stp='on' delay='0' />
  <ip address='144.68.100.100' netmask='255.255.255.0'>
    <dhcp>
      <range start='144.68.100.1' end='144.68.100.254' />
    </dhcp>
  </ip>
</network>

Now I can reach the guest VM which is having static ip address
144.68.100.1 from the host machine(kvmcluster)

[root@kvmcluster ~]# ping 144.68.100.1
PING 144.68.100.1 (144.68.100.1) 56(84) bytes of data.
64 bytes from 144.68.100.1: icmp_seq=1 ttl=64 time=0.910 ms


The routing table entry of the host machine looks like this

[root@kvmcluster ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.2.0.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0
144.68.100.0    0.0.0.0         255.255.255.0   U     0      0        0 virbr1
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eth0
0.0.0.0         10.2.0.100      0.0.0.0         UG    0      0        0 eth0

>From the Default gateway machine (10.2.0.100) which is in the same
subnet as that of host machine  I have added a routing table entry as
[root@careserver ~]# route add -net 144.68.100.0 netmask 255.255.255.0
gw 10.2.0.100

Now I can't reach the guest VM with this routing entry.

But when I have added the routing table entry with 10.2.0.20(host
machine's ip) as gateway I can reach the guest VM
[root@careserver ~]# route add -net 144.68.100.0 netmask 255.255.255.0
gw 10.2.0.20

[root@careserver ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.2.0.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0
144.68.100.0    10.2.0.20       255.255.255.0   UG    0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth0
0.0.0.0         10.2.0.1        0.0.0.0         UG    0      0        0 eth0

Why the default gateway machine can't reach the guest VM with
10.2.0.100 as gateway. For each VM whether have to add separate
routing table entry?
Is there any other way to have a common routing table entry. Please
help me to solve this issue


Regards.
Rajiv. R
Project Associate,
CARE , CT Dept,
Anna University Chennai

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-09-14 13:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-14  9:58 Regarding routed networking with KVM Rajiv Rajaian
2010-09-14 10:15 ` Daniel P. Berrange
2010-09-14 10:43   ` Rajiv Rajaian
2010-09-14 10:51     ` Daniel P. Berrange
2010-09-14 11:28       ` Rajiv Rajaian
2010-09-14 12:16         ` Daniel P. Berrange
2010-09-14 13:02           ` Rajiv Rajaian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox