[SOLVED] Network configuration for KVM on Hetzner

wkpsfbx

New Member
Apr 12, 2015
3
0
1
Alright. I had some trouble formatting this thread, but looks like changing the editor type solved the problem.

So I'm trying to configure my dedicated server which is on Hetzner, and I'm having some trouble.

This is what my /etc/network/interfaces looks like right now:

(5.9.11.11 = My main IP
5.9.22.22 = My additional IP)
The IPs have obviously been changed to made-up ones.

Code:
 #Loopback device:
auto lo
iface lo inet loopback

 device: eth0
auto  eth0
iface eth0 inet static
  address   5.9.11.11
  broadcast 5.9.33.33 (provided by Hetzner for the main IP)
  netmask   255.255.255.224 (provided by Hetzner for the main IP)
  gateway   5.9.44.44 (provided by Hetzner for the main IP)

iface eth0 inet6 static
  address 2a01:4f8:161:XXXX::2
  netmask 64
  gateway fe80::1

auto vmbr0
iface vmbr0 inet static
  address  5.9.22.22
  netmask  255.255.255.248 (provided by Hetzner for the additional IP)
  gateway  5.9.11.11 (= the main IP)
  bridge_ports none
  bridge_stp off
  bridge_fd 0

IIRC Hetzner has a rule about having only one MAC address per server, but I have requested and received an additional MAC address for my additional IP, so that should be accounted for (?)
This doesn't seem to be working since I can't SSH into the virtual machines. Any suggestions?

Also please be thorough, I'm still a novice at this.



FINAL EDIT:

Solved by switching to OpenVZ... (read: I gave up)
 
Last edited:
This is what my /etc/network/interfaces looks like right now:

(5.9.11.11 = My main IP
5.9.22.22 = My additional IP)
The IPs have obviously been changed to made-up ones.


Since "broadcast", "gateway" etc. doe not match to each other I assume the addresses "5.9.11.11", "5.9.22.22" etc are only symbolic values and not real ones. If you post the real ones it would be easier to consider the problem.

The "additional IP" will be rather "5.9.11.22" assuming it is in the same subnet.

Since you have an additional MAC you will rather use "bridged" that "routed" - see more about this here:

http://wiki.hetzner.de/index.php/Proxmox_VE/en

The /etc/netword/interfaces in the host would be like this (ipv6 omitted):

Code:
 #Loopback device:
auto lo
iface lo inet loopback


iface eth0 inet manual


auto vmbr0
iface vmbr0 inet static
  address  5.9.11.11
  netmask  255.255.255.224
  gateway  5.9.11.1
  bridge_ports eth0
  bridge_stp off
  bridge_fd 0

The settings can be done easily by Proxmox-WEB GUI (recommended!): Host -> Network

They become effect after Proxmox host restart


In the guest you have (if LINUX using /etc/network/interfaces):

Code:
 #Loopback device:
auto lo
iface lo inet loopback


auto  eth0
iface eth0 inet static
  address  5.9.11.22
  netmask  255.255.255.224
  gateway  5.9.11.1
 
Since "broadcast", "gateway" etc. doe not match to each other I assume the addresses "5.9.11.11", "5.9.22.22" etc are only symbolic values and not real ones. If you post the real ones it would be easier to consider the problem.

The "additional IP" will be rather "5.9.11.22" assuming it is in the same subnet.

Since you have an additional MAC you will rather use "bridged" that "routed" - see more about this here:

http://wiki.hetzner.de/index.php/Proxmox_VE/en

The /etc/netword/interfaces in the host would be like this (ipv6 omitted):

Code:
 #Loopback device:
auto lo
iface lo inet loopback


iface eth0 inet manual


auto vmbr0
iface vmbr0 inet static
  address  5.9.11.11
  netmask  255.255.255.224
  gateway  5.9.11.1
  bridge_ports eth0
  bridge_stp off
  bridge_fd 0

The settings can be done easily by Proxmox-WEB GUI (recommended!): Host -> Network

They become effect after Proxmox host restart


In the guest you have (if LINUX using /etc/network/interfaces):

Code:
 #Loopback device:
auto lo
iface lo inet loopback


auto  eth0
iface eth0 inet static
  address  5.9.11.22
  netmask  255.255.255.224
  gateway  5.9.11.1

Hey,

Thanks for the reply.

It seems that leaving the host eth0 configuration at that state causes the host to become unreachable after reboot. No worries though, not much progress was lost, but I wonder what went wrong?