Bridge doesn't work

KaRiLaA

New Member
Jan 24, 2023
3
0
1
Hi,
I am trying to setup network through bridge on my hetnzer server, but it doesnt work and internet stoped working on host. However, according to the guides and other examples of configurations, my config should work(Guide, Forum answer).

Thank you.

Bridge config attempt:
Code:
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
iface lo inet6 loopback

iface ens4 inet manual

auto vmbr0
iface vmbr0 inet static
    address 173.2.1.98/27
    gateway 173.2.1.97
    bridge_ports ens4
    bridge_stp off
    bridge_fd 1
    up route add -net 173.2.1.96 netmask 255.255.255.224 gw 173.2.1.97 dev ens4
# route 173.2.1.96/27 via 173.2.1.97

iface ens4 inet6 static
    address 2a01:4f8:141:5058::2/64
    gateway fe80::1

Working default config:
Code:
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
iface lo inet6 loopback

auto ens4
iface ens4 inet static
    address 173.2.1.98/27
    gateway 173.2.1.97
    up route add -net 173.2.1.96 netmask 255.255.255.224 gw 173.2.1.97 dev ens4
# route 173.2.1.96/27 via 173.2.1.97

iface ens4 inet6 static
    address 2a01:4f8:141:5058::2/64
    gateway fe80::1
 
I think when you move your IP from the interface ens4 to the bridge vmbr0 you need to change the corresponding out-interface in your routing rule:

Code:
auto vmbr0
iface vmbr0 inet static
    address 173.2.1.98/27
    gateway 173.2.1.97
    bridge_ports ens4
    bridge_stp off
    bridge_fd 1
    up route add -net 173.2.1.96 netmask 255.255.255.224 gw 173.2.1.97 dev vmbr0
    # route 173.2.1.96/27 via 173.2.1.97

Thats only for the Proxmox Host though. Do note that just connecting a VM to vmbr0 won't allow them to reach the internet - unless you have ordered extra public IP adresses.

When you are planning to configure VM that are able to access the internet, then you usually have to put them in a private subnet and configure NAT rules.
 
I think when you move your IP from the interface ens4 to the bridge vmbr0 you need to change the corresponding out-interface in your routing rule:

Code:
auto vmbr0
iface vmbr0 inet static
    address 173.2.1.98/27
    gateway 173.2.1.97
    bridge_ports ens4
    bridge_stp off
    bridge_fd 1
    up route add -net 173.2.1.96 netmask 255.255.255.224 gw 173.2.1.97 dev vmbr0
    # route 173.2.1.96/27 via 173.2.1.97

Thats only for the Proxmox Host though. Do note that just connecting a VM to vmbr0 won't allow them to reach the internet - unless you have ordered extra public IP adresses.

When you are planning to configure VM that are able to access the internet, then you usually have to put them in a private subnet and configure NAT rules.
Thanks for the answer, but it didn't help. It feels like the bridges just don't work on my system, because i even cant ping gateway with this config. Maybe the problem is not on my side?
 

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!