]>
Commit | Line | Data |
---|---|---|
571912c6 MV |
1 | .. SPDX-License-Identifier: GPL-2.0 |
2 | ||
3 | ======================================== | |
4 | Bare UDP Tunnelling Module Documentation | |
5 | ======================================== | |
6 | ||
7 | There are various L3 encapsulation standards using UDP being discussed to | |
8 | leverage the UDP based load balancing capability of different networks. | |
9 | MPLSoUDP (__ https://tools.ietf.org/html/rfc7510) is one among them. | |
10 | ||
11 | The Bareudp tunnel module provides a generic L3 encapsulation tunnelling | |
12 | support for tunnelling different L3 protocols like MPLS, IP, NSH etc. inside | |
13 | a UDP tunnel. | |
14 | ||
4b5f6723 MV |
15 | Special Handling |
16 | ---------------- | |
17 | The bareudp device supports special handling for MPLS & IP as they can have | |
18 | multiple ethertypes. | |
19 | MPLS procotcol can have ethertypes ETH_P_MPLS_UC (unicast) & ETH_P_MPLS_MC (multicast). | |
20 | IP protocol can have ethertypes ETH_P_IP (v4) & ETH_P_IPV6 (v6). | |
21 | This special handling can be enabled only for ethertypes ETH_P_IP & ETH_P_MPLS_UC | |
22 | with a flag called multiproto mode. | |
23 | ||
571912c6 MV |
24 | Usage |
25 | ------ | |
26 | ||
27 | 1) Device creation & deletion | |
28 | ||
29 | a) ip link add dev bareudp0 type bareudp dstport 6635 ethertype 0x8847. | |
30 | ||
31 | This creates a bareudp tunnel device which tunnels L3 traffic with ethertype | |
32 | 0x8847 (MPLS traffic). The destination port of the UDP header will be set to | |
33 | 6635.The device will listen on UDP port 6635 to receive traffic. | |
34 | ||
35 | b) ip link delete bareudp0 | |
36 | ||
4b5f6723 MV |
37 | 2) Device creation with multiple proto mode enabled |
38 | ||
39 | There are two ways to create a bareudp device for MPLS & IP with multiproto mode | |
40 | enabled. | |
41 | ||
42 | a) ip link add dev bareudp0 type bareudp dstport 6635 ethertype 0x8847 multiproto | |
43 | ||
44 | b) ip link add dev bareudp0 type bareudp dstport 6635 ethertype mpls | |
45 | ||
46 | 3) Device Usage | |
571912c6 MV |
47 | |
48 | The bareudp device could be used along with OVS or flower filter in TC. | |
49 | The OVS or TC flower layer must set the tunnel information in SKB dst field before | |
50 | sending packet buffer to the bareudp device for transmission. On reception the | |
51 | bareudp device extracts and stores the tunnel information in SKB dst field before | |
52 | passing the packet buffer to the network stack. |