KVM network configuration issue

Sander Smeenk ssmeenk at freshdot.net
Fri May 11 11:47:10 UTC 2012


Quoting jurgen.depicker at let.be (jurgen.depicker at let.be):

> -> i didn't want my host to have this external ip available, only VWEB 
> running as guest, so on the host I didn't configure the external IP.  I 
> expected the packets form VWEB to be just passed to the interface.  It 
> didn't work.  I have some ideas about why it may not work, but I can't 
> solve it.  Anyone knows how to do this?

It sounds like what you describe 'should just work'.
Or i am misinterpreting your email. :-)

I run a host system which has one NIC with multiple tagged VLANs, for
each VLAN i create a bridge and KVM just uses that bridge to connect
the vnetN devices.

It looks like this on the host:
| auto eth0
| iface eth0 inet manual
|     post-up /sbin/ip link set dev eth0 up
| 
| auto v-dmz
| iface v-dmz inet manual
|     bridge_ports eth0.10
|     bridge_fd 0
|     bridge_stp off
|     bridge_maxwait 0

Within virt-manager/KVM we specify v-dmz as the network interface,
the vnetN device gets bridged with eth0.10 like so:
| v-dmz       8000.00199977d593   no      eth0.10
|                                         vnet16

And the virtual machine just has a static config for it's NIC:
| auto eth0
| iface eth0 inet static
|     address 172.17.1.2
|     netmask 255.255.255.0
|     gateway 172.17.1.1

Apart from me using VLANs, this should not be different for your setup?


In a different setup i have a /29 of IPs routed to the 'main' IP-address
of my host server. The host server uses a 'numberless bridge setup' to
forward the entire /29 to the virtual machine bridge. This setup is more
complex and might not be what you are looking for, still, the host has
no IP in the /29 and all the IPs in the /29 are usable (no network or
broadcast IPs are lost).


HTH,
-Sander.
-- 
| It is better to regret something you HAVE done,
| than to regret something you HAVEN'T done...
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7  FBD6 F3A9 9442 20CC 6CD2




More information about the ubuntu-server mailing list