SDN, Simple config without DHCP not working

mucfun

New Member
Jan 22, 2024
1
0
1
I tried to add a SDN Zone without dhcp but then there ist no gateway available.

Zone with DHCP disabled
vnet01 in zone with subnet 10.0.0.0/24 and Gateway 10.0.0.1 (tried SNAT activated and deactivated)

Ubuntu VM with fixed ip 10.0.0.10, subnet 10.0.0.0/24 and gateway 10.0.0.1

Would be nice if anyone could help me.
 
I've got the same problem. I wanted to use a separate subnet to test the kea-dhcp server, so no need for the dhcp option.
Created a zone, called private, automatic DHCP disabled. Then a vnet (also called private) in the zone private, not VLAN aware, as this was not needed. As for subnet on ths vnet I have 192.168.2.0/24, gateway 192.168.2.1, and SNAT enabled.

So, not much different from the original poster.

Machines on this private network cannot ping the gateway, and routing to the default gateway, as configured on the machines, does not work.

FYI, I upgraded from a previous Proxmox version and followed all the steps for adding the extra bits for SDN.
 
This is what I have:

root@pve1:/etc/network/interfaces.d# cat sdn
#version:15

auto private
iface private
address 192.168.2.1/24
post-up iptables -t nat -A POSTROUTING -s '192.168.2.0/24' -o vmbr0 -j SNAT --to-source 192.168.2.240
post-down iptables -t nat -D POSTROUTING -s '192.168.2.0/24' -o vmbr0 -j SNAT --to-source 192.168.2.240
post-up iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1
post-down iptables -t raw -D PREROUTING -i fwbr+ -j CT --zone 1
bridge_ports none
bridge_stp off
bridge_fd 0
ip-forward on

root@pve1:/etc/pve/sdn# cat subnets.cfg
subnet: private-192.168.2.0-24
vnet private
gateway 192.168.2.1
snat 1

root@pve1:/etc/pve/sdn# cat vnets.cfg
vnet: private
zone private

root@pve1:/etc/pve/sdn# cat zones.cfg
simple: private
ipam pve
 
Can you post the output of ip route show on the host?
How does the network configuration inside the VM look like?
Can you post the output of qm config <vmid> of the VM that is not working?
 
I found the error, stupid me. For some reason I had in mind that my home network had 192.168.1.0, which is doesn't. It is 192.168.2.0, the same as the private subnet I configured. So now I moved the private network to 192.168.3.0/24 and gateway 192.168.3.1 and now it works fine now.

I came to realize my error when I did the ip route show command on the host, 192.168.2.240 is the IP nr of the host.

So again, stupid me, but thanks for your help in clearing this up.

Kind regards,
Albert
 
  • Like
Reactions: shanreich

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!