Using 2 Bridges on one NIC

aluisco

Member
Sep 11, 2019
4
1
23
38
How I can use 2 IP on same NIC, I will explain my problem:

I have one server with one NIC, the other is broken so I can use only one, the problem is I have 2 networks so the configuration right now is:

/etc/network/interfaces
Code:
source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

auto enp2s0
iface enp2s0 inet static
    address  192.168.1.2
    netmask  30
    gateway  192.168.1.1

auto enp2s0:0
iface enp2s0:0 inet static
    address  192.168.15.1
    netmask  24

I try to put as one BOND and two BRIDGE attached to this bond but interface not allow that, how I can do with one interface only????

Regards,

NOTE: I need VM runs on 192.168.15.1 interface, the other interface have internet.
 
Last edited:
Ok here my solution at least:

Code:
source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

auto enp2s0
iface enp2s0 inet static
    address  192.168.1.2
    netmask  30
    gateway  192.168.1.1
    post-up echo 1 > /proc/sys/net/ipv4/ip_forward
    post-up echo 1 > /proc/sys/net/ipv4/conf/enp2s0/proxy_arp

auto vmbr0
iface vmbr0 inet static
    address  192.168.15.1
    netmask  24
    bridge_ports enp2s0
    bridge_stp off
    bridge_fd 0

I can do ping in both networks, maybe somebody have better solution.

Regards,
 
Right now I have another little problem, I want to install Pfsense on VM and use like router, but I only have 1 IP for internet and is configured in enp2s0, how to add to pfsense this IP or route by default with host ?? and left vmbr0 for gateway for the rest of the network???
 

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!