I think my config has problem, VMs can not ping 8.8.8.8

mfaridi

Renowned Member
Oct 17, 2015
83
0
71
This is my config on proxmox 8.2 about interface
Code:
source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

iface lo inet6 loopback

auto eno1
iface eno1 inet static
        address 3.2.1.38/26
        gateway 3.2.1.1
        up route add -net 3.2.1.0 netmask 255.255.255.255 gw 3.2.1.1 dev en01

iface eno1 inet6 static
        address 2a01:4f9:3070:2c03::2/64
       
        gateway fe80::1
        up sysctl -p

auto vmbr0
iface vmbr0 inet static
        address 3.2.1.38/32
        bridge-ports none
        bridge-stp off
        bridge-fd 0

iface vmbr0 inet6 static
        address 2a01:4f9:3070:2c03::2/64/128
        up ip -6 route add 2a01:4f8::/64 dev vmbr0

auto vmbr1
iface vmbr1 inet static
        address 10.10.5.1
        netmask 255.255.255.0
        bridge-ports none
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 2-4094
        post-up echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up   iptables -t nat -A POSTROUTING -s '10.10.5.0/24' -o vmbr0 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '10.10.5.0/24' -o vmbr0 -j MASQUERADE
        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
and this is VM-routes
Code:
iface vmbr0 inet static
        up ip route add  10.10.6.0/29 dev vmbr0
        up ip route add 10.10.4.0/29 dev vmbr0
        up ip route add 10.10.3.0/29 dev vmbr0
        up ip route add 10.10.2.0/29 dev vmbr0


iface vmbr0 inet6 static
        up ip -6 route add 2a01:4f9:3070:2c03::2/64 dev vmbr0
So I my first question : when I create VM from GUI for network, which I must choose, vmbr1 or vmbr0,
for example I want run debian VM
Second question: when I want set IP address of VMs manually, which gateway must set for each VMs?
I want my VMs has more than subnets.

3.2.1.38 is public IP, I want my VM can see internet and can update and install packages.
 
Last edited:
This is my config on proxmox 8.2 about interface
Code:
iface eno1 inet static
        address 3.2.1.38/26
        gateway 3.2.1.1
        up route add -net 3.2.1.0 netmask 255.255.255.255 gw 3.2.1.1 dev en01

iface eno1 inet6 static
        address 2a01:4f9:3070:2c03::2/64
      
        gateway fe80::1
        up sysctl -p

auto vmbr0
iface vmbr0 inet static
        address 3.2.1.38/32
        bridge-ports none
        bridge-stp off
        bridge-fd 0

iface vmbr0 inet6 static
        address 2a01:4f9:3070:2c03::2/64/128
        up ip -6 route add 2a01:4f8::/64 dev vmbr0
You have the same IPs configured on eno1 and vmbr0, and vmbr0 isn't connected to the interface, AND you have a typo in the route (dev en01 instead of eno1). Also, it doesn't seem like you have routable ipv6 if your gateway looks like that.
That can't work.

What you should have in there is
Code:
iface eno1 inet manual

auto vmbr0
iface vmbr0 inet static
        address 3.2.1.38/26
        gateway 3.2.1.1
        bridge-ports eno1
        bridge-stp off
        bridge-fd 0
 
You have the same IPs configured on eno1 and vmbr0, and vmbr0 isn't connected to the interface, AND you have a typo in the route (dev en01 instead of eno1). Also, it doesn't seem like you have routable ipv6 if your gateway looks like that.
That can't work.

What you should have in there is
Code:
iface eno1 inet manual

auto vmbr0
iface vmbr0 inet static
        address 3.2.1.38/26
        gateway 3.2.1.1
        bridge-ports eno1
        bridge-stp off
        bridge-fd 0
Thank,
I use this link for config ,
https://first2host.co.uk/blog/proxmox-ve-8-routed-network-configuration/#comment-1649

which interface I must choose during made VM vmbr1 or vmbr0?
which gateway I must set to VM during installation and after install?

I can not find nice guide for promox 8 and routed network, I want I have many VMs as different subnets and all of them can access to internet for update and installing packages.
 
Last edited:
Their config seems flawed.
vmbr0 is the external bridge (inside the network the host is connected to, so all VMs in there will also occupy an address from that network), vmbr1 the internal one (which needs to use NAT to connect to the internet uplink on vmbr0). I don't even have a vmbr1.
As you have only one assigned external IP, all your internal VMs will need to use vmbr1 with NAT. But for every subnet you define you need to also define one IP inside that net, which will then be the gateway.
 
Their config seems flawed.
vmbr0 is the external bridge (inside the network the host is connected to, so all VMs in there will also occupy an address from that network), vmbr1 the internal one (which needs to use NAT to connect to the internet uplink on vmbr0). I don't even have a vmbr1.
As you have only one assigned external IP, all your internal VMs will need to use vmbr1 with NAT. But for every subnet you define you need to also define one IP inside that net, which will then be the gateway.
Thank,
but I do not know why when I use this guide VM can not ping 8.8.8.8
Can I find simple config for my use?
 
Their config seems flawed.
vmbr0 is the external bridge (inside the network the host is connected to, so all VMs in there will also occupy an address from that network), vmbr1 the internal one (which needs to use NAT to connect to the internet uplink on vmbr0). I don't even have a vmbr1.
As you have only one assigned external IP, all your internal VMs will need to use vmbr1 with NAT. But for every subnet you define you need to also define one IP inside that net, which will then be the gateway.
can you explain with example?
 

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!