Commit 570efdb
Created Single VxLAN Device management for EVPN
A Single VxLAN Device (SVD) is a vlan-aware Linux bridge and a
vlan-aware VxLAN paired together to support mapping of VNI to VLAN ID.
It is a way to create a VxLAN interface that can receive traffic for
multiple VNIs, reducing the number of VxLAN interfaces needed in the
system to support the entire VxLAN VNI space. EVPN uses SVD to map a
VNI to VLAN interface on the vlan-aware Linux bridge. The VLAN
interface represents the EVPN instance's bridge domain. Netlink,
primarily through pyroute2, is used to programmatically create the
following interfaces and update their settings. Where pyroute2 does not
provide the API, a raw netlink message is composed and the configuration
is still through netlink.
Creating SVD:
ip link add $br type bridge vlan_filtering 1 vlan_default_pvid 0
ip link set $br addrgenmode none
ip link set $br address $svd_mac
ip link set $br mtu 1500
ip link set dev $br up
ip link add $vxlan type vxlan \
dev $underlay_device \
dstport $dstport local $local_ip \
nolearning external vnifilter \
ip link set $vxlan addrgenmode none master $br
ip link set $vxlan address $svd_mac
bridge link set dev $vxlan \
vlan_tunnel on neigh_suppress on learning off
ip link set dev $vxlan up
Create VLAN interface with VLAN ID mapped to VNI:
bridge vlan add dev $br vid $vid self
bridge vlan add dev $vxlan vid $vid
bridge vni add dev $vxlan vni $vni
bridge vlan add dev $vxlan vid $vid tunnel_info id $vni
ip link add vl-0-$vid link $br type vlan id $vid
ip link set vl-0-$vid master $vrf
ip link set vl-0-$vid addr $router_mac addrgenmode none
ip link set vl-0-$vid up
Related-Bug: #2144617
Assisted-By: Claude Opus 4.6
Change-Id: I78fec86595fb358880b306ec1fe014adad007d87
Signed-off-by: Helen Chen <ichen@redhat.com>1 parent 02c4820 commit 570efdb
4 files changed
Lines changed: 423 additions & 2 deletions
File tree
- neutron
- agent
- linux
- ovn/extensions/evpn
- privileged/agent/linux
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| 31 | + | |
| 32 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
0 commit comments