1

In a Proxmox server (Debian), I changed the gateway from vmbr0 to enp0s31f6, as this:

iface enp0s31f6 inet static
    address  192.168.1.11
    netmask  255.255.255.0
-   address  192.168.1.1
+   gateway  192.168.1.1

 auto vmbr0
 iface vmbr0 inet static
    address  192.168.1.10
    netmask  255.255.255.0
-   gateway  192.168.1.11
    bridge-ports enp0s31f6
    bridge-stp off
    bridge-fd 0

After rebooting I can't ping 192.168.1.10 nor 192.168.1.11, can someone explain me why I cannot connect anymore?. In a bridged network the gw should by defined in vmbr0?.

The ip address of enp0s31f6 initially was wrong (it pointed to 192.168.1.1, which is the router that acts as a gateway), that's why I changed it from 192.168.1.1 to 192.168.1.11.

leonardorame
  • 327
  • 3
  • 14

1 Answers1

1

As the enp0s31f6 interface is a port of the vmbr0 bridge, you cannot assign any ip addresses to it. Also, if you want assign the ip address to the enp0s31f6 interface, you should change the vmbr0 address, otherwise you will have the same subnet on two interfaces.

auto enp0s31f6
iface enp0s31f6 inet static
    address 192.168.1.10
    netmask 255.255.255.0
    gateway 192.168.1.1

auto vmbr0
iface vmbr0 inet static
    address  192.168.2.10
    netmask  255.255.255.0
    bridge-ports none
    bridge-stp off
    bridge-fd 0

But more correct configuration for a bridging networking is assignment of the ip address to the vmbr0 interface. In such case your interfaces file should look something like:

iface enp0s31f6 inet manual

auto vmbr0
iface vmbr0 inet static
    address 192.168.1.10
    netmask 255.255.255.0
    gateway 192.168.1.1
    bridge-ports enp0s31f6
    bridge-stp off
    bridge-fd 0

Anton Danilov
  • 5,082
  • 2
  • 13
  • 23