From: "Daniel P. Berrange" <berrange@redhat.com>
To: Rajiv Rajaian <rajiv.grid@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: Regarding routed networking with KVM
Date: Tue, 14 Sep 2010 11:51:22 +0100 [thread overview]
Message-ID: <20100914105122.GD16336@redhat.com> (raw)
In-Reply-To: <AANLkTimmyXXOKpOXENQGDX5Lar8aapcWsMB=5bt1=sZr@mail.gmail.com>
On Tue, Sep 14, 2010 at 04:13:09PM +0530, Rajiv Rajaian wrote:
> Thanks for your reply Daniel.
> Suppose I want to create on more VM with static ip address
> 144.68.100.0 on host having ip address 10.2.0.25 then do i need to add
> one more routing table entry by specifying 10.2.0.25 as gateway or
> 10.2.0.20 as previous entry is enough to access that VM?
Each host must have a separate subnet for VMs. So if you have 3
hosts, you'd want to repeat your libvirt network configure using
something like these in the XML
Host A (10.2.0.20): 144.68.100.0/255.255.255.0
Host B (10.2.0.25): 144.68.101.0/255.255.255.0
Host C (10.2.0.30): 144.68.102.0/255.255.255.0
And then on your LAN gateway setup a route for each host's
subnet
# route add -net 144.68.100.0 netmask 255.255.255.0 gw 10.2.0.20
# route add -net 144.68.101.0 netmask 255.255.255.0 gw 10.2.0.25
# route add -net 144.68.102.0 netmask 255.255.255.0 gw 10.2.0.30
> Is there any provision to specify the gateway machine for (virbr1)
> while creating the routed networking with libvirt?
Not with the current design. We require the main LAN gateway to have
static routes added. In the future we might provide an impl based
on Proxy-ARP or IP-subnetting which would simplify this.
> Here the thing is I want to reach VMs running on different host
> machines having same subnet and same default gateway from another
> machine which is running on the LAN. ie VM1 running at Host1 and VM2
> running at Host2 should be accessed from Host3 which is in LAN. Is
> there any other steps I have to do to reach the VMs residing on
> different host machines??
Each host that is running VMs would need its own routed network
with dedicated subnet defined. Once the LAN gateway has static
routes for each subnet, any host on your LAN should be able to
access any VM on any of your hosts, and vica-verca.
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
next prev parent reply other threads:[~2010-09-14 10:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2010-09-14 11:28 ` Rajiv Rajaian
2010-09-14 12:16 ` Daniel P. Berrange
2010-09-14 13:02 ` Rajiv Rajaian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100914105122.GD16336@redhat.com \
--to=berrange@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=rajiv.grid@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox