← Documents Documentation/networking/bareudp.rst GitHub 원문 ↗

Linux 6.18.37 · Networking

Bare UDP Tunnelling Module

MPLS·IP·NSH를 UDP로 운반하는 bareudp device와 multiproto mode를 설명합니다.

Source pathDocumentation/networking/bareudp.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

bareudp.rst:1-59

Bareudp는 tunnel 자체가 routing policy를 결정하기보다 OVS·TC flower가 SKB에 적어 준 tunnel metadata를 UDP encapsulation으로 운반하는 얇은 L3 tunnel device입니다.

Bareudp multiproto 확장
기본 ethertypemultiproto가 추가로 처리UDP port 예
ETH_P_IP (IPv4)ETH_P_IPV6 (IPv6)6635
ETH_P_MPLS_UCETH_P_MPLS_MC6635

하나의 기본 ethertype가 같은 family의 두 protocol을 대표합니다.

Bareudp 송수신 data path
OVS·TC flowerSKB dst 설정bareudp 송신
bareudp 송신UDP encapsulationnetwork
networkUDP decapsulationbareudp 수신
bareudp 수신SKB dst 저장network stack

SKB dst의 tunnel metadata가 두 방향에서 어떻게 이동하는지 나타냅니다.

Bareudp 관리 명령
작업핵심 명령
MPLS tunnelip link add ... ethertype mpls_uc
IPv4+IPv6ip link add ... ethertype ipv4 multiproto
MPLS UC+MCip link add ... ethertype mpls_uc multiproto
삭제ip link delete bareudp0

생성·확장·삭제 명령의 목적을 비교합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
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 support for
12 tunnelling different L3 protocols like MPLS, IP, NSH etc. inside a UDP tunnel.
13
14 Special Handling
15 ----------------
16
17 The bareudp device supports special handling for MPLS & IP as they can have
18 multiple ethertypes.
19 The MPLS protocol 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
24 Usage
25 ------
26
27 1) Device creation & deletion
28
29 a) ip link add dev bareudp0 type bareudp dstport 6635 ethertype mpls_uc
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
37 2) Device creation with multiproto mode enabled
38
39 The multiproto mode allows bareudp tunnels to handle several protocols of the
40 same family. It is currently only available for IP and MPLS. This mode has to
41 be enabled explicitly with the "multiproto" flag.
42
43 a) ip link add dev bareudp0 type bareudp dstport 6635 ethertype ipv4 multiproto
44
45 For an IPv4 tunnel the multiproto mode allows the tunnel to also handle
46 IPv6.
47
48 b) ip link add dev bareudp0 type bareudp dstport 6635 ethertype mpls_uc multiproto
49
50 For MPLS, the multiproto mode allows the tunnel to handle both unicast
51 and multicast MPLS packets.
52
53 3) Device Usage
54
55 The bareudp device could be used along with OVS or flower filter in TC.
56 The OVS or TC flower layer must set the tunnel information in the SKB dst field before
57 sending the packet buffer to the bareudp device for transmission. On reception, the
58 bareUDP device extracts and stores the tunnel information in the SKB dst field before
59 passing the packet buffer to the network stack.
60

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Bare UDP tunnel 개요

1-13

`.. SPDX-License-Identifier: GPL-2.0`

Bare UDP Tunnelling Module 문서

서로 다른 network가 제공하는 UDP 기반 load balancing을 활용하기 위해 UDP를 사용하는 여러 L3 encapsulation 표준이 논의되어 왔습니다. MPLS over UDP인 MPLSoUDP(`https://tools.ietf.org/html/rfc7510`)가 그중 하나입니다.

Bareudp tunnel module은 MPLS, IP, NSH 같은 서로 다른 L3 protocol을 UDP tunnel 내부로 운반하는 generic L3 encapsulation을 제공합니다.

.. SPDX-License-Identifier: GPL-2.0

========================================
Bare UDP Tunnelling Module Documentation
========================================

There are various L3 encapsulation standards using UDP being discussed to
leverage the UDP based load balancing capability of different networks.
MPLSoUDP (https://tools.ietf.org/html/rfc7510) is one among them.

The Bareudp tunnel module provides a generic L3 encapsulation support for
tunnelling different L3 protocols like MPLS, IP, NSH etc. inside a UDP tunnel.

MPLS·IP multiproto 처리

14-23

특수 처리

MPLS와 IP는 각각 여러 ethertype을 가질 수 있으므로 bareudp device가 이를 특별히 처리합니다.

MPLS에는 unicast용 `ETH_P_MPLS_UC`와 multicast용 `ETH_P_MPLS_MC`가 있고, IP에는 IPv4용 `ETH_P_IP`와 IPv6용 `ETH_P_IPV6`가 있습니다.

이 특수 처리는 `multiproto` mode flag로 활성화하며 기본 ethertype이 `ETH_P_IP` 또는 `ETH_P_MPLS_UC`일 때만 사용할 수 있습니다.

Special Handling
----------------

The bareudp device supports special handling for MPLS & IP as they can have
multiple ethertypes.
The MPLS protocol can have ethertypes ETH_P_MPLS_UC (unicast) & ETH_P_MPLS_MC (multicast).
IP protocol can have ethertypes ETH_P_IP (v4) & ETH_P_IPV6 (v6).
This special handling can be enabled only for ethertypes ETH_P_IP & ETH_P_MPLS_UC
with a flag called multiproto mode.

Device 생성·삭제와 data path

24-59

사용법

1. Device 생성·삭제: `ip link add dev bareudp0 type bareudp dstport 6635 ethertype mpls_uc`는 ethertype `0x8847`인 MPLS L3 traffic을 tunnel로 운반하는 `bareudp0`를 만듭니다. 송신 UDP header의 destination port는 6635이고 수신도 UDP port 6635에서 listen합니다. 삭제는 `ip link delete bareudp0`입니다.

2. `multiproto` mode로 생성: 이 mode는 같은 family의 여러 protocol을 한 bareudp tunnel에서 처리하며 현재 IP와 MPLS에만 제공됩니다. `multiproto` flag를 명시적으로 붙여야 합니다.

`ip link add dev bareudp0 type bareudp dstport 6635 ethertype ipv4 multiproto`로 IPv4 tunnel을 만들면 IPv6도 함께 처리합니다.

`ip link add dev bareudp0 type bareudp dstport 6635 ethertype mpls_uc multiproto`로 만들면 unicast와 multicast MPLS packet을 모두 처리합니다.

3. Device 사용: bareudp device는 OVS 또는 TC의 flower filter와 함께 사용할 수 있습니다. 송신 전에 OVS나 TC flower layer가 tunnel 정보를 SKB `dst` field에 설정해야 합니다. 수신 시 bareUDP device는 tunnel 정보를 추출해 SKB `dst` field에 저장한 뒤 packet buffer를 network stack으로 전달합니다.

Usage
------

1) Device creation & deletion

    a) ip link add dev bareudp0 type bareudp dstport 6635 ethertype mpls_uc

       This creates a bareudp tunnel device which tunnels L3 traffic with ethertype
       0x8847 (MPLS traffic). The destination port of the UDP header will be set to
       6635.The device will listen on UDP port 6635 to receive traffic.

    b) ip link delete bareudp0

2) Device creation with multiproto mode enabled

The multiproto mode allows bareudp tunnels to handle several protocols of the
same family. It is currently only available for IP and MPLS. This mode has to
be enabled explicitly with the "multiproto" flag.

    a) ip link add dev bareudp0 type bareudp dstport 6635 ethertype ipv4 multiproto

       For an IPv4 tunnel the multiproto mode allows the tunnel to also handle
       IPv6.

    b) ip link add dev bareudp0 type bareudp dstport 6635 ethertype mpls_uc multiproto

       For MPLS, the multiproto mode allows the tunnel to handle both unicast
       and multicast MPLS packets.

3) Device Usage

The bareudp device could be used along with OVS or flower filter in TC.
The OVS or TC flower layer must set the tunnel information in the SKB dst field before
sending the packet buffer to the bareudp device for transmission. On reception, the
bareUDP device extracts and stores the tunnel information in the SKB dst field before
passing the packet buffer to the network stack.