Open vSwtich one NIC with two subnets

steeeeeveee

New Member
Aug 9, 2018
2
0
1
53
Hello all,

I am using Proxmox 5.2-6 and Open vSwtich 2.7.0-3. In the past I used Linux native bridge tools but now I want to switch to OVS. Right now I am facing an issue that I can not solve.

I have one static address, an additional network /28 and just one NIC.

How can I configure vSwitch to suit my needs? I am totally lost. Can any one help me? Is there an example for that kind of setup?

What would be the proper setup for my needs?
Physical NIC with IP 1.2.3.4
And then a OVS Bridge with the remaining /28 subnet, starting with the first IP of the subnet, using 1.2.3.4 as the default gw?

Somehow I am lost configuring this.

Cheers

Steve
 
Okay. Got it. It was +/- same way as with a native Linux bridge. At the end I had to create a OVS bridge and use my physical NIC as port of the bridge. Then create another bridge and use any IP from my additional /28 subnet:

Code:
    Bridge "vmbr0"
        Port "enp0s31f6"
            Interface "enp0s31f6"
        Port "vmbr0"
            Interface "vmbr0"
                type: internal
    Bridge "vmbr1"
        Port "tap100i0"
            Interface "tap100i0"
        Port "vmbr1"
            Interface "vmbr1"
                type: internal
    ovs_version: "2.7.0"

Enabling IPv4 forwarding and that's it :)

Code:
auto lo
iface lo inet loopback
iface lo inet6 loopback

allow-vmbr0 enp0s31f6
iface enp0s31f6 inet manual
        ovs_type OVSPort
        ovs_bridge vmbr0
        up route add -net aa.bb.cc.0 netmask 255.255.255.192 gw aa.bb.cc.1 dev enp0s31f6

auto vmbr0
iface vmbr0 inet static
        address  aa.bb.cc.12
        netmask  255.255.255.192
        gateway  aa.bb.cc.1
        ovs_type OVSBridge
        ovs_ports enp0s31f6

iface vmbr0 inet6 static
        address  hhhh:iii:jjj:kkkk::2
        netmask  64
        gateway  uuuu::1

auto vmbr1
iface vmbr1 inet static
        address  xx.yy.zz.65
        netmask  255.255.255.240
        ovs_type OVSBridge
 

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!