HI, I've just begun using libvirt as part of my KVM installation and have been having some confusion regarding networking of my virtual guests. I'm not sure if I should even be sending this to this mailing list and if not please let me know and if possible where I should be sending this inquiry. I understand I can setup a dedicated bridged interface for my guest. But as for the virbr interface which is the default, I'm a little confused about. When using this, does the guest os use the same ip as the host? If so, then how to packets get to the guest instead of the host. I would guess there's an alternate mac address for the guest interface and this is how it gets there but am not certain. Sorry if this seems like a simple question but I'm not very well versed in networking. daveb -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20101116/2ccc8614/attachment.htm>
On Tue, Nov 16, 2010 at 11:51:25AM -0500, David M. Barlieb wrote:> HI, I've just begun using libvirt as part of my KVM installation and > have been having some confusion regarding networking of my virtual > guests. I'm not sure if I should even be sending this to this mailing > list and if not please let me know and if possible where I should be > sending this inquiry. > > I understand I can setup a dedicated bridged interface for my guest. But > as for the virbr interface which is the default, I'm a little confused > about. When using this, does the guest os use the same ip as the host? > If so, then how to packets get to the guest instead of the host. I would > guess there's an alternate mac address for the guest interface and this > is how it gets there but am not certain. Sorry if this seems like a > simple question but I'm not very well versed in networking.This page describes the two commonly used networking setups http://wiki.libvirt.org/page/Networking The virbr0 you get by default is providing NAT forwarding. If you want full bridging to the LAN, then you should probably follow the second set of instructions there, and ignore the virbr0 device Regards, 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 :|
On 17/11/2010, at 3:51 AM, David M. Barlieb wrote:> HI, I?ve just begun using libvirt as part of my KVM installation and have been having some confusion regarding networking of my virtual guests. I?m not sure if I should even be sending this to this mailing list and if not please let me know and if possible where I should be sending this inquiry. > > I understand I can setup a dedicated bridged interface for my guest. But as for the virbr interface which is the default, I?m a little confused about. When using this, does the guest os use the same ip as the host? If so, then how to packets get to the guest instead of the host. I would guess there?s an alternate mac address for the guest interface and this is how it gets there but am not certain. Sorry if this seems like a simple question but I?m not very well versed in networking.Hi Dave, The "default" virtual network that libvirt comes with, has NAT done to it. So, the guests connected through it can get to the outside world, and they get reply packets... but their IP addresses aren't directly visible. Exact same principle as (often) used in home networks these days, where the computers in a person's home have NAT applied to them by their ADSL router. Does that help? By the way, there's documentation around this subject being worked upon here: http://wiki.libvirt.org/page/VirtualNetworking It's very much "work in progress", and that won't be it's final URL. But... it might help anyway. :) (feel free to ask further questions and stuff in regards to that doc. Feedback on the way through is useful. :> ) Regards and best wishes, Justin Clift
? 2010?11?17? 00:51, David M. Barlieb ??:> HI, I?ve just begun using libvirt as part of my KVM installation and > have been having some confusion regarding networking of my virtual > guests. I?m not sure if I should even be sending this to this mailing > list and if not please let me know and if possible where I should be > sending this inquiry. > > I understand I can setup a dedicated bridged interface for my guest. But > as for the virbr interface which is the default, I?m a little confused > about. When using this, does the guest os use the same ip as the host?no, for you use the 'default' virtual network # ps -ef | grep dnsmasq libvirt use dnsmasq to allocate private IP addr for guest automatically. and yes, Daniel and Justin already replied you how the guest could communicate with outside networks. Regards - Osier> If so, then how to packets get to the guest instead of the host. I would > guess there?s an alternate mac address for the guest interface and this > is how it gets there but am not certain. Sorry if this seems like a > simple question but I?m not very well versed in networking. > > *daveb* > > > > _______________________________________________ > libvirt-users mailing list > libvirt-users at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users