Network setup for Hetzner

Ole

Member
May 17, 2013
41
0
6
Hi
I have now tried for 2 days to get the networksolution working as I had in mind.

This is my current config file adn it doent work

# network interface settings
auto lo
iface lo inet loopback


auto eth0
iface eth0 inet static
address 188.40.71.1
netmask 255.255.255.192
gateway 188.40.71.10
broadcast 188.40.71.11
up route add -net 188.40.71.2 netmask 255.255.255.192 gw 188.40.71.10 eth0 | | true
up route add -net 188.40.71.3 netmask 255.255.255.192 gw 188.40.71.10 eth0 | | true
# default route to access subnet


iface vmbr0 inet manual
bridge_ports none
bridge_stp off
bridge_fd 0


auto vmbr1
iface vmbr1 inet static
address 188.40.71.3
netmask 255.255.255.192
bridge_ports none
bridge_stp off
bridge_fd 0


THe idea was like this.. first ip is used for virtulization solution..
second ip is used on one vm
third ip is used on second vm

What is wrong in my config file?

COuld you show it for me in example?
I would be very gratefull.

Best reg

Ole
 
nah you actually dont. you need something like this:

Code:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

auto vmbr0
iface vmbr0 inet static
        address  X
        netmask  X
        gateway  X
        broadcast  X
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0

where you insert the data for your primary ip for the X'es. The additional IPs will be directly assigned to the VMs, using vmbr0 bridged networking. please bear in mind that hetzner requires the VMs to use certain predetermined MAC addresses (which you can request from within the robot) for the additional IPs.
 
Hi

Thank you for suggestions.

I have now on my PVE 2.x display the first ip withthe ip, subnetmask adn gateway that works fine.. but when I try to add the first bridge vmbr0 I get an error..
the control panel say I can not have same gateway on the vmbr0 as on the default eth0

I have a strong feeling that it is someting minot thing that I have missunderstood. when I try to create teh first bridge in the PVE 2.x panel.

Any help? :D
 
On Hetzner, you be able to install proxmox directly from the "installimage"-Script. If you speak german, have a look at my Channel, where i describe howto do this: http://www.youtube.com/user/XStable1

All Networksettings will be made automaticly, you only have to be aware, that in /etc/host the ip-v6 entry is commented out.

Maybe you also find some informations on my wiki.xstable.de.
 
Hi Yes I am aware that I can install the Proxmox directly from installimage and that works just fine

The problem is when I ant ot assign a second ip to a vm. I have tried with creating a bridge but wehn I do this I get that ETh0 is using the primary gateway.
I also tried to created a bridge with ip of the primary eth0 card but ath is nto working.

I am sure tis is easy and fast to create a bridget that uses my secondary public ip but I cant at moment.
A video or a screenshot from the VE2.x panel would be great.

Thansk for all suggestions.
 
you dont need to create any bridges if you use the network/interfaces content I posted above since it already has the vmbr0 you need for all your VMs/CTs
 
Hi, ok I have tried this.. But I will try once again with a clean install of the PVE2.x

The gateway ip shoudl hat be the gateway ip for the Ip I have got from hetzner ?
I got an error on this sinse it is same ip as default ip has..

Regardign the Mac adress I have that in the system from Hetzner for secondary ip..

So when I have doen this by edit the interface file,/etc/network/interfaces.new, rebooted teh proxmox, I should see a eth0 adapter and a vmbr0 adapter after reboot.. ?
What is wrong if I do nto see this ? Last time I tried this setup I could not see the adapters at all after reoot

when this is done adn I create a WM I just choose vmbr0 as interface.. since it is already configured it should work ?

Thanks

Best reg

Ole
 
Yes for all the X'es you put in the respective IP/gateway/netmask data hetzner gave you for your primary IP.

Yes both eth0 and vmbr0 should show up on "ifconfig -a".

You then assign vmbr0 to the VM and during the installation of the OS you have to insert the additional IP as that systems IP. Also in the proxmox GUI you have to make sure the virtual NIC of that VM has the MAC address hetzner gave you for that additional IP.
 
Sorry I am so dumb but how do I do this in the PVE ?

You then assign vmbr0 to the VM and during the installation of the OS you have to insert the additional IP as that systems IP. Also in the proxmox GUI you have to make sure the virtual NIC of that VM has the MAC address hetzner gave you for that additional IP.
 
you edit the network card in the hardware tab of the VM (while its powered down) and put the MAC address you got into the HOST MAC address field
 
Hi I did hte following. I telnet to a clean server adn used teh setup mention mo_
I also added a second vmbr1 in the interface file. savedit adn reboted the proxmox.
I now see 1 eth0 and two vmbr0 and vmbr1 so faar so good :)
I then added a vm and set the hardware details. when I came to the network setup I choosed the vmbr1 and in this window I added the mac adress..
So faar I thought all was good.. so when ai started to install a debin network instalation it could not detect the setting usign the dhcp so I added the info manually like ip and gateway etc.
What I fidn out duringhte instalation is that the instalation would not be complteted since there are some ip/dchp issuee..
Any thought on how I can fix this?

THx

Ole
 
nah you actually dont. you need something like this:

Code:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

auto vmbr0
iface vmbr0 inet static
        address  X
        netmask  X
        gateway  X
        broadcast  X
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0

where you insert the data for your primary ip for the X'es. The additional IPs will be directly assigned to the VMs, using vmbr0 bridged networking. please bear in mind that hetzner requires the VMs to use certain predetermined MAC addresses (which you can request from within the robot) for the additional IPs.

Hey there,

I'm not sure if you're familiar with OVH dedicated servers. This sounds to be similar to what they need as well. I'm having difficulty setting up networking for any of the CT's I set up using Proxmox. Are you familiar enough with them to provide any advice?

Thanks,

Tyler
 
no thats debians network configuration, which goes into /etc/network/interfaces

Well that explains why I haven't seen that anywhere. I'm running CentOS 6. The equivalent would be under /etc/sysconfig/network-scripts and something to the effect of ifcfg-eth0, etc. Correct? Seems I can only get internet connectivity with my CT's if I have ifcfg-eth0 and route-eth0 in that folder. And it seems I have to manually add another file to the VPS when I add IP addresses, which seems rather cumbersome. I'm more or less just playing around right now, trying to learn how it works and I appreciate your insights.

Cheers,

Tyler
 
mmh maybe I didnt state that clear enough, those things go into the /etc/network/interfaces of the host system (proxmox). the container (i.e. your centos) only needs regular (IP/NETWORK/GATEWAY etc) configuration of eth0, which is done in the ifcfg-eth0 file like you mentioned.
 
mmh maybe I didnt state that clear enough, those things go into the /etc/network/interfaces of the host system (proxmox). the container (i.e. your centos) only needs regular (IP/NETWORK/GATEWAY etc) configuration of eth0, which is done in the ifcfg-eth0 file like you mentioned.

Ahhh, forgive me. I thought this was still in the CT's file system. I have looked up the hosts interfaces file and found the same code above. The only part missing was the:

Code:
auto eth0
iface eth0 inet manual

Everything else was already set up to my server's information provided by OVH. OVH uses an IP system where they requires the MAC address be set to match their provided MAC address for the provided IP address. If I provide a ifcfg-eth0 file in the CT's file system, I can get internet access, but adding multiple IP addresses then requires me to put a new ifcfg-eth0:X file for each added IP address? That doesn't seem very user friendly ... or am I missing something in the process?

EDIT:

Here are a couple screen caps showing how I've set it up:

ProxMox Container Networking.png

And this one shows OVH IP Manager:

IP Manager.png

I do appreciate the help and sorry for the relentless questions.

Tyler
 
Last edited:

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!