[SOLVED] Add second network connection on same subnet

Jonathan Griggs

New Member
Apr 19, 2019
6
3
1
53
How do I add a second network connection on the same subnet? I want VM's to access the LAN over a seperate linux bridge than that of the management network. When I create a new linux bridge, I'm told "Default gateway already exists on interface 'vmbr0'".
 
Did you tried just setting the respective CIDR (network address and netmask), as then the route should be added automatically.

For example, I have some private NICs which are defined as:

Bash:
# cat /etc/network/interfaces
...

auto vmbr1
iface vmbr1 inet static
        address 10.12.11.1/24
        bridge-ports eno1
        bridge-stp off
        bridge-fd 0

With that ifupdown sets the route correctly, e.g.:

Bash:
# ip -c route
default via 192.168.16.1 dev vmbr0 proto kernel onlink
10.12.11.0/24 dev vmbr1 proto kernel scope link src 10.12.11.1
...
 
What I tried was...
Screen Shot 2020-04-08 at 3.47.56 PM.png
(the fact that the IP ending 24 and the CIDR are the same is a coincidence). I would prefer to set static IP's in my router, not define them on the machine. But I'm guessing from your response that this has to be done at the command line. I think I need more research...