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

Linux 6.18.37 · Networking

Identifier Locator Addressing (ILA)

IPv6 주소의 고정 identifier와 동적 locator를 분리해 encapsulation 없이 overlay와 이동성을 구현하는 ILA를 설명합니다.

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

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

1. 요약·해설

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

요약·해설

ila.rst:1-296

ILA는 IPv6 목적지 상위 64비트만 SIR prefix와 locator 사이에서 번역하고 하위 identifier는 유지합니다. 일반 IPv6 packet 형태를 보존해 기존 offload와 multipath 최적화를 그대로 활용합니다.

ILA 핵심 변환
SIR prefix + IdentifierIngress 번역Locator + Identifier
Locator + IdentifierEgress 번역SIR prefix + Identifier

애플리케이션 주소와 network 주소 사이의 양방향 변환입니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 ===================================
4 Identifier Locator Addressing (ILA)
5 ===================================
6
7
8 Introduction
9 ============
10
11 Identifier-locator addressing (ILA) is a technique used with IPv6 that
12 differentiates between location and identity of a network node. Part of an
13 address expresses the immutable identity of the node, and another part
14 indicates the location of the node which can be dynamic. Identifier-locator
15 addressing can be used to efficiently implement overlay networks for
16 network virtualization as well as solutions for use cases in mobility.
17
18 ILA can be thought of as means to implement an overlay network without
19 encapsulation. This is accomplished by performing network address
20 translation on destination addresses as a packet traverses a network. To
21 the network, an ILA translated packet appears to be no different than any
22 other IPv6 packet. For instance, if the transport protocol is TCP then an
23 ILA translated packet looks like just another TCP/IPv6 packet. The
24 advantage of this is that ILA is transparent to the network so that
25 optimizations in the network, such as ECMP, RSS, GRO, GSO, etc., just work.
26
27 The ILA protocol is described in Internet-Draft draft-herbert-intarea-ila.
28
29
30 ILA terminology
31 ===============
32
33 - Identifier
34 A number that identifies an addressable node in the network
35 independent of its location. ILA identifiers are sixty-four
36 bit values.
37
38 - Locator
39 A network prefix that routes to a physical host. Locators
40 provide the topological location of an addressed node. ILA
41 locators are sixty-four bit prefixes.
42
43 - ILA mapping
44 A mapping of an ILA identifier to a locator (or to a
45 locator and meta data). An ILA domain maintains a database
46 that contains mappings for all destinations in the domain.
47
48 - SIR address
49 An IPv6 address composed of a SIR prefix (upper sixty-
50 four bits) and an identifier (lower sixty-four bits).
51 SIR addresses are visible to applications and provide a
52 means for them to address nodes independent of their
53 location.
54
55 - ILA address
56 An IPv6 address composed of a locator (upper sixty-four
57 bits) and an identifier (low order sixty-four bits). ILA
58 addresses are never visible to an application.
59
60 - ILA host
61 An end host that is capable of performing ILA translations
62 on transmit or receive.
63
64 - ILA router
65 A network node that performs ILA translation and forwarding
66 of translated packets.
67
68 - ILA forwarding cache
69 A type of ILA router that only maintains a working set
70 cache of mappings.
71
72 - ILA node
73 A network node capable of performing ILA translations. This
74 can be an ILA router, ILA forwarding cache, or ILA host.
75
76
77 Operation
78 =========
79
80 There are two fundamental operations with ILA:
81
82 - Translate a SIR address to an ILA address. This is performed on ingress
83 to an ILA overlay.
84
85 - Translate an ILA address to a SIR address. This is performed on egress
86 from the ILA overlay.
87
88 ILA can be deployed either on end hosts or intermediate devices in the
89 network; these are provided by "ILA hosts" and "ILA routers" respectively.
90 Configuration and datapath for these two points of deployment is somewhat
91 different.
92
93 The diagram below illustrates the flow of packets through ILA as well
94 as showing ILA hosts and routers::
95
96 +--------+ +--------+
97 | Host A +-+ +--->| Host B |
98 | | | (2) ILA (') | |
99 +--------+ | ...addressed.... ( ) +--------+
100 V +---+--+ . packet . +---+--+ (_)
101 (1) SIR | | ILA |----->-------->---->| ILA | | (3) SIR
102 addressed +->|router| . . |router|->-+ addressed
103 packet +---+--+ . IPv6 . +---+--+ packet
104 / . Network .
105 / . . +--+-++--------+
106 +--------+ / . . |ILA || Host |
107 | Host +--+ . .- -|host|| |
108 | | . . +--+-++--------+
109 +--------+ ................
110
111
112 Transport checksum handling
113 ===========================
114
115 When an address is translated by ILA, an encapsulated transport checksum
116 that includes the translated address in a pseudo header may be rendered
117 incorrect on the wire. This is a problem for intermediate devices,
118 including checksum offload in NICs, that process the checksum. There are
119 three options to deal with this:
120
121 - no action Allow the checksum to be incorrect on the wire. Before
122 a receiver verifies a checksum the ILA to SIR address
123 translation must be done.
124
125 - adjust transport checksum
126 When ILA translation is performed the packet is parsed
127 and if a transport layer checksum is found then it is
128 adjusted to reflect the correct checksum per the
129 translated address.
130
131 - checksum neutral mapping
132 When an address is translated the difference can be offset
133 elsewhere in a part of the packet that is covered by
134 the checksum. The low order sixteen bits of the identifier
135 are used. This method is preferred since it doesn't require
136 parsing a packet beyond the IP header and in most cases the
137 adjustment can be precomputed and saved with the mapping.
138
139 Note that the checksum neutral adjustment affects the low order sixteen
140 bits of the identifier. When ILA to SIR address translation is done on
141 egress the low order bits are restored to the original value which
142 restores the identifier as it was originally sent.
143
144
145 Identifier types
146 ================
147
148 ILA defines different types of identifiers for different use cases.
149
150 The defined types are:
151
152 0: interface identifier
153
154 1: locally unique identifier
155
156 2: virtual networking identifier for IPv4 address
157
158 3: virtual networking identifier for IPv6 unicast address
159
160 4: virtual networking identifier for IPv6 multicast address
161
162 5: non-local address identifier
163
164 In the current implementation of kernel ILA only locally unique identifiers
165 (LUID) are supported. LUID allows for a generic, unformatted 64 bit
166 identifier.
167
168
169 Identifier formats
170 ==================
171
172 Kernel ILA supports two optional fields in an identifier for formatting:
173 "C-bit" and "identifier type". The presence of these fields is determined
174 by configuration as demonstrated below.
175
176 If the identifier type is present it occupies the three highest order
177 bits of an identifier. The possible values are given in the above list.
178
179 If the C-bit is present, this is used as an indication that checksum
180 neutral mapping has been done. The C-bit can only be set in an
181 ILA address, never a SIR address.
182
183 In the simplest format the identifier types, C-bit, and checksum
184 adjustment value are not present so an identifier is considered an
185 unstructured sixty-four bit value::
186
187 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
188 | Identifier |
189 + +
190 | |
191 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
192
193 The checksum neutral adjustment may be configured to always be
194 present using neutral-map-auto. In this case there is no C-bit, but the
195 checksum adjustment is in the low order 16 bits. The identifier is
196 still sixty-four bits::
197
198 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
199 | Identifier |
200 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
201 | | Checksum-neutral adjustment |
202 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
203
204 The C-bit may used to explicitly indicate that checksum neutral
205 mapping has been applied to an ILA address. The format is::
206
207 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
208 | |C| Identifier |
209 | +-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
210 | | Checksum-neutral adjustment |
211 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
212
213 The identifier type field may be present to indicate the identifier
214 type. If it is not present then the type is inferred based on mapping
215 configuration. The checksum neutral adjustment may automatically
216 used with the identifier type as illustrated below::
217
218 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
219 | Type| Identifier |
220 +-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
221 | | Checksum-neutral adjustment |
222 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
223
224 If the identifier type and the C-bit can be present simultaneously so
225 the identifier format would be::
226
227 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
228 | Type|C| Identifier |
229 +-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
230 | | Checksum-neutral adjustment |
231 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
232
233
234 Configuration
235 =============
236
237 There are two methods to configure ILA mappings. One is by using LWT routes
238 and the other is ila_xlat (called from NFHOOK PREROUTING hook). ila_xlat
239 is intended to be used in the receive path for ILA hosts .
240
241 An ILA router has also been implemented in XDP. Description of that is
242 outside the scope of this document.
243
244 The usage of for ILA LWT routes is:
245
246 ip route add DEST/128 encap ila LOC csum-mode MODE ident-type TYPE via ADDR
247
248 Destination (DEST) can either be a SIR address (for an ILA host or ingress
249 ILA router) or an ILA address (egress ILA router). LOC is the sixty-four
250 bit locator (with format W:X:Y:Z) that overwrites the upper sixty-four
251 bits of the destination address. Checksum MODE is one of "no-action",
252 "adj-transport", "neutral-map", and "neutral-map-auto". If neutral-map is
253 set then the C-bit will be present. Identifier TYPE one of "luid" or
254 "use-format." In the case of use-format, the identifier type field is
255 present and the effective type is taken from that.
256
257 The usage of ila_xlat is:
258
259 ip ila add loc_match MATCH loc LOC csum-mode MODE ident-type TYPE
260
261 MATCH indicates the incoming locator that must be matched to apply
262 a the translaiton. LOC is the locator that overwrites the upper
263 sixty-four bits of the destination address. MODE and TYPE have the
264 same meanings as described above.
265
266
267 Some examples
268 =============
269
270 ::
271
272 # Configure an ILA route that uses checksum neutral mapping as well
273 # as type field. Note that the type field is set in the SIR address
274 # (the 2000 implies type is 1 which is LUID).
275 ip route add 3333:0:0:1:2000:0:1:87/128 encap ila 2001:0:87:0 \
276 csum-mode neutral-map ident-type use-format
277
278 # Configure an ILA LWT route that uses auto checksum neutral mapping
279 # (no C-bit) and configure identifier type to be LUID so that the
280 # identifier type field will not be present.
281 ip route add 3333:0:0:1:2000:0:2:87/128 encap ila 2001:0:87:1 \
282 csum-mode neutral-map-auto ident-type luid
283
284 ila_xlat configuration
285
286 # Configure an ILA to SIR mapping that matches a locator and overwrites
287 # it with a SIR address (3333:0:0:1 in this example). The C-bit and
288 # identifier field are used.
289 ip ila add loc_match 2001:0:119:0 loc 3333:0:0:1 \
290 csum-mode neutral-map-auto ident-type use-format
291
292 # Configure an ILA to SIR mapping where checksum neutral is automatically
293 # set without the C-bit and the identifier type is configured to be LUID
294 # so that the identifier type field is not present.
295 ip ila add loc_match 2001:0:119:0 loc 3333:0:0:1 \
296 csum-mode neutral-map-auto ident-type use-format
297

3. 한국어 전문 번역

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

소개

1-29

Identifier-Locator Addressing(ILA)는 IPv6 주소에서 네트워크 노드의 위치와 정체성을 분리하는 기법입니다. 주소 일부는 변하지 않는 노드 식별자를 나타내고 다른 일부는 동적으로 바뀔 수 있는 위치를 나타냅니다. 이 분리는 네트워크 가상화용 overlay와 이동성 시나리오를 효율적으로 구현하는 데 사용할 수 있습니다.

ILA는 encapsulation 없는 overlay로 볼 수 있습니다. 패킷이 네트워크를 통과할 때 목적지 주소를 번역하므로 네트워크에는 평범한 IPv6 패킷으로 보입니다. TCP라면 일반 TCP/IPv6 패킷과 구분되지 않습니다. 따라서 ILA를 의식하지 않는 ECMP, RSS, GRO, GSO 같은 네트워크 최적화가 그대로 작동합니다. 프로토콜은 Internet-Draft `draft-herbert-intarea-ila`에 설명되어 있습니다.

.. SPDX-License-Identifier: GPL-2.0

===================================
Identifier Locator Addressing (ILA)
===================================


Introduction
============

Identifier-locator addressing (ILA) is a technique used with IPv6 that
differentiates between location and identity of a network node. Part of an
address expresses the immutable identity of the node, and another part
indicates the location of the node which can be dynamic. Identifier-locator
addressing can be used to efficiently implement overlay networks for
network virtualization as well as solutions for use cases in mobility.

ILA can be thought of as means to implement an overlay network without
encapsulation. This is accomplished by performing network address
translation on destination addresses as a packet traverses a network. To
the network, an ILA translated packet appears to be no different than any
other IPv6 packet. For instance, if the transport protocol is TCP then an
ILA translated packet looks like just another TCP/IPv6 packet. The
advantage of this is that ILA is transparent to the network so that
optimizations in the network, such as ECMP, RSS, GRO, GSO, etc., just work.

The ILA protocol is described in Internet-Draft draft-herbert-intarea-ila.

ILA 용어

30-76

`Identifier`는 위치와 무관하게 주소 지정 가능한 노드를 식별하는 64비트 값입니다. `Locator`는 실제 host로 route되는 64비트 network prefix로, 노드의 topology상 위치를 나타냅니다. `ILA mapping`은 identifier를 locator 또는 locator와 metadata의 조합에 대응시키며 ILA domain은 모든 목적지 mapping database를 유지합니다.

`SIR address`는 상위 64비트 SIR prefix와 하위 64비트 identifier로 구성된 애플리케이션 공개 IPv6 주소입니다. 애플리케이션은 위치와 무관하게 이 주소로 노드를 지정합니다. `ILA address`는 상위 64비트 locator와 하위 64비트 identifier로 구성되며 애플리케이션에는 절대 노출되지 않습니다.

`ILA host`는 송신 또는 수신 시 주소 번역을 수행하는 end host입니다. `ILA router`는 번역과 forwarding을 맡는 중간 노드이고, `ILA forwarding cache`는 mapping 전체가 아니라 현재 작업 집합 cache만 유지하는 router입니다. 이 셋을 포괄해 번역 가능한 네트워크 노드를 `ILA node`라고 합니다.

ILA 주소 구성
주소상위 64비트하위 64비트애플리케이션 공개
SIRSIR prefixIdentifier
ILALocatorIdentifier아니요

애플리케이션 주소와 전송 주소의 상위 절반이 어떻게 다른지 보여 줍니다.

ILA terminology
===============

  - Identifier
                A number that identifies an addressable node in the network
                independent of its location. ILA identifiers are sixty-four
                bit values.

  - Locator
                A network prefix that routes to a physical host. Locators
                provide the topological location of an addressed node. ILA
                locators are sixty-four bit prefixes.

  - ILA mapping
                A mapping of an ILA identifier to a locator (or to a
                locator and meta data). An ILA domain maintains a database
                that contains mappings for all destinations in the domain.

  - SIR address
                An IPv6 address composed of a SIR prefix (upper sixty-
                four bits) and an identifier (lower sixty-four bits).
                SIR addresses are visible to applications and provide a
                means for them to address nodes independent of their
                location.

  - ILA address
                An IPv6 address composed of a locator (upper sixty-four
                bits) and an identifier (low order sixty-four bits). ILA
                addresses are never visible to an application.

  - ILA host
                An end host that is capable of performing ILA translations
                on transmit or receive.

  - ILA router
                A network node that performs ILA translation and forwarding
                of translated packets.

  - ILA forwarding cache
                A type of ILA router that only maintains a working set
                cache of mappings.

  - ILA node
                A network node capable of performing ILA translations. This
                can be an ILA router, ILA forwarding cache, or ILA host.

동작과 배치

77-111

ILA overlay ingress에서는 SIR 주소를 ILA 주소로 바꾸고 egress에서는 ILA 주소를 SIR 주소로 되돌립니다. 번역 지점은 end host의 ILA host 또는 중간 장치의 ILA router에 둘 수 있으며, 두 배치 방식은 설정과 data path가 다소 다릅니다.

원문 그림에서 Host A가 보낸 SIR 목적지 패킷은 ingress ILA router에서 ILA 주소로 번역되어 일반 IPv6 network를 지나고, egress ILA router에서 다시 SIR 주소가 되어 Host B에 도착합니다. 다른 경로에서는 ILA host 자체가 경계 번역을 수행할 수 있습니다.

ILA overlay 패킷 흐름
Host ASIR 주소 패킷Ingress ILA routerILA 주소 패킷일반 IPv6 네트워크Egress ILA routerSIR 주소 패킷Host B
End hostILA host에서 직접 번역일반 IPv6 네트워크

원문의 ASCII 그림을 동일한 의미의 구조화 경로로 다시 그렸습니다.

Operation
=========

There are two fundamental operations with ILA:

  - Translate a SIR address to an ILA address. This is performed on ingress
    to an ILA overlay.

  - Translate an ILA address to a SIR address. This is performed on egress
    from the ILA overlay.

ILA can be deployed either on end hosts or intermediate devices in the
network; these are provided by "ILA hosts" and "ILA routers" respectively.
Configuration and datapath for these two points of deployment is somewhat
different.

The diagram below illustrates the flow of packets through ILA as well
as showing ILA hosts and routers::

    +--------+                                                +--------+
    | Host A +-+                                         +--->| Host B |
    |        | |              (2) ILA                   (')   |        |
    +--------+ |            ...addressed....           (   )  +--------+
               V  +---+--+  .  packet      .  +---+--+  (_)
   (1) SIR     |  | ILA  |----->-------->---->| ILA  |   |   (3) SIR
    addressed  +->|router|  .              .  |router|->-+    addressed
    packet        +---+--+  .     IPv6     .  +---+--+        packet
                   /        .    Network   .
                  /         .              .   +--+-++--------+
    +--------+   /          .              .   |ILA ||  Host  |
    |  Host  +--+           .              .- -|host||        |
    |        |              .              .   +--+-++--------+
    +--------+              ................

전송 계층 checksum 처리

112-144

ILA가 주소를 바꾸면 pseudo header에 목적지 주소를 포함하는 TCP/UDP 같은 전송 계층 checksum이 wire상에서 틀릴 수 있습니다. NIC checksum offload를 포함해 중간 장치가 checksum을 처리할 때 문제가 되므로 세 가지 정책 중 하나를 사용합니다.

`no action`은 wire상 잘못된 checksum을 허용하고 수신자가 검증하기 전에 ILA 주소를 SIR로 되돌리게 합니다. `adjust transport checksum`은 번역 시 패킷을 전송 계층까지 parsing해 checksum 필드를 찾아 새 주소에 맞게 수정합니다.

`checksum neutral mapping`은 주소 번역으로 생기는 checksum 차이를 checksum 범위 안의 다른 필드에서 상쇄하며 identifier의 하위 16비트를 사용합니다. IP header 너머를 parsing할 필요가 없고 대부분 adjustment를 mapping과 함께 미리 계산해 둘 수 있어 권장됩니다. egress에서 ILA를 SIR로 되돌릴 때 하위 16비트를 원래 값으로 복구해 identifier도 원상 복원합니다.

Checksum 정책
모드처리특징
no-action수신 번역 전에만 올바르게 복구wire상 checksum 불일치 허용
adj-transport전송 header를 찾아 checksum 수정추가 parsing 필요
neutral-mapidentifier 하위 16비트로 차이 상쇄사전 계산 가능, 권장

ILA 주소 번역 후 checksum 일관성을 다루는 세 방식입니다.

Transport checksum handling
===========================

When an address is translated by ILA, an encapsulated transport checksum
that includes the translated address in a pseudo header may be rendered
incorrect on the wire. This is a problem for intermediate devices,
including checksum offload in NICs, that process the checksum. There are
three options to deal with this:

- no action        Allow the checksum to be incorrect on the wire. Before
                a receiver verifies a checksum the ILA to SIR address
                translation must be done.

- adjust transport checksum
                When ILA translation is performed the packet is parsed
                and if a transport layer checksum is found then it is
                adjusted to reflect the correct checksum per the
                translated address.

- checksum neutral mapping
                When an address is translated the difference can be offset
                elsewhere in a part of the packet that is covered by
                the checksum. The low order sixteen bits of the identifier
                are used. This method is preferred since it doesn't require
                parsing a packet beyond the IP header and in most cases the
                adjustment can be precomputed and saved with the mapping.

Note that the checksum neutral adjustment affects the low order sixteen
bits of the identifier. When ILA to SIR address translation is done on
egress the low order bits are restored to the original value which
restores the identifier as it was originally sent.

Identifier 유형

145-168

ILA identifier 유형은 0 interface identifier, 1 locally unique identifier, 2 IPv4 주소용 virtual networking identifier, 3 IPv6 unicast용 virtual networking identifier, 4 IPv6 multicast용 virtual networking identifier, 5 non-local address identifier입니다.

현재 커널 ILA 구현은 locally unique identifier(LUID)만 지원합니다. LUID는 별도 내부 형식이 없는 일반 64비트 식별자입니다.

Identifier types
================

ILA defines different types of identifiers for different use cases.

The defined types are:

      0: interface identifier

      1: locally unique identifier

      2: virtual networking identifier for IPv4 address

      3: virtual networking identifier for IPv6 unicast address

      4: virtual networking identifier for IPv6 multicast address

      5: non-local address identifier

In the current implementation of kernel ILA only locally unique identifiers
(LUID) are supported. LUID allows for a generic, unformatted 64 bit
identifier.

Identifier 형식

169-233

커널 ILA는 identifier를 구성하는 선택 필드로 `C-bit`와 3비트 `identifier type`을 지원합니다. 어떤 필드가 존재하는지는 mapping 설정으로 정합니다. type 필드가 있으면 최상위 3비트를 차지합니다. C-bit는 checksum-neutral mapping을 적용했음을 나타내며 ILA 주소에서만 설정할 수 있고 SIR 주소에는 설정할 수 없습니다.

가장 단순한 형식은 type, C-bit, checksum adjustment가 없는 비구조화 64비트 identifier입니다. `neutral-map-auto`를 항상 사용하도록 설정하면 C-bit 없이 하위 16비트에 checksum-neutral adjustment가 들어갑니다. 명시적인 C-bit 형식은 C-bit를 세우고 같은 하위 16비트를 adjustment로 사용합니다.

type 필드가 있으면 별도 mapping 설정 없이 identifier 자체에서 유형을 읽을 수 있습니다. type과 자동 checksum adjustment를 함께 쓸 수 있고, type과 C-bit를 동시에 배치해 명시적 checksum-neutral 적용 여부까지 표현할 수도 있습니다.

64비트 Identifier 형식
형식상위 필드중간하위 16비트
단순없음IdentifierIdentifier 일부
neutral-map-auto없음IdentifierChecksum-neutral adjustment
C-bitCIdentifierChecksum-neutral adjustment
Type + autoType(3비트)IdentifierChecksum-neutral adjustment
Type + C-bitType(3비트) + CIdentifierChecksum-neutral adjustment

원문의 비트 ASCII 그림을 필드 단위로 재구성했습니다.

Identifier formats
==================

Kernel ILA supports two optional fields in an identifier for formatting:
"C-bit" and "identifier type". The presence of these fields is determined
by configuration as demonstrated below.

If the identifier type is present it occupies the three highest order
bits of an identifier. The possible values are given in the above list.

If the C-bit is present,  this is used as an indication that checksum
neutral mapping has been done. The C-bit can only be set in an
ILA address, never a SIR address.

In the simplest format the identifier types, C-bit, and checksum
adjustment value are not present so an identifier is considered an
unstructured sixty-four bit value::

     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                            Identifier                         |
     +                                                               +
     |                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The checksum neutral adjustment may be configured to always be
present using neutral-map-auto. In this case there is no C-bit, but the
checksum adjustment is in the low order 16 bits. The identifier is
still sixty-four bits::

     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                            Identifier                         |
     |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                               |  Checksum-neutral adjustment  |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The C-bit may used to explicitly indicate that checksum neutral
mapping has been applied to an ILA address. The format is::

     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |     |C|                    Identifier                         |
     |     +-+                       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                               |  Checksum-neutral adjustment  |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The identifier type field may be present to indicate the identifier
type. If it is not present then the type is inferred based on mapping
configuration. The checksum neutral adjustment may automatically
used with the identifier type as illustrated below::

     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     | Type|                      Identifier                         |
     +-+-+-+                         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                               |  Checksum-neutral adjustment  |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

If the identifier type and the C-bit can be present simultaneously so
the identifier format would be::

     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     | Type|C|                    Identifier                         |
     +-+-+-+-+                       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                               |  Checksum-neutral adjustment  |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

설정

234-266

ILA mapping은 LWT route 또는 netfilter `PREROUTING` hook에서 호출하는 `ila_xlat`로 설정합니다. `ila_xlat`은 주로 ILA host 수신 경로용입니다. XDP 기반 ILA router도 구현되어 있지만 이 문서 범위에는 포함되지 않습니다.

LWT route 문법은 `ip route add DEST/128 encap ila LOC csum-mode MODE ident-type TYPE via ADDR`입니다. `DEST`는 ILA host/ingress router의 SIR 주소 또는 egress router의 ILA 주소입니다. `LOC`는 목적지 상위 64비트를 덮는 `W:X:Y:Z` 형식 locator입니다. `MODE`는 `no-action`, `adj-transport`, `neutral-map`, `neutral-map-auto` 중 하나이며 `neutral-map`이면 C-bit가 존재합니다.

`TYPE`은 `luid` 또는 `use-format`입니다. `use-format`이면 identifier type 필드가 존재하고 실제 유형을 그 필드에서 읽습니다. `ila_xlat` 문법은 `ip ila add loc_match MATCH loc LOC csum-mode MODE ident-type TYPE`이며 `MATCH`와 일치하는 입력 locator를 `LOC`로 덮습니다. checksum mode와 type의 의미는 LWT route와 같습니다.

Configuration
=============

There are two methods to configure ILA mappings. One is by using LWT routes
and the other is ila_xlat (called from NFHOOK PREROUTING hook). ila_xlat
is intended to be used in the receive path for ILA hosts .

An ILA router has also been implemented in XDP. Description of that is
outside the scope of this document.

The usage of for ILA LWT routes is:

ip route add DEST/128 encap ila LOC csum-mode MODE ident-type TYPE via ADDR

Destination (DEST) can either be a SIR address (for an ILA host or ingress
ILA router) or an ILA address (egress ILA router). LOC is the sixty-four
bit locator (with format W:X:Y:Z) that overwrites the upper sixty-four
bits of the destination address.  Checksum MODE is one of "no-action",
"adj-transport", "neutral-map", and "neutral-map-auto". If neutral-map is
set then the C-bit will be present. Identifier TYPE one of "luid" or
"use-format." In the case of use-format, the identifier type field is
present and the effective type is taken from that.

The usage of ila_xlat is:

ip ila add loc_match MATCH loc LOC csum-mode MODE ident-type TYPE

MATCH indicates the incoming locator that must be matched to apply
a the translaiton. LOC is the locator that overwrites the upper
sixty-four bits of the destination address. MODE and TYPE have the
same meanings as described above.

설정 예제

267-296

첫 LWT 예제는 SIR 주소의 `2000` 값으로 type 1인 LUID를 나타내고 `neutral-map`과 `use-format`을 사용해 C-bit와 type 필드를 모두 사용합니다. 둘째 route는 `neutral-map-auto`와 명시적 `luid`를 사용하므로 C-bit와 type 필드가 없고 checksum adjustment만 자동 적용됩니다.

`ila_xlat` 예제는 입력 locator `2001:0:119:0`을 SIR prefix `3333:0:0:1`로 덮습니다. 원문은 C-bit/type 형식을 이용하는 변형과 자동 checksum-neutral 및 LUID 설정 변형을 명령행 그대로 제공합니다.

Some examples
=============

::

     # Configure an ILA route that uses checksum neutral mapping as well
     # as type field. Note that the type field is set in the SIR address
     # (the 2000 implies type is 1 which is LUID).
     ip route add 3333:0:0:1:2000:0:1:87/128 encap ila 2001:0:87:0 \
          csum-mode neutral-map ident-type use-format

     # Configure an ILA LWT route that uses auto checksum neutral mapping
     # (no C-bit) and configure identifier type to be LUID so that the
     # identifier type field will not be present.
     ip route add 3333:0:0:1:2000:0:2:87/128 encap ila 2001:0:87:1 \
          csum-mode neutral-map-auto ident-type luid

     ila_xlat configuration

     # Configure an ILA to SIR mapping that matches a locator and overwrites
     # it with a SIR address (3333:0:0:1 in this example). The C-bit and
     # identifier field are used.
     ip ila add loc_match 2001:0:119:0 loc 3333:0:0:1 \
         csum-mode neutral-map-auto ident-type use-format

     # Configure an ILA to SIR mapping where checksum neutral is automatically
     # set without the C-bit and the identifier type is configured to be LUID
     # so that the identifier type field is not present.
     ip ila add loc_match 2001:0:119:0 loc 3333:0:0:1 \
         csum-mode neutral-map-auto ident-type use-format