Skip to content

Commit 878dfe9

Browse files
author
Bharath Veeranna
committed
Adding VnetMgr info
1 parent 0adfddc commit 878dfe9

File tree

2 files changed

+33
-9
lines changed

2 files changed

+33
-9
lines changed

doc/vxlan/Vxlan_kernel_routes.md

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,42 @@
2626

2727

2828
# 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).
3030

3131
# 3 Definitions/Abbreviation
3232
###### Table 1: Abbreviations
3333
| | |
3434
|--------------------------|--------------------------------|
35+
| BGP | Border Gateway Protocol |
3536
| VNI | Vxlan Network Identifier |
3637
| VTEP | Vxlan Tunnel End Point |
3738
| VNet | Virtual Network |
3839

3940
# 4 Overview
4041
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.
4142

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+
4265
Additionally, SONiC may need Loopback interfaces attached to the VNET which can be used as the overlay source for any communication to external VTEPs.
4366

4467
# 5 Requirements Overview
@@ -47,11 +70,12 @@ This section describes the SONiC requirements for Vxlan kernel interface and rou
4770
- SONiC should be able to encap/decap VxLAN traffic originated/destined to CPU
4871
- Processes on CPU could leverage these routes to communicate to VxLAN endpoints (establish BGP, ping etc)
4972

50-
## 5.2 Orchagent requirements
73+
## 5.2 Config Manager requirements
5174

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.
5579

5680

5781
## 5.3 CLI requirements
@@ -118,11 +142,11 @@ VNI = DIGITS ; VNI valu
118142
INSTALL_ON_KERNEL = true/false ; Indicates if this route should be installed on kernel
119143
```
120144

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`.
123147

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.
148+
### VnetMgr
149+
![](https://github.com/sonic-net/SONiC/blob/master/images/vxlan_hld/vxlan_kernel_routes.png)
126150

127151
For the config below:
128152

19.4 KB
Loading

0 commit comments

Comments
 (0)