Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GPL-2.0
0002 
0003 ========================================
0004 Bare UDP Tunnelling Module Documentation
0005 ========================================
0006 
0007 There are various L3 encapsulation standards using UDP being discussed to
0008 leverage the UDP based load balancing capability of different networks.
0009 MPLSoUDP (__ https://tools.ietf.org/html/rfc7510) is one among them.
0010 
0011 The Bareudp tunnel module provides a generic L3 encapsulation support for
0012 tunnelling different L3 protocols like MPLS, IP, NSH etc. inside a UDP tunnel.
0013 
0014 Special Handling
0015 ----------------
0016 The bareudp device supports special handling for MPLS & IP as they can have
0017 multiple ethertypes.
0018 MPLS procotcol can have ethertypes ETH_P_MPLS_UC  (unicast) & ETH_P_MPLS_MC (multicast).
0019 IP protocol can have ethertypes ETH_P_IP (v4) & ETH_P_IPV6 (v6).
0020 This special handling can be enabled only for ethertypes ETH_P_IP & ETH_P_MPLS_UC
0021 with a flag called multiproto mode.
0022 
0023 Usage
0024 ------
0025 
0026 1) Device creation & deletion
0027 
0028     a) ip link add dev bareudp0 type bareudp dstport 6635 ethertype mpls_uc
0029 
0030        This creates a bareudp tunnel device which tunnels L3 traffic with ethertype
0031        0x8847 (MPLS traffic). The destination port of the UDP header will be set to
0032        6635.The device will listen on UDP port 6635 to receive traffic.
0033 
0034     b) ip link delete bareudp0
0035 
0036 2) Device creation with multiproto mode enabled
0037 
0038 The multiproto mode allows bareudp tunnels to handle several protocols of the
0039 same family. It is currently only available for IP and MPLS. This mode has to
0040 be enabled explicitly with the "multiproto" flag.
0041 
0042     a) ip link add dev bareudp0 type bareudp dstport 6635 ethertype ipv4 multiproto
0043 
0044        For an IPv4 tunnel the multiproto mode allows the tunnel to also handle
0045        IPv6.
0046 
0047     b) ip link add dev bareudp0 type bareudp dstport 6635 ethertype mpls_uc multiproto
0048 
0049        For MPLS, the multiproto mode allows the tunnel to handle both unicast
0050        and multicast MPLS packets.
0051 
0052 3) Device Usage
0053 
0054 The bareudp device could be used along with OVS or flower filter in TC.
0055 The OVS or TC flower layer must set the tunnel information in SKB dst field before
0056 sending packet buffer to the bareudp device for transmission. On reception the
0057 bareudp device extracts and stores the tunnel information in SKB dst field before
0058 passing the packet buffer to the network stack.