[pve-devel] [PATCH] add support for network trunks
Wolfgang Bumiller
w.bumiller at proxmox.com
Fri Jan 15 12:09:27 CET 2016
> On January 15, 2016 at 12:02 PM Alexandre DERUMIER <aderumier at odiso.com> wrote:
>
>
> >>Given the bridge command syntax we used here:
> >>system("/sbin/bridge vlan add dev $iface vid 2-4094") == 0 ||
> >>
> >>And the new command you introduced here:
> >>+ system("/sbin/bridge vlan add dev $iface vid $trunk") == 0 ||
> >>
> >>Should this accept ranges via '-'? If so, does OVS also do ranges in
> >>`ovs-ctl add-port` with the syntax you added there?
> >>+ $cmd .= " trunks=". join(',', $trunks) if $trunks;
>
> for linux bridge, yes , we can pass ranges.
> /sbin/bridge vlan add dev $iface vid 10-20
>
> but we can't pass lists
> /sbin/bridge vlan add dev $iface vid 10,11,12
>
> (that's why I do it in a loop, 1 command for each vlan)
Simply allowing '-' would still work then since you separate by semicolon,
so 1-5;10-20 would correctly loop over the list ('1-5', '10-20'). But OVS...
> For ovs, this is the inverse
>
>
> we can't pass range
>
> #ovs-vsctl set port tap171i0 trunk=10-20
> ovs-vsctl: "10-20" is not a valid integer
>
>
> but we can pass list
> ovs-vsctl set port tap171i0 trunks=10,11,12
So how does an OVS user do the equivalent of
# /sbin/bridge vlan add dev $iface vid 2-4000
I'm sure there's a sane way to do this...?
> we could allow ranges in configuration, and do the format convertion if needed.
More information about the pve-devel
mailing list