2 # vlan-aware bridge with bonds example
4 # uplink1, peerlink and downlink are bond interfaces.
5 # 'bridge' is a vlan aware bridge with ports uplink1, peerlink
6 # and downlink (swp2-20).
8 # native vlan is by default 1
10 # 'bridge-vids' attribute is used to declare vlans.
11 # 'bridge-pvid' attribute is used to specify native vlans if other than 1
12 # 'bridge-access' attribute is used to declare access port
29 bond-xmit-hash-policy layer2
35 bond-slaves swp30 swp31
41 bond-xmit-hash-policy layer3+4
42 bridge-vids 2000-2079 4094
53 bond-xmit-hash-policy layer3+4
57 # Declare vlans for all swp ports
58 # swp2-20 get vlans from 2004 to 2022.
59 # The below uses mako templates to generate iface sections
60 # with vlans for swp ports
62 %for port, vlanid in zip(range(2, 20), range(2004, 2022)) :
72 address 11.100.1.252/24
74 # l2 attributes for vlan 4094
77 bridge-igmp-querier-src 172.16.101.1
85 bridge-ports uplink1 peerlink downlink glob swp2-20
91 address 192.168.10.1/30
92 broadcast 192.168.10.3