[libvirt-users] assigning a single IP to the guest with "typical" hosting provider

Tomasz Chmielewski mangoo at wpkg.org
Tue Feb 25 00:40:50 UTC 2014


I have a server with a hosting company, Hetzner.

The servers at this hosting company have a public IP, let's say,
A.B.C.D/255.255.255.x.

Additionally, one can order extra IPs like below:

1) additional subnet (let's say X.Y.Z.0 / 28)

2) single IP (let's say, E.F.G.H)


With additional subnet, assigning the IP to libvirt guest is simple:

- assign X.Y.Z.1 on the host
- assign X.Y.Z.2 to the guest, with X.Y.Z.1 gateway - done, works fine.


However, I'm having problems assigning a single IP to the guest (when
there is no extra subnet on the host, but just an extra IP):

- if I assign E.F.G.H/255.255.255.255 to the host, the IP is reachable
  from the internet

- if I assign E.F.G.H to the guest (with a proper gateway), the guest is
  not able to communicate with the internet.


Which networking mode should I use in this setup? Bridge, macvtap? I've
tried both, without success (i.e. in macvtap mode, arp who-has are
passed from the guest to the gateway, replies received on the host, but
they are not passed to the guest).

Has anyone ever set libvirt with a "typical" hosting provider, when
only an extra IP, from a non-host subnet, is available for a guest?


-- 
Tomasz Chmielewski
http://wpkg.org




More information about the libvirt-users mailing list