-
Notifications
You must be signed in to change notification settings - Fork 1
249 lines (218 loc) · 7.61 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
module ietf-softwire-ce {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-softwire-ce";
prefix softwire-ce;
import ietf-inet-types {
prefix inet;
reference "Section 4 of RFC 6991";
}
import ietf-interfaces {
prefix if;
reference "RFC 8343: A YANG Data Model for Interface Management";
}
import ietf-softwire-common {
prefix softwire-common;
reference
"RFC XXXX: YANG Modules for IPv4-in-IPv6 Address plus Port
Softwires";
}
import iana-tunnel-type {
prefix iana-tunnel-type;
reference
"RFC YYYY: Tunnel Interface Types YANG Module";
}
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 for the configuration and
management of A+P Softwire Customer Premises Equipment (CEs). It
covers Lightweight 4over6, MAP-E, and MAP-T mechanisms.
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";
}
/*
* Features
*/
feature binding-mode {
description
"Binding is used for configuring the Lightweight 4over6 mechanism.
Binding based softwire mechanisms are IPv4-over-IPv6 tunnelling
transition mechanisms specifically intended for complete
independence between the IPv6 subnet prefix (and IPv6 address)
and IPv4 address, with or without IPv4 address sharing.
This is accomplished by maintaining state for each softwire
(per-subscriber state) in the central Border Relay (BR) and using
a hub-and-spoke forwarding architecture. In order to delegate the
NAPT function and achieve IPv4 address sharing, port-restricted
IPv4 addresses needs to be allocated to CEs.
This feature indicates that the network element can function as
one or more binding based softwire instances.";
reference
"RFC7596: Lightweight 4over6: An Extension to the Dual-Stack Lite
Architecture
RFC7597: Mapping of Address and Port with Encapsulation (MAP-E)
RFC7599: Mapping of Address and Port using Translation (MAP-T)";
}
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)";
}
// Binding Entry
grouping binding-entry {
description
"The binding BR (Border Relay) maintains an address binding table
that contains the binding between the CE's IPv6 address,
the allocated IPv4 address and restricted port-set.";
leaf binding-ipv6info {
type union {
type inet:ipv6-address;
type inet:ipv6-prefix;
}
description
"The IPv6 information for a binding entry.
When the IPv6 prefix type is used,
the IPv6 source address of the CE is constructed
according to the description in RFC7596.
If the IPv6 address type is used, the CE can use
any valid /128 address from a prefix assigned to
the CE.";
reference "Section 5.1 of RFC7596.";
}
leaf br-ipv6-addr {
type inet:ipv6-address;
mandatory true;
description
"The IPv6 address of the binding BR.";
}
}
// configuration and stateful parameters for softwire CE interface
augment "/if:interfaces/if:interface" {
when "derived-from(if:type, 'iana-tunnel-type:aplusp')";
description
"Softwire CE interface configuration";
leaf softwire-payload-mtu {
type uint16;
units "bytes";
description
"The payload IPv4 MTU for the softwire tunnel.";
}
leaf softwire-path-mru {
type uint16;
units "bytes";
description
"The path MRU for the softwire (payload + encapsulation
overhead).";
reference
"RFC 4213: Basic Transition Mechanisms for IPv6 Hosts and
Routers";
}
choice ce-type {
description
"Sets the softwire CE mechanism";
case binding {
if-feature "binding-mode";
description
"CE binding configuration";
uses binding-entry;
}
case algo {
if-feature "map-e or map-t";
description
"CE algorithm configuration";
container algo-instances {
description
"Collection of MAP-E/MAP-T parameters";
list algo-instance {
key "name";
description
"MAP forwarding rule instance for
MAP-E/MAP-T";
leaf name {
type string;
mandatory true;
description
"The name is used to uniquely identify an algorithm
instance.
This name can be automatically assigned
or explicitly configured.";
}
uses softwire-common:algorithm-instance;
}
}
}
}
}
augment "/if:interfaces/if:interface/if:statistics" {
when "derived-from(../if:type, 'iana-tunnel-type:aplusp')";
description
"Softwire CE interface statistics.";
uses softwire-common:traffic-stat;
}
/*
* Notifications
*/
notification softwire-ce-event {
if-feature "binding-mode";
description
"CE notification";
leaf ce-binding-ipv6-addr-change {
type inet:ipv6-address;
mandatory true;
description
"This notification is generated whenever the CE's binding IPv6
address changes for any reason.";
}
}
}