]>
Commit | Line | Data |
---|---|---|
f82758bf RP |
1 | # |
2 | # vlan-aware bridge with bonds example | |
3 | # | |
4 | # uplink1, peerlink and downlink are bond interfaces. | |
5 | # 'bridge' is a vlan aware bridge with ports uplink1, peerlink | |
6 | # and downlink (swp2-20). | |
d486dd0d | 7 | # |
f82758bf RP |
8 | # native vlan is by default 1 |
9 | # | |
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 | |
d486dd0d | 13 | # |
f82758bf RP |
14 | auto lo |
15 | iface lo | |
16 | ||
17 | auto eth0 | |
18 | iface eth0 inet dhcp | |
19 | ||
20 | # bond interface | |
21 | auto uplink1 | |
22 | iface uplink1 | |
23 | bond-slaves swp32 | |
24 | bond-mode 802.3ad | |
25 | bond-miimon 100 | |
594fb088 | 26 | bond-use-carrier yes |
f82758bf RP |
27 | bond-lacp-rate 1 |
28 | bond-min-links 1 | |
29 | bond-xmit-hash-policy layer2 | |
30 | bridge-vids 2000-2079 | |
31 | ||
32 | # bond interface | |
33 | auto peerlink | |
34 | iface peerlink | |
35 | bond-slaves swp30 swp31 | |
36 | bond-mode 802.3ad | |
37 | bond-miimon 100 | |
594fb088 | 38 | bond-use-carrier yes |
f82758bf RP |
39 | bond-lacp-rate 1 |
40 | bond-min-links 1 | |
41 | bond-xmit-hash-policy layer3+4 | |
42 | bridge-vids 2000-2079 4094 | |
43 | ||
44 | # bond interface | |
45 | auto downlink | |
46 | iface downlink | |
47 | bond-slaves swp1 | |
48 | bond-mode 802.3ad | |
49 | bond-miimon 100 | |
594fb088 | 50 | bond-use-carrier yes |
f82758bf RP |
51 | bond-lacp-rate 1 |
52 | bond-min-links 1 | |
53 | bond-xmit-hash-policy layer3+4 | |
54 | bridge-vids 2000-2079 | |
55 | ||
56 | # | |
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 | |
61 | # | |
62 | %for port, vlanid in zip(range(2, 20), range(2004, 2022)) : | |
63 | auto swp${port} | |
64 | iface swp${port} | |
65 | bridge-vids ${vlanid} | |
66 | ||
67 | %endfor | |
68 | ||
69 | # svi vlan 4094 | |
70 | auto bridge.4094 | |
71 | iface bridge.4094 | |
72 | address 11.100.1.252/24 | |
73 | ||
74 | # l2 attributes for vlan 4094 | |
75 | auto bridge.4094 | |
76 | vlan bridge.4094 | |
77 | bridge-igmp-querier-src 172.16.101.1 | |
78 | ||
79 | # | |
80 | # vlan aware bridge | |
81 | # | |
82 | auto bridge | |
83 | iface bridge | |
84 | bridge-vlan-aware yes | |
85 | bridge-ports uplink1 peerlink downlink glob swp2-20 | |
86 | bridge-stp on | |
87 | ||
88 | # svi peerlink vlan | |
89 | auto peerlink.4094 | |
90 | iface peerlink.4094 | |
91 | address 192.168.10.1/30 | |
92 | broadcast 192.168.10.3 |