I have 3 NICS connecting to separate Routers and out to separate Internet connections.
I have set up the additional bridges vmbr1 and vmbr2, given them the required subnets and linked them to the physical NICS, see screenshot.
vmbr0 has the 'Default Gateway' on it, and I know I cannot put gateways on the other 2, but need to add static routes instead.
My second and third routers are at 192.168.44.15 and 192.168.22.15 respectively.
Do I now just need to put these two lines in my /etc/network/interfaces file to finish the job so that vm's on the second and third subnets can reach the routers?
post-up ip route add 192.168.44.0/24 via 192.168.44.15 dev enp4s0
post-up ip route add 192.168.22.0/24 via 192.168.22.15 dev enp3s0
Here is my current /etc/network/interfaces file with the additional bridges in.
The 2 lines I think I need to add, for the static routes, are highlighted in bold italics
Have I done this correctly?
Anything else I need to do??
network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage parts of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!
auto lo
iface lo inet loopback
iface enp0s31f6 inet manual
iface enp3s0 inet manual
iface enp4s0 inet manual
auto vmbr0
iface vmbr0 inet static
address 192.168.4.221
netmask 255.255.255.0
gateway 192.168.4.15
bridge-ports enp0s31f6
bridge-stp off
bridge-fd 0
auto vmbr1
iface vmbr1 inet static
address 192.168.44.221
netmask 255.255.255.0
bridge-ports enp4s0
bridge-stp off
bridge-fd 0
post-up ip route add 192.168.44.0/24 via 192.168.44.15 dev enp4s0
auto vmbr2
iface vmbr2 inet static
address 192.168.22.221
netmask 255.255.255.0
bridge-ports enp3s0
bridge-stp off
bridge-fd 0
post-up ip route add 192.168.22.0/24 via 192.168.22.15 dev enp3s0
I have set up the additional bridges vmbr1 and vmbr2, given them the required subnets and linked them to the physical NICS, see screenshot.
vmbr0 has the 'Default Gateway' on it, and I know I cannot put gateways on the other 2, but need to add static routes instead.
My second and third routers are at 192.168.44.15 and 192.168.22.15 respectively.
Do I now just need to put these two lines in my /etc/network/interfaces file to finish the job so that vm's on the second and third subnets can reach the routers?
post-up ip route add 192.168.44.0/24 via 192.168.44.15 dev enp4s0
post-up ip route add 192.168.22.0/24 via 192.168.22.15 dev enp3s0
Here is my current /etc/network/interfaces file with the additional bridges in.
The 2 lines I think I need to add, for the static routes, are highlighted in bold italics
Have I done this correctly?
Anything else I need to do??
network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage parts of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!
auto lo
iface lo inet loopback
iface enp0s31f6 inet manual
iface enp3s0 inet manual
iface enp4s0 inet manual
auto vmbr0
iface vmbr0 inet static
address 192.168.4.221
netmask 255.255.255.0
gateway 192.168.4.15
bridge-ports enp0s31f6
bridge-stp off
bridge-fd 0
auto vmbr1
iface vmbr1 inet static
address 192.168.44.221
netmask 255.255.255.0
bridge-ports enp4s0
bridge-stp off
bridge-fd 0
post-up ip route add 192.168.44.0/24 via 192.168.44.15 dev enp4s0
auto vmbr2
iface vmbr2 inet static
address 192.168.22.221
netmask 255.255.255.0
bridge-ports enp3s0
bridge-stp off
bridge-fd 0
post-up ip route add 192.168.22.0/24 via 192.168.22.15 dev enp3s0