-
Notifications
You must be signed in to change notification settings - Fork 1
402 lines (360 loc) · 13.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
module ietf-softwire-common {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-softwire-common";
prefix softwire-common;
import ietf-inet-types {
prefix inet;
reference "Section 4 of RFC 6991";
}
import ietf-yang-types {
prefix yang;
reference "Section 3 of RFC 6991";
}
organization
"IETF Softwire Working Group";
contact
"WG Web: <https://datatracker.ietf.org/wg/softwire/>
WG List: <mailto:[email protected]>
Author: Qi Sun
<mailto:[email protected]>
Author: Linhui Sun
<mailto:[email protected]>
Author: Yong Cui
<mailto:[email protected]>
Editor: Ian Farrer
<mailto:[email protected]>
Author: Sladjana Zoric
<mailto:[email protected]>
Editor: Mohamed Boucadair
<mailto:[email protected]>
Author: Rajiv Asati
<mailto:[email protected]>";
description
"This document defines a YANG module defining types
common to all A+P modules.
Copyright (c) 2018 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices.";
revision 2018-10-23 {
description
"Initial revision.";
reference
"RFC XXXX: YANG Modules for IPv4-in-IPv6 Address plus Port
Softwires";
}
feature map-e {
description
"MAP-E is an IPv6 transition mechanism for transporting IPv4
packets across an IPv6 network using IP encapsulation. MAP-E
allows for a reduction of the amount of centralized state using
rules to express IPv4/IPv6 address mappings. This introduces an
algorithmic relationship between the IPv6 subnet and IPv4
address.
This feature indicates that the network element can function as
one or more MAP-E softwire instances.";
reference
"RFC7597: Mapping of Address and Port with Encapsulation (MAP-E)";
}
feature map-t {
description
"MAP-T is an IPv6 transition mechanism for transporting IPv4
packets across an IPv6 network using IP translation. It leverages
a double stateless NAT64 based solution as well as the stateless
algorithmic address & transport layer port mapping algorithm
defined for MAP-E.
This feature indicates that the network element can function as
one or more MAP-T softwire instances.";
reference
"RFC7599: Mapping of Address and Port using Translation (MAP-T)";
}
/*
* Groupings
*/
grouping algorithm-instance {
description
"A collection of parameters that is used fro MAP-E/MAP-T.";
leaf enable {
type boolean;
description
"Enable/disable an individual MAP-E or MAP-T rule.";
}
container algo-versioning {
description
"Version number for this algorithm instance";
leaf version {
type uint64;
description
"A version number for the mapping algorithm
rules provided to the algorithm instance";
}
leaf date {
type yang:date-and-time;
description
"Timestamp when the algorithm instance was activated.
An algorithm instance may be provided with mapping
rules that may change in time (for example, increase
the size of the port set). When an abuse party
presents an external IP address/port, the version
of the algorithm is important because depending on
the version, a distinct customer may be identified.
The timestamp is used as a key to find the appropriate
algorithm that was put into effect when an abuse
occurred. ";
reference
"RFC7422: Deterministic Address Mapping to Reduce
Logging in Carrier-Grade NAT Deployments";
}
}
choice data-plane {
description
"Selects MAP-E (encapsulation) or MAP-T
(translation)";
case encapsulation {
if-feature "map-e";
description
"encapsulation for MAP-E";
leaf br-ipv6-addr {
type inet:ipv6-address;
mandatory true;
description
"The IPv6 address of the MAP-E BR.";
}
}
case translation {
if-feature "map-t";
description
"translation for MAP-T";
leaf dmr-ipv6-prefix {
type inet:ipv6-prefix;
description
"The IPv6 prefix of the MAP-T BR.";
}
}
}
leaf ea-len {
type uint8;
mandatory true;
description
"Embedded Address (EA) bits are the IPv4 EA-bits in the IPv6
address identifying an IPv4 prefix/address (or part thereof)
or a shared IPv4 address (or part thereof) and a port-set
identifier. The length of the EA-bits is defined as part of
a MAP rule for a MAP domain.";
}
leaf rule-ipv6-prefix {
type inet:ipv6-prefix;
mandatory true;
description
"The Rule IPv6 prefix defined in the mapping rule.";
}
leaf rule-ipv4-prefix {
type inet:ipv4-prefix;
mandatory true;
description
"The Rule IPv4 prefix defined in the mapping rule.";
}
leaf forwarding {
type boolean;
mandatory true;
description
"This parameter specifies whether the rule may be used for
forwarding (FMR). If set, this rule is used as an FMR;
if not set, this rule is a Basic Mapping Rule (BMR) only
and must not be used for forwarding.";
}
}
grouping traffic-stat {
description
"Traffic statistics";
leaf sent-ipv4-packets {
type yang:zero-based-counter64;
description
"Number of decapsulated and forwarded IPv4 packets.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
'discontinuity-time'.";
}
leaf sent-ipv4-bytes {
type yang:zero-based-counter64;
description
"Decapsulated/translated IPv4 traffic sent, in bytes
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
'discontinuity-time'.";
}
leaf sent-ipv6-packets {
type yang:zero-based-counter64;
description
"Number of encapsulated IPv6 packets sent.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
'discontinuity-time'.";
}
leaf sent-ipv6-bytes {
type yang:zero-based-counter64;
description
"Encapsulated IPv6 traffic sent, in bytes
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
'discontinuity-time'.";
}
leaf rcvd-ipv4-packets {
type yang:zero-based-counter64;
description
"Number of incoming IPv4 packets at the
Internet-facing interface.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
'discontinuity-time'.";
}
leaf rcvd-ipv4-bytes {
type yang:zero-based-counter64;
description
"IPv4 traffic received for processing, in bytes.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
'discontinuity-time'.";
}
leaf rcvd-ipv6-packets {
type yang:zero-based-counter64;
description
"Number of IPv4-in-IPv6 packets received.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
'discontinuity-time'.";
}
leaf rcvd-ipv6-bytes {
type yang:zero-based-counter64;
description
"IPv4-in-IPv6 traffic received, in bytes.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
'discontinuity-time'.";
}
leaf dropped-ipv4-packets {
type yang:zero-based-counter64;
description
"Number of IPv4 packets dropped at the
Internet-facing interface.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
'discontinuity-time'.";
}
leaf dropped-ipv4-bytes {
type yang:zero-based-counter64;
description
"IPv4 traffic dropped at the Internet-facing
interface, in bytes.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
'discontinuity-time'.";
}
leaf dropped-ipv6-packets {
type yang:zero-based-counter64;
description
"Number of IPv4-in-IPv6 packets dropped.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
'discontinuity-time'.";
}
leaf dropped-ipv6-bytes {
type yang:zero-based-counter64;
description
"IPv4-in-IPv6 traffic dropped, in bytes.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
'discontinuity-time'.";
}
leaf dropped-ipv4-fragments {
type yang:zero-based-counter64;
description
"Number of fragmented IPv4 packets dropped.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
'discontinuity-time'.";
}
leaf dropped-ipv4-fragment-bytes {
type yang:zero-based-counter64;
description
"Fragmented IPv4 traffic dropped, in bytes.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
'discontinuity-time'.";
}
leaf ipv6-fragments-reassembled {
type yang:zero-based-counter64;
description
"Number of IPv6 fragments successfully reassembled.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
'discontinuity-time'.";
}
leaf ipv6-fragments-bytes-reassembled {
type yang:zero-based-counter64;
description
"IPv6 fragments successfully reassembled, in bytes.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
'discontinuity-time'.";
}
leaf out-icmpv4-error-packets {
type yang:zero-based-counter64;
description
"Internally generated ICMPv4 error packets.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
'discontinuity-time'.";
}
leaf out-icmpv4-error-bytes {
type yang:zero-based-counter64;
description
"Internally generated ICMPv4 error messages, in bytes.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
'discontinuity-time'.";
}
leaf out-icmpv6-error-packets {
type yang:zero-based-counter64;
description
"Internally generated ICMPv6 error packets.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
'discontinuity-time'.";
}
leaf out-icmpv6-error-bytes {
type yang:zero-based-counter64;
description
"Internally generated ICMPv6 error messages, in bytes.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
'discontinuity-time'.";
}
}
}