How to set up supplemental IP subnet

tsajuk

New Member
Jan 9, 2009
22
1
1
I have following IP network configuration from my provider (Hetzner):
x1.x2.x3.235 = IP address of the PVE host
x1.x2.x3.225 = IP address of the gateway

y1.y2.y3.32/29 = eight supplemental IP adresses which are routed from the gateway to the IP address of the server x1.x2.x3.235. to be used as IPs by the VMs

I simply can't find a way to enter this network configuration into the PVE network setup. Does someone have a hint?
 
Last edited:
x.x.x.255 would be a broadcast IP unless your subnet mask is 255.255.254.0 or larger...

This is a tough question, basically you're asking your Proxmox VE box to also be a gateway router for this /29 you've been assigned. Hopefully tom or dietmar have a bright idea about how you might deal with that setup.

Perhaps if you had two ethernet interfaces in the system you could assign your /29 to the second ethernet adapter and that would be the interface you'd bridge your venets and veths to?
 
x.x.x.255 would be a broadcast IP unless your subnet mask is 255.255.254.0 or larger...
sorry I mistyped the last byte - corrected now.
:o I'm hopefully on the right way by doing:
  • host: eth0 set to x1.x2.x3.235 mask 255.255.255.240 gw x1.x2.x3.225
  • host: vmbr0 set to y1.y2.y3.38 mask 255.255.255.248 brigde ports none
  • host: the VM's interface ( hopefully tap0 ) is bound to the vmbr0 bridge
  • host: route add -host y1.y2.y3.33 dev vmbr0
  • in VM: eth0 set to y1.y2.y3.33 mask 255.255.255.248 gw y1.y2.y3.38
from the VM I can now ping:
  • y1.y2.y3.33 - o.k.
  • y1.y2.y3.38 - o.k.
  • x1.x2.x3.235 - o.k.
  • x1.x2.x3.225 - fail
from the external internet i can ping:
  • x1.x2.x3.235 - o.k.
  • y1.y2.y3.38 - o.k.
  • y1.y2.y3.33 - fail
:confused:where is the trick? the networks overlap on two nodes but still are disparate???
 
Forget my last post, the setup you posted looks good.

Maybe you can debug using tcpdump (to see where packets gets lost).

- Dietmar
 
Just a guess, but it looks like you need to enable proxy-arp somehow - will test that here on monday.
 
Please try the following:

Code:
echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp

This enable proxy_arp on eth0 and enable external hosts to see your guests.
 
Maybe you can debug using tcpdump (to see where packets gets lost).- Dietmar
Thanks to all. After installing Wireshark I found the hole in the setup. In fact, the problem jumps in my eyes if I read my original post again: my Host doesn't forward IP packets.

Despite a "net.ipv4.conf.default.forwarding=1" in the sysctl.conf the net/ipv4/ip_forward was still 0.
Now I've put
Code:
net.ipv4.conf.all.forwarding=1
net.ipv4.ip_forward = 1
inside as well - and it works.:D
 
  • Like
Reactions: postcd

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!