You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/vxlan/Vxlan_kernel_routes.md
+33-9Lines changed: 33 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,19 +26,42 @@
26
26
27
27
28
28
# 2 Scope
29
-
This documents specifically deals with kernel routes and interfaces that are required by the CPU to communicate to a VxLAN endpoint. This is for a specific use case where CPU generated packets (such as BGP, ping etc) shoud be encapped/decapped with VxLAN. Transit traffic (which are not destined to CPU) are not in the scope of this document. NPU config required for transit traffic are discussed in [VxLAN HLD](https://github.com/sonic-net/SONiC/blob/master/doc/vxlan/Vxlan_hld.md).
29
+
This document is an extension to the VxLAN feature implementation defined in [VxLAN HLD](https://github.com/sonic-net/SONiC/blob/master/doc/vxlan/Vxlan_hld.md). This documents specifically deals with kernel routes and interfaces that are required by the CPU to communicate to a VxLAN endpoint. This is for a specific use case where CPU generated packets (such as BGP, ping etc) shoud be encapped/decapped with VxLAN. Transit traffic (which are not destined to CPU) are not in the scope of this document. NPU config required for transit traffic are discussed in [VxLAN HLD](https://github.com/sonic-net/SONiC/blob/master/doc/vxlan/Vxlan_hld.md).
This document provides information about kernel routes required for SONiC to encap/decap VxLAN traffic originated/destined to CPU. For scenarios where SONiC needs to communicate to an endpoint that is behind a VTEP, the kernel needs to be aware of the VTEP and have routes to encap/decap the packets before sending it over the wire. For example, if SONiC needs to establish BGP over VxLAN, the kernel should know the VTEP and overlay routes to send and receive the packet. If the kernel is unaware of the VTEP, it will treat it as unreachable and drop the packets in kernel.
41
42
43
+
Currently, SONiC creates kernel routes, bridge and vxlan interfaces for a VNET. For example, consider a VNET `Vnet_1000` as defined below:
44
+
45
+
```
46
+
--- CONFIG_DB
47
+
|--- VNET
48
+
| |--- Vnet_1000
49
+
| |--- VNI = 1000
50
+
| |--- source_tunnel
51
+
|
52
+
|--- VNET_ROUTE_TUNNEL
53
+
|--- Vnet_1000|10.0.0.2/32
54
+
|--- endpoint = 100.100.100.1
55
+
|--- vni = 2000
56
+
57
+
--- Kernel
58
+
|--- Vnet_1000
59
+
|--- Brvxlan1000 -> A bridge for Vnet that terminates Vxlan and does L2 forwarding
60
+
|--- Vxlan1000 -> vxlan interface
61
+
```
62
+
63
+
For the above config, SONiC creates kernel configs for a L2 bridge and a VxLAN interface. For the vxlan routes that are added using `VXLAN_ROUTE_TUNNEL`, there are no kernel configurations applied. The kernel cannot initiate communication to the vnet endpoints behind VTEP since the kernel interface and routes for these prefixes are not installed on the kernel. This document enhances the VxLAN capabilities of SONiC to have the kernel routes and vxlan P2P interface to communicate with the remote endpoints defined in `VNET_ROUTE_TUNNEL`. This can be used for traffic originated by CPU (like BGP, ping etc) and destined to a remote VTEP endpoint.
64
+
42
65
Additionally, SONiC may need Loopback interfaces attached to the VNET which can be used as the overlay source for any communication to external VTEPs.
43
66
44
67
# 5 Requirements Overview
@@ -47,11 +70,12 @@ This section describes the SONiC requirements for Vxlan kernel interface and rou
47
70
- SONiC should be able to encap/decap VxLAN traffic originated/destined to CPU
48
71
- Processes on CPU could leverage these routes to communicate to VxLAN endpoints (establish BGP, ping etc)
49
72
50
-
## 5.2 Orchagent requirements
73
+
## 5.2 Config Manager requirements
51
74
52
-
### Vnet Route orchagent:
53
-
- Should be able to create kernel interface and routes for VxLAN endpoints
54
-
- Should be able to create Loopback interfaces and attach it to VNET.
75
+
### Vnet Manager:
76
+
A new component called VnetMgr will be introduced that will handle kernel programming for `VNET_ROUTE_TUNNEL` endpoints.
77
+
- VnetMgr should handle vxlan interface creation and deletion for routes defined in VNET_ROUTE_TUNNEL.
78
+
- VnetMgr should install/delete kernel routes for the VTEP endpoints.
55
79
56
80
57
81
## 5.3 CLI requirements
@@ -118,11 +142,11 @@ VNI = DIGITS ; VNI valu
118
142
INSTALL_ON_KERNEL = true/false ; Indicates if this route should be installed on kernel
119
143
```
120
144
121
-
## 6.3 Orchestration Agent
122
-
Following orchagents shall be modified.
145
+
## 6.3 Config Manager
146
+
A new config manager called VnetMgr will be added which will handle kernel routes programming for `VNET_ROUTE_TUNNEL`.
123
147
124
-
### VnetOrch/VnetRouteOrch
125
-
VnetRouteOrch is reponsible for programming VNET_ROUTE_TUNNEL_TABLE in SAI. When VnetRouteOrch programs the tunnel routes in NPU, it will also install the kernel routes if the `install_on_kernel` flag is set to true.
0 commit comments