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

Dietmar Maurer dietmar at proxmox.com
Thu Feb 28 06:54:11 CET 2019


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

great!
 
> 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.
> 
> 
> 
> /etc/network/interfaces
> -----------------------
> 
> auto eth|bond
>     transportzone zone1

looks reasonable
 

> 2) add a new /etc/pve/networks.cfg configuration,  with 2 main sections
> 
> 
> /etc/pve/networks.cfg
> 
> 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:
> 
> #transportzones
> 
> 
> vlan:  zone1
>        vlan-aware 1|0  (qinq)
>        allowedid: 1 - 4096
>        
> 
> vxlanmulticast: zone2 
>        vxlan-svcnodeip 225.20.1.1
>        allowedid: 1-16millions
> 
> 
> vxlanunicast: zone3 
>        vxlan_remoteip proxmoxip1,proxmoxip2,proxmoxip3,....
>        allowedid: 1-16millions
> 
> vxlanfrr: zone4 
>           vrf: 
>           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)
> 
> 
> #network
> 
> 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
> 

Not sure if we need those extra switch settings? Can't we combine 
switch and transportzones? i.e.

vnet1: vxlanfrr
        name: zone4 # not really required
        transportzone zone4
        ...
        l3vni: id
        l3vnihwaddres: macaddress
        allowedid: 1-16millions


What was the reason for spliting this into zones and switches?

> 3)
> 
> 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 just activate when needed (at VM start)? But yes, a separate config is preferable.

> (or maybe reuse pvestatd ?)
> 
> 
> 
> 
> I'm not sure for the generate interfaces name, as we have 16characters limit:
> 
> auto vxlanmynetwork1
> auto vmbrmynetwork1

Yes, this is a problem ... (use vnetX instead)
  
> maybe use an id by switch, to be able to do something like
> 
> /etc/pve/networks.cfg
> 
> switch : vnet1
>          name mynetwork1
> 
> /etc/network/interfaces
> 
> auto vxlanvnet1
> auto vmbrvnet1
> 
> (can't use the vxlanid in name, as we have 16millions characters)




More information about the pve-devel mailing list