-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdraft-ietf-softwire-map.xml
1587 lines (1319 loc) · 69.3 KB
/
draft-ietf-softwire-map.xml
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
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="US-ASCII"?>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY rfc3633 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3633.xml">
<!ENTITY rfc3056 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3056.xml">
<!ENTITY rfc1933 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1933.xml">
<!ENTITY rfc5969 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5969.xml">
<!ENTITY rfc2529 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2529.xml">
<!ENTITY rfc5214 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5214.xml">
<!ENTITY rfc4380 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4380.xml">
<!ENTITY rfc2766 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2766.xml">
<!ENTITY rfc6052 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6052.xml">
<!ENTITY rfc6145 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6145.xml">
<!ENTITY rfc6146 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6146.xml">
<!ENTITY rfc6333 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6333.xml">
<!ENTITY rfc6346 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6346.xml">
<!ENTITY rfc6269 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6269.xml">
<!ENTITY rfc6250 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6250.xml">
<!ENTITY rfc2663 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2663.xml">
<!ENTITY rfc0792 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.0792.xml">
<!ENTITY rfc4443 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4443.xml">
<!ENTITY rfc0897 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.0897.xml">
<!ENTITY rfc6324 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6324.xml">
<!ENTITY rfc2827 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2827.xml">
<!ENTITY rfc4953 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4953.xml">
<!ENTITY rfc5961 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5961.xml">
<!ENTITY rfc6056 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6056.xml">
<!ENTITY rfc4787 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4787.xml">
<!ENTITY rfc5508 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5508.xml">
<!ENTITY rfc5382 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5382.xml">
<!ENTITY rfc2473 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2473.xml">
<!ENTITY rfc4862 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4862.xml">
<!ENTITY rfc4632 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4632.xml">
<!ENTITY rfc4459 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4459.xml">
<!ENTITY rfc1858 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1858.xml">
<!ENTITY rfc3128 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3128.xml">
<!ENTITY rfc4963 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4963.xml">
<!ENTITY rfc5625 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5625.xml">
<!ENTITY rfc6864 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6864.xml">
<!ENTITY rfc6335 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6335.xml">
<!ENTITY I-D.ietf-softwire-map-dhcp SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-softwire-map-dhcp.xml">
<!ENTITY I-D.ietf-softwire-stateless-4v6-motivation SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-softwire-stateless-4v6-motivation.xml">
<!ENTITY I-D.ietf-softwire-map-deployment SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-softwire-map-deployment.xml">
]>
<?rfc toc="yes" ?>
<?rfc tocompact="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc comments="yes" ?>
<?rfc inline="yes" ?>
<rfc category="std" docName="draft-ietf-softwire-map-13" ipr="trust200902">
<front>
<title abbrev="MAP">Mapping of Address and Port with Encapsulation
(MAP)</title>
<author fullname="Ole Troan" initials="O" surname="Troan" role="editor">
<organization>Cisco Systems</organization>
<address>
<postal>
<street>Philip Pedersens vei 1</street>
<city>Lysaker</city>
<code>1366</code>
<country>Norway</country>
</postal>
<email>ot@cisco.com</email>
</address>
</author>
<author fullname="Wojciech Dec" initials="W" surname="Dec">
<organization>Cisco Systems</organization>
<address>
<postal>
<street>Haarlerbergpark Haarlerbergweg 13-19</street>
<city>Amsterdam, NOORD-HOLLAND</city>
<code>1101 CH</code>
<country>Netherlands</country>
</postal>
<phone></phone>
<email>wdec@cisco.com</email>
</address>
</author>
<author fullname="Xing Li" initials="X" surname="Li">
<organization abbrev="">CERNET Center/Tsinghua University</organization>
<address>
<postal>
<street>Room 225, Main Building, Tsinghua University</street>
<city>Beijing 100084</city>
<country>People's Republic of China</country>
</postal>
<email>xing@cernet.edu.cn</email>
</address>
</author>
<author fullname="Congxiao Bao" initials="C" surname="Bao">
<organization abbrev="">CERNET Center/Tsinghua University</organization>
<address>
<postal>
<street>Room 225, Main Building, Tsinghua University</street>
<city>Beijing 100084</city>
<country>People's Republic of China</country>
</postal>
<email>congxiao@cernet.edu.cn</email>
</address>
</author>
<author fullname="Satoru Matsushima" initials="S" surname="Matsushima">
<organization abbrev="">SoftBank Telecom</organization>
<address>
<postal>
<street>1-9-1 Higashi-Shinbashi, Munato-ku</street>
<city>Tokyo</city>
<country>Japan</country>
</postal>
<email>satoru.matsushima@g.softbank.co.jp</email>
</address>
</author>
<author fullname="Tetsuya Murakami" initials="T" surname="Murakami">
<organization abbrev="">IP Infusion</organization>
<address>
<postal>
<street>1188 East Arques Avenue</street>
<city>Sunnyvale</city>
<country>USA</country>
</postal>
<email>tetsuya@ipinfusion.com</email>
</address>
</author>
<author fullname="Tom Taylor" initials="T" surname="Taylor" role="editor">
<organization abbrev="">Huawei Technologies</organization>
<address>
<postal>
<street></street>
<city>Ottawa</city>
<country>Canada</country>
</postal>
<email>tom.taylor.stds@gmail.com</email>
</address>
</author>
<date year="2015" />
<area>Internet</area>
<workgroup>Network Working Group</workgroup>
<!-- SECTION 0: Abstract -->
<abstract>
<t>This document describes a mechanism for transporting IPv4 packets
across an IPv6 network using IP encapsulation, and a generic mechanism
for mapping between IPv6 addresses and IPv4 addresses and transport
layer ports.</t>
</abstract>
</front>
<middle>
<!-- SECTION 1: Introduction -->
<section title="Introduction">
<t>Mapping of IPv4 addresses in IPv6 addresses has been
described in numerous mechanisms dating back to 1995 <xref
target="RFC1933"></xref>. The Automatic tunneling mechanism
described in RFC1933 assigned a globally unique IPv6 address to
a host by combining the host's IPv4 address with a well-known
IPv6 prefix. Given an IPv6 packet with a destination address
with an embedded IPv4 address, a node could automatically tunnel
this packet by extracting the IPv4 tunnel end-point address from
the IPv6 destination address.</t>
<t>There are numerous variations of this idea, described in 6over4 <xref
target="RFC2529"></xref>, 6to4 <xref target="RFC3056"></xref>, ISATAP
<xref target="RFC5214"></xref>, and 6rd <xref
target="RFC5969"></xref>.</t>
<t>The commonalities of all these IPv6 over IPv4 mechanisms are: <list
style="symbols">
<t>Automatically provisions an IPv6 address for a host or an IPv6
prefix for a site</t>
<t>Algorithmic or implicit address resolution of tunnel end point
addresses. Given an IPv6 destination address, an IPv4 tunnel
endpoint address can be calculated.</t>
<t>Embedding of an IPv4 address or part thereof into an IPv6
address.</t>
</list></t>
<t>In later phases of IPv4 to IPv6 migration, it is expected
that IPv6-only networks will be common, while there will still
be a need for residual IPv4 deployment. This document describes
a generic mapping of IPv4 to IPv6, and a mechanism for
encapsulating IPv4 over IPv6.</t>
<t>Just as the IPv6 over IPv4 mechanisms referred to above, the residual
IPv4 over IPv6 mechanism must be capable of:</t>
<t><list style="symbols">
<t>Provisioning an IPv4 prefix, an IPv4 address or a shared IPv4
address.</t>
<t>Algorithmically map between either an IPv4 prefix, an
IPv4 address or a shared IPv4 address and an IPv6
address.</t>
</list></t>
<t>The mapping scheme described here supports encapsulation of
IPv4 packets in IPv6 in both mesh and hub-and-spoke topologies,
including address mappings with full independence between IPv6
and IPv4 addresses.</t>
<t>This document describes delivery of IPv4 unicast service across an
IPv6 infrastructure. IPv4 multicast is not considered further in this
document.</t>
<t>The A+P (Address and Port) architecture of sharing an IPv4
address by distributing the port space is described in <xref
target="RFC6346"></xref>. Specifically section 4 of <xref
target="RFC6346"></xref> covers stateless mapping. The
corresponding stateful solution DS-lite is described in <xref
target="RFC6333"></xref>. The motivation for this work is
described in <xref
target="I-D.ietf-softwire-stateless-4v6-motivation"></xref>.</t>
<t>A companion document defines a DHCPv6 option for provisioning
of MAP <xref target="I-D.ietf-softwire-map-dhcp"></xref>. Other
means of provisioning are possible. Deployment considerations
are described in <xref
target="I-D.ietf-softwire-map-deployment"/>.</t>
<t>MAP relies on IPv6 and is designed to deliver dual-stack
service while allowing IPv4 to be phased out within the service
provider's (SP) network. The phasing out of IPv4 within the SP
network is independent of whether the end user disables IPv4
service or not. Further, "greenfield"; IPv6-only networks may
use MAP in order to deliver IPv4 to sites via the IPv6
network.</t>
</section>
<!-- SECTION 2: REQUIREMENTS LANGUAGE -->
<section anchor="conventions" title="Conventions">
<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 <xref
target="RFC2119"></xref>.</t>
</section>
<!-- conventions -->
<section title="Terminology">
<t><list hangIndent="24" style="hanging">
<t hangText="MAP domain:">One or more MAP CEs and BRs connected to
the same virtual link. A service provider may deploy a single MAP
domain, or may utilize multiple MAP domains.</t>
<t hangText="MAP rule">A set of parameters describing the mapping
between an IPv4 prefix, IPv4 address or shared IPv4 address and an
IPv6 prefix or address. Each domain uses a different mapping rule
set.</t>
<t hangText="MAP node">A device that implements MAP.</t>
<t hangText="MAP Border Relay (BR):">A MAP enabled router managed by
the service provider at the edge of a MAP domain. A Border Relay
router has at least an IPv6-enabled interface and an IPv4 interface
connected to the native IPv4 network. A MAP BR may also be referred
to simply as a "BR" within the context of MAP.</t>
<t hangText="MAP Customer Edge (CE):">A device functioning as a
Customer Edge router in a MAP deployment. A typical MAP CE adopting
MAP rules will serve a residential site with one WAN side interface,
and one or more LAN side interfaces. A MAP CE may also be referred
to simply as a "CE" within the context of MAP.</t>
<t hangText="Port-set:">The separate part of the transport layer
port space; denoted as a port-set.</t>
<t hangText="Port-set ID (PSID):">Algorithmically identifies a set
of ports exclusively assigned to a CE.</t>
<t hangText="Shared IPv4 address:">An IPv4 address that is shared
among multiple CEs. Only ports that belong to the assigned port-set
can be used for communication. Also known as a Port-Restricted IPv4
address.</t>
<t hangText="End-user IPv6 prefix:">The IPv6 prefix assigned
to an End-user CE by other means than MAP
itself. E.g., Provisioned using DHCPv6 PD <xref
target="RFC3633"></xref>, assigned via SLAAC <xref
target="RFC4862"/>, or configured manually. It is unique for
each CE.</t>
<t hangText="MAP IPv6 address:">The IPv6 address used to reach the
MAP function of a CE from other CEs and from BRs.</t>
<t hangText="Rule IPv6 prefix:">An IPv6 prefix assigned by a Service
Provider for a mapping rule.</t>
<t hangText="Rule IPv4 prefix:">An IPv4 prefix assigned by a Service
Provider for a mapping rule.</t>
<t hangText="Embedded Address (EA) bits:">The IPv4 EA-bits in the
IPv6 address identify an IPv4 prefix/address (or part thereof) or a
shared IPv4 address (or part thereof) and a port-set identifier.</t>
</list></t>
</section>
<!-- SECTION 3: DESCRIPTION -->
<section title="Architecture">
<t>In accordance with the requirements stated above, the MAP
mechanism can operate with shared IPv4 addresses, full IPv4
addresses or IPv4 prefixes. Operation with shared IPv4 addresses
is described here, and the differences for full IPv4 addresses
and prefixes are described below.</t>
<t>The MAP mechanism uses existing standard building blocks.
The existing NAPT <xref target="RFC2663"/> on the CE is used
with additional support for restricting transport protocol
ports, ICMP identifiers and fragment identifiers to the
configured port-set. For packets outbound from the private IPv4
network, the CE NAPT MUST translate transport identifiers (e.g.,
TCP and UDP port numbers) so that they fall within the CE's
assigned port-range.</t>
<t>The NAPT MUST in turn be connected to a MAP-aware forwarding
function, that does encapsulation / decapsulation of IPv4 packets
in IPv6. MAP supports the encapsulation mode specified in <xref
target="RFC2473"/>. In addition MAP specifies an algorithm to
do "address resolution" from an IPv4 address and port to an IPv6
address. This algorithmic mapping is specified in <xref
target="mapping_algorithm"/>.</t>
<t>The MAP architecture described here restricts the use of the
shared IPv4 address to only be used as the global address
(outside) of the NAPT running on the
CE. A shared IPv4 address MUST NOT be used to identify an
interface. While it is theoretically possible to make host
stacks and applications port-aware, it would be a drastic change
to the IP model <xref target="RFC6250"/>.</t>
<t>For full IPv4 addresses and IPv4 prefixes, the architecture
just described applies with two differences. First, a full IPv4
address or IPv4 prefix can be used as it is today, e.g., for
identifying an interface or as a DHCP pool,
respectively. Secondly, the NAPT is not required to restrict the
ports used on outgoing packets.</t>
<t>This architecture is illustrated in <xref target="topology"/>.</t>
<figure align="center" anchor="topology" title="Network Topology">
<preamble></preamble>
<artwork align="center"><![CDATA[
User N
Private IPv4
| Network
|
O--+---------------O
| | MAP CE |
| +-----+--------+ |
| NAPT44| MAP | |
| +-----+ | |\ ,-------. .------.
| +--------+ | \ ,-' `-. ,-' `-.
O------------------O / \ O---------O / Public \
/ IPv6 only \ | MAP | / IPv4 \
( Network --+ Border +- Network )
\ (MAP Domain) / | Relay | \ /
O------------------O \ / O---------O \ /
| MAP CE | /". ,-' `-. ,-'
| +-----+--------+ | / `----+--' ------'
| NAPT44| MAP | |/
| +-----+ | |
| | +--------+ |
O---+--------------O
|
User M
Private IPv4
Network
]]></artwork>
</figure>
<t>The MAP BR connects one or more MAP domains to external IPv4
networks.</t>
</section>
<section anchor="mapping_algorithm" title="Mapping Algorithm">
<t>A MAP node is provisioned with one or more mapping rules.</t>
<t>Mapping rules are used differently depending on their
function. Every MAP node must be provisioned with a Basic
mapping rule. This is used by the node to configure its IPv4
address, IPv4 prefix or shared IPv4 address. This same basic
rule can also be used for forwarding, where an IPv4 destination
address and optionally a destination port are mapped into an
IPv6 address. Additional mapping rules are specified to allow
for multiple different IPv4 sub-nets to exist within the domain
and optimize forwarding between them.</t>
<t>Traffic outside of the domain (i.e., when the destination IPv4 address
does not match (using longest matching prefix) any Rule IPv4 prefix in
the Rules database) is forwarded to the BR.</t>
<t>There are two types of mapping rules: <list style="numbers">
<t>Basic Mapping Rule (BMR) - mandatory. A CE can be provisioned
with multiple End-user IPv6 prefixes. There can only be one
Basic Mapping Rule per End-user IPv6 prefix. However all CE's
having End-user IPv6 prefixes within (aggregated by) the same
Rule IPv6 prefix may share the same Basic Mapping Rule. In
combination with the End-user IPv6 prefix, the Basic Mapping
Rule is used to derive the IPv4 prefix, address, or shared
address and the PSID assigned to the CE.</t>
<t>Forwarding Mapping Rule (FMR) - optional, used for
forwarding. The Basic Mapping Rule may also be a Forwarding
Mapping Rule. Each Forwarding Mapping Rule will result in an
entry in the Rules table for the Rule IPv4 prefix. Given a
destination IPv4 address and port within the MAP domain, a MAP
node can use the matching FMR to derive the End-user IPv6
address of the interface through which that IPv4 destination
address and port combination can be reached. In hub and spoke
mode there are no FMRs.</t>
</list></t>
<t>Both mapping rules share the same parameters:<list style="symbols">
<t>Rule IPv6 prefix (including prefix length)</t>
<t>Rule IPv4 prefix (including prefix length)</t>
<t>Rule EA-bits length (in bits)</t>
<!-- <t>Rule Port Parameters (optional)</t>-->
</list></t>
<t>A MAP node finds its BMR by doing a longest match between the
End-user IPv6 prefix and the Rule IPv6 prefix in the Mapping
Rules table. The rule is then used for IPv4 prefix, address or
shared address assignment.</t>
<t>A MAP IPv6 address is formed from the BMR Rule IPv6 prefix. This
address MUST be assigned to an interface of the MAP node and is used to
terminate all MAP traffic being sent or received to the node.</t>
<t>Port-restricted IPv4 routes are installed in the Rules table
for all the Forwarding Mapping Rules, and a default route is
installed to the MAP BR (see <xref
target="outside-domain"/>).</t>
<t>Forwarding Mapping Rules are used to allow direct communication
between MAP CEs, known as mesh mode. In hub and spoke mode,
there are no forwarding mapping rules, all traffic MUST be forwarded
directly to the BR.</t>
<t>While an FMR is optional in the sense that a MAP CE MAY be
configured with zero or more FMRs depending on the deployment,
all MAP CEs MUST implement support for both rule types.</t>
<section title="Port mapping algorithm" anchor="portmap">
<t>The port mapping algorithm is used in domains whose rules allow
IPv4 address sharing.</t>
<t>The simplest way to represent a port range is using a
notation similar to CIDR <xref target="RFC4632"/>. For example
the first 256 ports are represented as port prefix 0.0/8. The
last 256 ports as 255.0/8. In hexadecimal, 0x0000/8 (PSID = 0)
and 0xFF00/8 (PSID = 0xFF). Using this technique, but wishing
to avoid allocating the system ports <xref
target="RFC6335"/> to the user, one would
have to exclude the use of one or more PSIDs (e.g., PSIDs 0 to
3 in the example just given).
</t>
<t>When the PSID is embedded in the End-user IPv6 prefix, then
to minimize dependencies between the End-user IPv6 prefix and
the assigned port-set, it is desirable to minimize the
restrictions of possible PSID values. This is achieved by
using an infix representation of the port value. Using such a
representation, the well-known ports are excluded by
restrictions on the value of the high-order bitfield (A)
rather than the PSID.</t>
<t>The infix algorithm allocates ports to a given CE as a series of
contiguous ranges spaced at regular intervals throughout the
complete range of possible port-set values.</t>
<t><figure align="left" anchor="psid-fig"
title="Structure of a port-restricted port field">
<preamble></preamble>
<artwork align="left"><![CDATA[
0 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+-----------+-----------+-------+
Ports in | A | PSID | M |
the CE port-set | > 0 | | |
+-----------+-----------+-------+
| a bits | k bits |m bits |
]]></artwork>
</figure></t>
<t><list style="hanging">
<t hangText="a bits:">The number of offset bits. 6 by
default as this excludes the system ports (0-1023).
To guarantee non-overlapping port sets, the offset 'a'
MUST be the same for every MAP CE sharing the same
address.</t>
<t hangText="A:">Selects the range of the port number. For 'a'
> 0, A MUST be larger than 0. This ensures that the
algorithm excludes the system ports. For the default value
of 'a' (6), the system ports, are excluded by requiring that A
be greater than 0. Smaller values of 'a' excludes a larger
initial range. E.g., 'a' = 4, will exclude ports 0 - 4095. The
interval between initial port numbers of successive contiguous
ranges assigned to the same user is 2^(16-a).</t>
<t hangText="k bits:">The length in bits of the PSID
field. To guarantee non-overlapping port sets, the length 'k'
MUST be the same for every MAP CE sharing the same
address. The sharing ratio is 2^k. The number of ports
assigned to the user is 2^(16-k) - 2^m (excluded ports)</t>
<t hangText="PSID:">The Port-Set Identifier
(PSID). Different PSID values guarantee non-overlapping
port-sets thanks to the restrictions on 'a' and 'k' stated
above, because the PSID always occupies the same bit
positions in the port number.
</t>
<t hangText="m bits:">The number of contiguous ports is
given by 2^m.</t>
<t hangText="M:">Selects the specific port within a
particular range specified by the concatenation of A and the
PSID.</t>
</list></t>
</section>
<section title="Basic mapping rule (BMR)">
<t>The Basic Mapping Rule is mandatory, used by the CE to
provision itself with an IPv4 prefix, IPv4 address or shared
IPv4 address. Recall from <xref target="mapping_algorithm"/>
that the BMR consists of the following parameters:
<list style="symbols">
<t>Rule IPv6 prefix (including prefix length)</t>
<t>Rule IPv4 prefix (including prefix length)</t>
<t>Rule EA-bits length (in bits)</t>
</list>
</t>
<t><xref target="addressallocation-fig"/> shows the structure
of the complete MAP IPv6 address as specified in this document.
</t>
<t><figure align="center" anchor="addressallocation-fig"
title="MAP IPv6 Address Format">
<preamble></preamble>
<artwork align="center"><![CDATA[
| n bits | o bits | s bits | 128-n-o-s bits |
+--------------------+-----------+---------+-----------------------+
| Rule IPv6 prefix | EA bits |subnet ID| interface ID |
+--------------------+-----------+---------+-----------------------+
|<--- End-user IPv6 prefix --->|
]]></artwork>
</figure></t>
<t>The Rule IPv6 prefix (which is part of the End-user IPv6
prefix) that is common among all CEs using the same Basic
Mapping Rule within the MAP domain. The EA bits encode the CE
specific IPv4 address and port information. The EA bits, which
are unique for a given Rule IPv6 prefix, can contain a full or
part of an IPv4 address and, in the shared IPv4 address case,
a Port-Set Identifier (PSID). An EA-bit length of 0 signifies
that all relevant MAP IPv4 addressing information is passed
directly in the BMR, and not derived from the End-user IPv6
prefix.</t>
<t>The MAP IPv6 address is created by concatenating the
End-user IPv6 prefix with the MAP subnet identifier (if the End-user
IPv6 prefix is shorter than 64 bits) and the interface identifier as
specified in <xref target="interface-id"></xref>.</t>
<t>The MAP subnet identifier is defined to be the first subnet
(s bits set to zero).</t>
<t>Define:
<list style="empty">
<t>r = length of the IPv4 prefix given by the BMR;</t>
<t>o = length of the EA bit field as given by the BMR;</t>
<t>p = length of the IPv4 suffix contained in the EA bit field.</t>
</list></t>
<t>The length r MAY be zero, in which case the complete IPv4
address or prefix is encoded in the EA bits. If only a part of the
IPv4 address / prefix is encoded in the EA bits, the Rule IPv4 prefix is
provisioned to the CE by other means (e.g., a DHCPv6 option). To create
a complete IPv4 address (or prefix), the IPv4 address suffix (p) from
the EA bits, is concatenated with the Rule IPv4 prefix (r bits).</t>
<t>The offset of the EA bits field in the IPv6 address is
equal to the BMR Rule IPv6 prefix length. The length of the EA
bits field (o) is given by the BMR Rule EA-bits length, and
can be between 0 and 48. A length of 48 means that the
complete IPv4 address and port is embedded in the End-user
IPv6 prefix (a single port is assigned). A length of 0 means
that no part of the IPv4 address or port is embedded in the
address. The sum of the Rule IPv6 Prefix length and the Rule
EA-bits length MUST be less or equal than the End-user IPv6
prefix length.</t>
<t>If o + r < 32 (length of the IPv4 address in bits), then an IPv4
prefix is assigned. This case is shown in <xref target="addressallocation4-fig"/>.</t>
<t><figure align="center" anchor="addressallocation4-fig"
title="IPv4 prefix">
<preamble>IPv4 prefix:</preamble>
<artwork align="center"><![CDATA[
| r bits | o bits = p bits |
+-------------+---------------------+
| Rule IPv4 | IPv4 Address suffix |
+-------------+---------------------+
| < 32 bits |
]]></artwork>
</figure></t>
<t>If o + r is equal to 32, then a full IPv4 address is to be
assigned. The address is created by concatenating the Rule IPv4 prefix
and the EA-bits. This case is shown in <xref target="addressallocation3-fig"/>.</t>
<t><figure align="center" anchor="addressallocation3-fig"
title="Complete IPv4 address">
<preamble>Complete IPv4 address:</preamble>
<artwork align="center"><![CDATA[
| r bits | o bits = p bits |
+-------------+---------------------+
| Rule IPv4 | IPv4 Address suffix |
+-------------+---------------------+
| 32 bits |
]]></artwork>
</figure></t>
<t>If o + r is > 32, then a shared IPv4 address is to be assigned.
The number of IPv4 address suffix bits (p) in the EA bits is given by
32 - r bits. The PSID bits are used to create a port set. The length
of the PSID bit field within EA bits is: q = o - p.</t>
<t><figure align="center" anchor="addressallocation2-fig"
title="Shared IPv4 address">
<preamble>Shared IPv4 address:</preamble>
<artwork align="center"><![CDATA[
| r bits | p bits | | q bits |
+-------------+---------------------+ +------------+
| Rule IPv4 | IPv4 Address suffix | |Port-Set ID |
+-------------+---------------------+ +------------+
| 32 bits |
]]></artwork>
</figure></t>
<t>The length of r MAY be 32, with no part of the IPv4 address
embedded in the EA bits. This results in a mapping with no
dependence between the IPv4 address and the IPv6 address. In
addition the length of o MAY be zero (no EA bits embedded in
the End-User IPv6 prefix), meaning that also the PSID is
provisioned using e.g., the DHCP option.</t>
<t>See <xref target="appendixA"/> for an example of the Basic
Mapping Rule.</t>
</section>
<section title="Forwarding mapping rule (FMR)">
<t>The Forwarding Mapping Rule is optional, and used in mesh
mode to enable direct CE to CE connectivity.</t>
<t>On adding an FMR rule, an IPv4 route is installed in the Rules
table for the Rule IPv4 prefix.</t>
<!-- <t>On forwarding an IPv4 packet, a best matching prefix look up is
done in the Rules table and the correct FMR is chosen.</t>-->
<t><figure align="left" anchor="aplusptoipv6-fig"
title="Derivation of MAP IPv6 address">
<preamble></preamble>
<artwork align="left"><![CDATA[
| 32 bits | | 16 bits |
+--------------------------+ +-------------------+
| IPv4 destination address | | IPv4 dest port |
+--------------------------+ +-------------------+
: : ___/ :
| p bits | / q bits :
+-----------+ +------------+
|IPv4 suffix| |Port-Set ID |
+-----------+ +------------+
\ / ____/ ________/
\ : __/ _____/
\ : / /
| n bits | o bits | s bits | 128-n-o-s bits |
+--------------------+-----------+---------+------------+----------+
| Rule IPv6 prefix | EA bits |subnet ID| interface ID |
+--------------------+-----------+---------+-----------------------+
|<--- End-user IPv6 prefix --->|
]]></artwork>
</figure></t>
<t>See <xref target="appendixA"/> for an example of the
Forwarding Mapping Rule.</t>
</section>
<section anchor="outside-domain" title="Destinations outside the MAP domain">
<t>IPv4 traffic between MAP nodes that are all within one MAP
domain is encapsulated in IPv6, with the sender's MAP IPv6
address as the IPv6 source address and the receiving MAP
node's MAP IPv6 address as the IPv6 destination address. To
reach IPv4 destinations outside of the MAP domain, traffic is
also encapsulated in IPv6, but the destination IPv6 address is
set to the configured IPv6 address of the MAP BR.</t>
<t>On the CE, the path to the BR can be represented as a point
to point IPv4 over IPv6 tunnel <xref target="RFC2473"/> with
the source address of the tunnel being the CE's MAP IPv6
address and the BR IPv6 address as the remote tunnel
address. When MAP is enabled, a typical CE router will install
a default IPv4 route to the BR.</t>
<t>The BR forwards traffic received from the outside to CE's
using the normal MAP forwarding rules.</t>
</section>
</section>
<section anchor="interface-id" title="The IPv6 Interface Identifier">
<t>The Interface identifier format of a MAP node is described
below.</t>
<t><figure align="left" anchor="interfaceid2-fig" title="">
<preamble></preamble>
<artwork align="left"><![CDATA[
| 128-n-o-s bits |
| 16 bits| 32 bits | 16 bits|
+--------+----------------+--------+
| 0 | IPv4 address | PSID |
+--------+----+-----------+--------+
]]></artwork>
</figure></t>
<t>In the case of an IPv4 prefix, the IPv4 address field is right-padded
with zeroes up to 32 bits. The PSID field is left-padded to create a 16
bit field. For an IPv4 prefix or a complete IPv4 address, the PSID field
is zero.</t>
<t>If the End-user IPv6 prefix length is larger than 64, the
most significant parts of the interface identifier is
overwritten by the prefix.</t>
</section>
<section title="MAP Configuration">
<t>For a given MAP domain, the BR and CE MUST be configured with the
following MAP elements. The configured values for these elements are
identical for all CEs and BRs within a given MAP domain.</t>
<t><list style="symbols">
<t>The Basic Mapping Rule and optionally the Forwarding Mapping
Rules, including the Rule IPv6 prefix, Rule IPv4 prefix, and Length
of EA bits</t>
<t>Hub and spoke mode or Mesh mode. (If all traffic should be sent
to the BR, or if direct CE to CE traffic should be supported).</t>
</list></t>
<t>In addition the MAP CE MUST be configured with the IPv6
address(es) of the MAP BR (<xref
target="outside-domain"/>).</t>
<section title="MAP CE">
<t>The MAP elements are set to values that are the same across
all CEs within a MAP domain. The values may be configured in a
variety of manners, including provisioning methods such as the
Broadband Forum's "TR-69" Residential Gateway management
interface, an XML-based object retrieved after IPv6
connectivity is established, or manual configuration by an
administrator. IPv6 DHCP options for MAP configuration is
defined in <xref target="I-D.ietf-softwire-map-dhcp"/>. Other
configuration and management methods may use the format
described by this option for consistency and convenience of
implementation on CEs that support multiple configuration
methods.</t>
<t>The only remaining provisioning information the CE requires
in order to calculate the MAP IPv4 address and enable IPv4
connectivity is the IPv6 prefix for the CE. The End-user IPv6
prefix is configured as part of obtaining IPv6 Internet
access.</t>
<t>The MAP provisioning parameters, and hence the IPv4 service
itself, are tied to the associated End-user IPv6 prefix
lifetime; thus, the MAP service is also tied to this in terms
of authorization, accounting, etc.</t>
<t>A single MAP CE MAY be connected to more than one MAP domain, just
as any router may have more than one IPv4-enabled service provider
facing interface and more than one set of associated addresses
assigned by DHCP. Each domain a given CE operates within would require
its own set of MAP configuration elements and would generate its own
IPv4 address. Each MAP domain requires a distinct End-user IPv6 prefix.</t>
<t>The MAP DHCP option is specified in <xref
target="I-D.ietf-softwire-map-dhcp"></xref>.</t>
</section>
<section title="MAP BR">
<t>The MAP BR MUST be configured with corresponding mapping rules for each MAP domain which it is acting as BR for.</t>
<t>For increased reliability and load balancing, the BR IPv6 address
MAY be an anycast address shared across a given MAP domain. As MAP is
stateless, any BR may be used at any time. If the BR IPv6 address is
anycast the relay MUST use this anycast IPv6 address as the source
address in packets relayed to CEs.</t>
<t>Since MAP uses provider address space, no specific routes need to
be advertised externally for MAP to operate, neither in IPv6 nor IPv4
BGP. However, if anycast is used for the MAP IPv6 relays, the anycast
addresses must be advertised in the service provider's IGP.</t>
</section>
<!--
<section title="Address Independence">
<t>The MAP solution supports use and configuration of domains in so
called 1:1 mode (meaning 1 mapping rule set per CE), which allows
complete independence between the IPv6 prefix assigned to the CE and
the IPv4 address and/or port-range it uses. This is achieved in all
cases when the EA-bit length is set to 0.</t>
<t>The constraint imposed is that each such MAP domain be
composed of just 1 MAP CE which has a predetermined IPv6
prefix, i.e. The BR would be configured with a rule-set per
CPE, where the FMR would uniquely describe the IPv6 prefix of
a given CE. Each CE would have a distinct BMR, that would
fully describe that CE's IPv4 address, and PSID if any.</t>
<section title="1:1 mode with no address sharing">
<t>A domain rule (BMR or FMR) with a setting of EA-bit length of 0,
and a sharing ratio of 1, indicates that in that domain no part of
the IPv4 address is derived from the IPv6 prefix. Instead the IPv4
address is entirely derived from the Rule IPv4-prefix conveyed in
the BMR for a CE. In other words, with an EA-bit length of 0 and a
sharing ratio of 1, the CE would form its IPv4 address entirely out
of the IPv4-prefix received in the BMR (which would be 32 bits
long).</t>
<t>Appendix A gives an example of this configuration.</t>
</section>
<section title="1:1 mode with address sharing">
<t>A domain rule (BMR or FMR) with a setting of EA-bit length of 0,
and a sharing ratio >1, indicates that in that domain no part of
the IPv4 address is derived from the IPv6 prefix. Instead the IPv4
address and PSID are respectively entirely derived from the Rule
IPv4-prefix and the Rule port parameters, both conveyed in the BMR
to a CE. In other words, with an EA-bit length of 0 and a sharing
ratio > 1, the CE would form its IPv4 address entirely out of the
IPv4-prefix received in the BMR (which could be 32 bits long) and
derive its port-set from the PSID also conveyed in the BMR.</t>
<t>Appendix A gives an example of this configuration.</t>
</section>
</section>
-->
</section>
<section title="Forwarding Considerations">
<t>Figure 1 depicts the overall MAP architecture with IPv4 users (N and
M) networks connected to a routed IPv6 network.</t>
<t>MAP uses Encapsulation mode as specified in <xref
target="RFC2473"></xref>.</t>
<t>For a shared IPv4 address, a MAP CE forwarding IPv4 packets
from the LAN performs NAT44 functions first and creates
appropriate NAT44 bindings. The resulting IPv4 packets MUST
contain the source IPv4 address and source transport identifiers
specified by the MAP provisioning parameters. The IPv4 packet is
forwarded using the CE's MAP forwarding function. The IPv6
source and destination addresses MUST then be derived as per
<xref target="mapping_algorithm"></xref> of this draft.</t>
<section title="Receiving Rules">
<!--
<t>A MAP CE receiving an IPv6 packet to its MAP IPv6 address
MUST send the packet to the CE MAP function for decapsulation
and the resulting IPv4 packet MUST then be forwarded to the CE's
NAT44 function where it is handled according to the NAT's
translation table.</t>-->
<t>A MAP CE receiving an IPv6 packet to its MAP IPv6 address
sends this packet to the CE's MAP function where it is
decapsulated. The resulting IPv4 packet is then forwarded to
the CE's NAT44 function where it is handled according to the
NAT's translation table.</t>
<t>A MAP BR receiving IPv6 packets selects a best matching MAP
domain rule (Rule IPv6 prefix) based on a longest address match
of the packet's IPv6 source address, as well as a match of the
packet destination address against the configured BR IPv6
address(es). The selected MAP rule allows the BR to determine
the EA-bits from the source IPv6 address.</t>
<!--
<t>In order to prevent spoofing of IPv4 addresses, the MAP node
MUST validate the embedded IPv4 source address and transport
layer port of the encapsulating IPv6 packet with the IPv4 source
address and transport layer port of the encapsulated IPv4 packet
according to the parameters of the matching mapping rule. If
the two source addresses and transport layer ports do not match,
the packet MUST be silently discarded and a counter incremented
to indicate that a potential spoofing attack may be underway.
Additionally, a CE MUST allow forwarding of packets sourced by
the configured BR IPv6 address.</t>
-->
<t>To prevent spoofing of IPv4 addresses, any MAP node (CE and
BR) MUST perform the following validation upon reception of a
packet. First, the embedded IPv4 address or prefix, as well as
PSID (if any), are extracted from the source IPv6 address using
the matching MAP rule. These represent the range of what is
acceptable as source IPv4 address and port. Secondly, the node
extracts the source IPv4 address and port from the IPv4 packet
encapsulated inside the IPv6 packet. If they are found to be outside
the acceptable range, the packet MUST be silently discard and a
counter incremented to indicate that a potential spoofing attack
may be underway. The source validation checks just described are
not done for packets whose source IPv6 address is that of the
BR (BR IPv6 address).</t>
<t>By default, the CE router MUST drop packets received on the
MAP virtual interface (i.e., after decapsulation of IPv6) for
IPv4 destinations not for its own IPv4 shared address, full IPv4
address or IPv4 prefix.</t>
</section>
<section title="ICMP">
<t>ICMP message should be supported in MAP domain. Hence, the NAT44 in
MAP CE MUST implement the behavior for ICMP message conforming to the
best current practice documented in <xref target="RFC5508"></xref>.</t>
<t>If a MAP CE receives an ICMP message having ICMP identifier field in
ICMP header, NAT44 in the MAP CE MUST rewrite this field to a specific
value assigned from the port set. BR and other CEs must handle this
field similar to the port number in the TCP/UDP header upon receiving
the ICMP message with ICMP identifier field.</t>
<t>If a MAP node receives an ICMP error message without the ICMP
identifier field for errors that is detected inside a IPv6 tunnel, a
node should relay the ICMP error message to the original source. This
behavior SHOULD be implemented conforming to the section 8 of <xref
target="RFC2473"></xref>.</t>
</section>
<section title="Fragmentation and Path MTU Discovery">
<t>Due to the different sizes of the IPv4 and IPv6 header, handling the
maximum packet size is relevant for the operation of any system
connecting the two address families. There are three mechanisms to
handle this issue: Path MTU discovery (PMTUD), fragmentation, and
transport-layer negotiation such as the TCP Maximum Segment Size (MSS)
option <xref target="RFC0897"></xref>. MAP uses all three mechanisms to
deal with different cases.</t>
<section title="Fragmentation in the MAP domain">
<t>Encapsulating an IPv4 packet to carry it across the MAP
domain will increase its size (typically by 40 bytes). It is
strongly recommended that the MTU in the MAP domain be well
managed and that the IPv6 MTU on the CE WAN side interface be