An other hetzner dedicated network issue.

ozgurerdogan

Renowned Member
May 2, 2010
612
5
83
Bursa, Turkey, Turkey
For last two days I am trying to figure out why vm can not reach to internet. Server is dedicated in hetzner. On their page http://wiki.hetzner.de/index.php/Proxmox_VE/en they say;
KVM/Routed
  • Advantages: Almost any operating system can be installed. Several IP addresses may be used on one VM. The VM requires no modification.
  • Disadvantages: IP configuration cannot be obtained via DHCP. Point-to-point setup is required for IP addresses from different networks.

And I want to use more then one ip on a VM so I prefered KVM/Route. And I did all written here. But vm can not reach to internet. http://wiki.hetzner.de/index.php/Proxmox_VE/en#Network_configuration_host_system_KVM.2FRouted

My main ip is 78.46.77.145
And additinal ip I got later
Subnet:
46.4.230.160 /29
Mask:
255.255.255.248
Broadcast:
46.4.230.167
Usable IP addresses:
46.4.230.161 to 46.4.230.166


Ok here is host config - /etc/network/interfaces :


auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 78.46.77.145
netmask 255.255.255.255
gateway 78.46.77.129
pointopoint 78.46.77.129
broadcast 78.46.77.159

auto vmbr0
iface vmbr0 inet static
address 78.46.77.145
netmask 255.255.255.255
bridge_ports none
bridge_stp off
bridge_fd 0
up ip route add 46.4.230.160/32 dev vmbr0
up ip route add 46.4.230.161/32 dev vmbr0
up ip route add 46.4.230.162/32 dev vmbr0
up ip route add 46.4.230.163/32 dev vmbr0
up ip route add 46.4.230.164/32 dev vmbr0
up ip route add 46.4.230.165/32 dev vmbr0
up ip route add 46.4.230.166/32 dev vmbr0
up ip route add 46.4.230.167/32 dev vmbr0


And this is centos 6.4 vm config - /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
UUID=5b772859-e283-4b41-8265-cl57bla4bBee
ONB00T=yes
NM_CONTROLLED=yes
BOOTPROTO=none
HWADDR=ca:5e:59:3e:lf:9c
POINTOPOINT=78.46.77.145
DNS1=213.133.98.98
DNS2=213.133.99.99
DNS3=213.133.100.100
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=eth0
USERCTL=no
IPADDR=46.4.230.161
NETMASK=255.255.255.255
GATEWAY=79.46.77.145


But vm can not reach to internet. Also when I ping 46.4.238.161 from outside, I am getting host is unreachable.
 
Hi,

first of all: why do you bind the IPs on the host? If you're using a bridged network, you have to configure the IP settings inside the VM not on the host system.

Additionally, why do you bind 46.4.230.167? The /29 subnet ends with 46.4.230.166, you can't use the broadcast address. Last but not least, it's a /29 and not a /32 subnet.

In addition to this, you're using the wrong network configuration inside the VM. You're using a IP from the /29 subnet and configured the gateway of the main server ip address. The subnetmask seems to be wrong, too.
 
Hi,

first of all: why do you bind the IPs on the host? If you're using a bridged network, you have to configure the IP settings inside the VM not on the host system.

Additionally, why do you bind 46.4.230.167? The /29 subnet ends with 46.4.230.166, you can't use the broadcast address. Last but not least, it's a /29 and not a /32 subnet.

In addition to this, you're using the wrong network configuration inside the VM. You're using a IP from the /29 subnet and configured the gateway of the main server ip address. The subnetmask seems to be wrong, too.

They described so at http://wiki.hetzner.de/index.php/Proxmox_VE/en#Network_configuration_host_system_KVM.2FRouted I want to use routed network.
 
Ok I found correct way, in host :
# /etc/network/interfaces
### Hetzner Online AG - installimage
# Loopback device:
auto lo
iface lo inet loopback
#
# device: eth0
auto eth0
iface eth0 inet static
address 78.46.77.145
netmask 255.255.255.255
pointopoint 78.46.77.129
gateway 78.46.77.129


auto vmbr1
iface vmbr1 inet static
address 46.4.230.166
netmask 255.255.255.248
bridge_ports none
bridge_stp off
bridge_fd 0




And in vm:
DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
DNS1=213.133.98.98
NAME=eth0
IPADDR=46.4.230.161
NETMASK=255.255.255.0
GATEWAY=46.4.230.166


I had to spend one usable ip but it is pingable finally :)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!