Tomasz Chmielewski
2014-Feb-25 00:40 UTC
[libvirt-users] assigning a single IP to the guest with "typical" hosting provider
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
Alvaro Miranda Aguilera
2014-Feb-25 03:20 UTC
Re: [libvirt-users] assigning a single IP to the guest with "typical" hosting provider
I think you should create a normal bridge, and use that bridge with the guest. say create a br0, put the physical interface in that br0, say eth0 you put the ip on br0, and the host will be reachable, then the extra ip on the guest, and that should work. On Tue, Feb 25, 2014 at 1:40 PM, Tomasz Chmielewski <mangoo@wpkg.org> wrote:> 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 > > _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users >
Stephan Sachse
2014-Feb-25 09:50 UTC
Re: [libvirt-users] assigning a single IP to the guest with "typical" hosting provider
"[...] a virtual MAC address needs to be requested for each single IP address via the Hetzner Robot and assigned to the guest NIC [...]" http://wiki.hetzner.de/index.php/Netzkonfiguration_CentOS/en#Bridged /stephan -- Software is like sex, it's better when it's free!
Tomasz Chmielewski
2014-Feb-25 12:03 UTC
Re: [libvirt-users] assigning a single IP to the guest with "typical" hosting provider
On Tue, 25 Feb 2014 10:50:25 +0100 Stephan Sachse <ste.sachse@gmail.com> wrote:> "[...] a virtual MAC address needs to be requested for each single IP > address via the Hetzner Robot and assigned to the guest NIC [...]" > > http://wiki.hetzner.de/index.php/Netzkonfiguration_CentOS/en#BridgedYes, that's it. It was not mentioned in English docs here: http://wiki.hetzner.de/index.php/KVM_mit_libvirt/en But was only mentioned in the German ones here: http://wiki.hetzner.de/index.php/KVM_mit_libvirt Über den Hetzner Robot können jedoch für einzelne Zusatz-IPs separate (virtuelle) MAC-Adressen beantragen werden, die bei einem Bridge-Setup dann für die Netzwerkkarten der VMs konfiguriert werden müssen. -- Tomasz Chmielewski http://wpkg.org
Seemingly Similar Threads
- Re: assigning a single IP to the guest with "typical" hosting provider
- no connectivity to some hosts behind tinc for the first few seconds
- no connectivity to some hosts behind tinc for the first few seconds
- Re: [libvirt] LXC, user namespaces and systemd
- XCP Debian 7 - Routed mode