On Sun, Apr 4, 2010 at 5:47 PM, Dan Johansson <k...@dmj.nu> wrote: > Hi, > > I am new to this list and to KVM (and qemu) so please be gentle with me. > Up until now I have been running my virtualizing using VMWare-Server. Now I > want to try KVM due to some issues with the VMWare-Server and I am having > some troubles with the networking part of KVM. > > This is a small example of what I want (best viewed in a fix-font): > > +-----------------------------------+ > | Host | > | +----------+ eth0 |---- 192.168.1.0/24 > | | eth0|-- + | > | | VM1 eth1|---(---+------- eth1 |---- 192.168.2.0/24 > | | eth2|---(---(---+ | > | +----------+ | | | | > | | | | | > | +----------+ +---(---(--- eth2 |---- 192.168.1.0/24 > | | eth0|---+ | | | > | | VM2 eth1|-------+ +--- eth3 |---- 192.168.3.0/24 > | | eth2|-----------+ | > | +----------+ | > | | > +-----------------------------------+ > > Host-eth0 is only for the Host (no VM) > Host-eth1 is shared between the Host and the VM's (VM?-eth1) > Host-eth2 and Host-eth3 are only for the VMs (eth0 and eth2) > > The Host and the VMs all have fixed IPs (no dhcp or likewise). > In this example th IPs could be: > Host-eth0: 192.168.1.1 > Host-eth1: 192.168.2.1 > Host-eth2: - > Host-eth3: - > VM1-eth0: 192.168.1.11 > VM1-eth1: 192.168.2.11 > VM1-eth2: 192.168.3.11 > VM2-eth0: 192.168.1.22 > VM2-eth1: 192.168.2.22 > VM3-eth2: 192.168.3.22 > > And, yes, Host-eth0 and Host-eth2 are in the same subnet, with eth0 dedicated > to the Host and eth2 dedicated to the VMs. > > In VMWare this was quite easy to setup (three bridged networks).
Its easy with KVM too. You want 3 NICs per VM, so you need to pass the corresponding parameters(including qemu-ifup script) for 3 NICs to each VM. In the host you need to create 2 bridges: say br-eth1 and br-eth2. Make them as the interface on the host in place of the corresponding eth interfaces.(brct addbr br-eth1; ifcfg eth1 0.0.0.0 up; brctl addif br-eth eth1; assign eth1's ip and routes to breth1; same for eth2). In the corresponding qemu-ifup scripts of each interface use bridge=br-ethN (This basicaly translates to brctl addif br-ethN $1, where $ is the tap device created) This should work perfectly fine with your existing NW setup. For a quick reference use: http://www.linux-kvm.org/page/Networking > > Does someone know how I can set this up with KVM/QEMU? > > Regards, > -- > Dan Johansson, <http://www.dmj.nu> > *************************************************** > This message is printed on 100% recycled electrons! > *************************************************** > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- Regards Sudhir Kumar -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html