This requires a schema change, adding 'mode' and 'load-balance' fields, a semantic invariant that 'load-balance' can only be set in the case of LACP and XOR bonds, a mapper from the mode/lb strings, ie. "round-robin" to their VPP numeric counterparts, a bunch of unit tests. Then in the reconciler, changing bonds (__bond_has_diff()) will invalidate any LCP or sub-interfaces built on them, so those will have to be pruned. create_bondethernet() will now create (or re-create) the bond with the correct flags. Unit-tests, YAML tests and the integration test all pass. Updated config-guide.
50 lines
915 B
YAML
50 lines
915 B
YAML
bondethernets:
|
|
BondEthernet0:
|
|
interfaces: [ GigabitEthernet1/0/0, GigabitEthernet1/0/1 ]
|
|
|
|
BondEthernet1:
|
|
interfaces: [ GigabitEthernet3/0/0, GigabitEthernet3/0/1 ]
|
|
mode: xor
|
|
load-balance: l2
|
|
|
|
BondEthernet2:
|
|
interfaces: [ GigabitEthernet4/0/0, GigabitEthernet4/0/1 ]
|
|
mode: round-robin
|
|
|
|
interfaces:
|
|
GigabitEthernet1/0/0:
|
|
mtu: 3000
|
|
GigabitEthernet1/0/1:
|
|
mtu: 3000
|
|
|
|
GigabitEthernet2/0/0:
|
|
mtu: 3000
|
|
sub-interfaces:
|
|
100:
|
|
mtu: 2000
|
|
|
|
GigabitEthernet3/0/0:
|
|
mtu: 3000
|
|
GigabitEthernet3/0/1:
|
|
mtu: 3000
|
|
|
|
GigabitEthernet4/0/0:
|
|
mtu: 3000
|
|
GigabitEthernet4/0/1:
|
|
mtu: 3000
|
|
|
|
BondEthernet0:
|
|
mtu: 3000
|
|
lcp: "be012345678"
|
|
addresses: [ 192.0.2.1/29, 2001:db8::1/64 ]
|
|
sub-interfaces:
|
|
100:
|
|
mtu: 2000
|
|
addresses: [ 192.0.2.9/29, 2001:db8:1::1/64 ]
|
|
|
|
BondEthernet1:
|
|
mtu: 3000
|
|
|
|
BondEthernet2:
|
|
mtu: 3000
|