Hi Proxmox community!
I've been reading and found alot of examples but not the solution I'm looking for. (Or at least I was not able to solve my problem with the examples)
I ordered 1 ip at hetzner and a few days later another few. First one works but can't seem to get the second with different subnet to work in a vm on proxmox.
I would like to know how to setup the interface on a proxmox host at Hetzner having single ip's from different subnets.
This works:
Now I would like to add this additional ip to above config so I can use that ip also for a vm:
ip 95.216.120.2
gw 95.216.120.1
mask 255.255.255.240
broadcast 95.216.120.15
( When just adding "up ip route..." will break the first one. )
Hope this example will help others to.
Thanks in advance!!
I've been reading and found alot of examples but not the solution I'm looking for. (Or at least I was not able to solve my problem with the examples)
I ordered 1 ip at hetzner and a few days later another few. First one works but can't seem to get the second with different subnet to work in a vm on proxmox.
I would like to know how to setup the interface on a proxmox host at Hetzner having single ip's from different subnets.
This works:
Code:
### Hetzner Online GmbH installimage
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
auto enp0s31f6
iface enp0s31f6 inet static
address 95.216.30.81
netmask 255.255.255.192
gateway 95.216.30.65
pointopoint 95.216.30.65
# for single-IPs
auto vmbr0
iface vmbr0 inet static
address 95.216.30.81
netmask 255.255.255.255
bridge_ports none
bridge_stp off
bridge_fd 0
bridge_maxwait 0
up ip route add 95.216.30.111/32 dev vmbr0
Now I would like to add this additional ip to above config so I can use that ip also for a vm:
ip 95.216.120.2
gw 95.216.120.1
mask 255.255.255.240
broadcast 95.216.120.15
( When just adding "up ip route..." will break the first one. )
Hope this example will help others to.
Thanks in advance!!