]> git.proxmox.com Git - mirror_ifupdown2.git/blame - docs/examples/vlan_aware_bridges/interfaces.with_bonds
.gitignore: pycharm remote execution update
[mirror_ifupdown2.git] / docs / examples / vlan_aware_bridges / interfaces.with_bonds
CommitLineData
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
14auto lo
15iface lo
16
17auto eth0
18iface eth0 inet dhcp
19
20# bond interface
21auto uplink1
22iface 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
33auto peerlink
34iface 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
45auto downlink
46iface 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
70auto bridge.4094
71iface bridge.4094
72 address 11.100.1.252/24
73
74# l2 attributes for vlan 4094
75auto bridge.4094
76vlan bridge.4094
77 bridge-igmp-querier-src 172.16.101.1
78
79#
80# vlan aware bridge
81#
82auto bridge
83iface bridge
84 bridge-vlan-aware yes
85 bridge-ports uplink1 peerlink downlink glob swp2-20
86 bridge-stp on
87
88# svi peerlink vlan
89auto peerlink.4094
90iface peerlink.4094
91 address 192.168.10.1/30
92 broadcast 192.168.10.3