[pve-devel] rfc : /etc/pve/networks.cfg implementation

Alexandre DERUMIER aderumier at odiso.com
Wed Feb 27 09:16:30 CET 2019

Hi Dietmar,
I'll work next week on /etc/pve/networks.cfg,

I have take time to polish the configs file, I'll would to have some feedback
before coding.

1)  add transportzone in /etc/network/interface.
    only on physical interfaces (eth/bond), not tagged interfaces.
    This is only an hint, not used by ifupdown.
    1 transportzone can be set only on 1 interface.


auto eth|bond
    transportzone zone1

2) add a new /etc/pve/networks.cfg configuration,  with 2 main sections


a) the transportzones (with plugins),
   where we can define if a transport zone is a vlan, vxlan,... with differents attributes specific to the plugin.

   some examples:


vlan:  zone1
       vlan-aware 1|0  (qinq)
       allowedid: 1 - 4096

vxlanmulticast: zone2 
       allowedid: 1-16millions

vxlanunicast: zone3 
       vxlan_remoteip proxmoxip1,proxmoxip2,proxmoxip3,....
       allowedid: 1-16millions

vxlanfrr: zone4 
          l3vni: id
          l3vnihwaddres: macaddress
          allowedid: 1-16millions

b) the networks/bridge/switchs,
   where the attributes are common.
   (basicaly, this is a bridge config with vlan/vxlan id)


switch : mynetwork1
         transportzone zone1
         networkid:   (vlan/vxlan-id)

switch:  mynetwork2 
         transportzone zone4
         networkid: (vlan/vxlan-id)
         address: cidr
         hwaddress: 44:39:39:FF:40:10


After that, I think we need a new daemon, to generate /etc/network/interfaces locally
on each node, do ifupdown2 reload on change,....  maybe do we need to manage that on a separate config ? /etc/network/interfaces.d/networks.cfg ?

(or maybe reuse pvestatd ?)

I'm not sure for the generate interfaces name, as we have 16characters limit:

auto vxlanmynetwork1
auto vmbrmynetwork1

maybe use an id by switch, to be able to do something like


switch : vnet1
         name mynetwork1


auto vxlanvnet1
auto vmbrvnet1

(can't use the vxlanid in name, as we have 16millions characters)

What do you think about this ?

More information about the pve-devel mailing list