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 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285
|
<pre>Internet Engineering Task Force (IETF) E. Rosen
Request for Comments: 8277 Juniper Networks, Inc.
Obsoletes: <a href="./rfc3107">3107</a> October 2017
Category: Standards Track
ISSN: 2070-1721
<span class="h1">Using BGP to Bind MPLS Labels to Address Prefixes</span>
Abstract
This document specifies a set of procedures for using BGP to
advertise that a specified router has bound a specified MPLS label
(or a specified sequence of MPLS labels organized as a contiguous
part of a label stack) to a specified address prefix. This can be
done by sending a BGP UPDATE message whose Network Layer Reachability
Information field contains both the prefix and the MPLS label(s) and
whose Next Hop field identifies the node at which said prefix is
bound to said label(s). This document obsoletes <a href="./rfc3107">RFC 3107</a>.
Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in <a href="./rfc7841#section-2">Section 2 of RFC 7841</a>.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
<a href="https://www.rfc-editor.org/info/rfc8277">https://www.rfc-editor.org/info/rfc8277</a>.
Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
Provisions Relating to IETF Documents
(<a href="https://trustee.ietf.org/license-info">https://trustee.ietf.org/license-info</a>) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
<span class="grey">Rosen Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc8277">RFC 8277</a> BGP and Labeled Address Prefixes October 2017</span>
Table of Contents
<a href="#section-1">1</a>. Introduction . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-2">2</a>
2. Using BGP to Bind an Address Prefix to One or More MPLS
Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-2.1">2.1</a>. Multiple Labels Capability . . . . . . . . . . . . . . . <a href="#page-6">6</a>
2.2. NLRI Encoding When the Multiple Labels Capability Is
Not Used . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-8">8</a>
2.3. NLRI Encoding When the Multiple Labels Capability Is Used 10
2.4. How to Explicitly Withdraw the Binding of a Label to a
Prefix . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-12">12</a>
<a href="#section-2.5">2.5</a>. Changing the Label That Is Bound to a Prefix . . . . . . <a href="#page-13">13</a>
<a href="#section-3">3</a>. Installing and/or Propagating SAFI-4 or SAFI-128 Routes . . . <a href="#page-14">14</a>
<a href="#section-3.1">3.1</a>. Comparability of Routes . . . . . . . . . . . . . . . . . <a href="#page-14">14</a>
<a href="#section-3.2">3.2</a>. Modification of Label(s) Field When Propagating . . . . . <a href="#page-14">14</a>
<a href="#section-3.2.1">3.2.1</a>. When the Next Hop Field Is Unchanged . . . . . . . . <a href="#page-14">14</a>
<a href="#section-3.2.2">3.2.2</a>. When the Next Hop Field Is Changed . . . . . . . . . <a href="#page-15">15</a>
<a href="#section-4">4</a>. Data Plane . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-16">16</a>
<a href="#section-5">5</a>. Relationship between SAFI-4 and SAFI-1 Routes . . . . . . . . <a href="#page-18">18</a>
<a href="#section-6">6</a>. IANA Considerations . . . . . . . . . . . . . . . . . . . . . <a href="#page-19">19</a>
<a href="#section-7">7</a>. Security Considerations . . . . . . . . . . . . . . . . . . . <a href="#page-19">19</a>
<a href="#section-8">8</a>. References . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-20">20</a>
<a href="#section-8.1">8.1</a>. Normative References . . . . . . . . . . . . . . . . . . <a href="#page-20">20</a>
<a href="#section-8.2">8.2</a>. Informative References . . . . . . . . . . . . . . . . . <a href="#page-22">22</a>
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-23">23</a>
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-23">23</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
[<a id="ref-RFC3107">RFC3107</a>] specifies encodings and procedures for using BGP to
indicate that a particular router has bound either a single MPLS
label or a sequence of MPLS labels to a particular address prefix.
(A sequence of labels would be organized as a contiguous part of an
MPLS label stack as specified in [<a href="./rfc3031" title=""Multiprotocol Label Switching Architecture"">RFC3031</a>] and [<a href="./rfc3032" title=""MPLS Label Stack Encoding"">RFC3032</a>].) This is
done by sending a BGP UPDATE message whose Network Layer Reachability
Information field contains both the prefix and the MPLS label(s) and
whose Next Hop field identifies the node at which said prefix is
bound to said label(s). Each such UPDATE also advertises a path to
the specified prefix via the specified next hop.
<span class="grey">Rosen Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc8277">RFC 8277</a> BGP and Labeled Address Prefixes October 2017</span>
Although there are many implementations and deployments of [<a href="./rfc3107" title=""Carrying Label Information in BGP-4"">RFC3107</a>],
there are a number of issues with it that have impeded
interoperability in the past and may potentially impede
interoperability in the future:
o Although [<a href="./rfc3107" title=""Carrying Label Information in BGP-4"">RFC3107</a>] specifies an encoding that allows a sequence of
MPLS labels (rather than just a single label) to be bound to a
prefix, it does not specify the semantics of binding a sequence of
labels to a prefix.
o Many implementations of [<a href="./rfc3107" title=""Carrying Label Information in BGP-4"">RFC3107</a>] assume that only one label will
be bound to a prefix, and cannot properly process a BGP UPDATE
message that binds a sequence of labels to a prefix. Thus, an
implementation attempting to provide this feature is likely to
experience problems interoperating with other implementations.
o The procedures in [<a href="./rfc3107" title=""Carrying Label Information in BGP-4"">RFC3107</a>] for withdrawing the binding of a label
or sequence of labels to a prefix are not specified clearly and
correctly.
o [<a href="./rfc3107" title=""Carrying Label Information in BGP-4"">RFC3107</a>] specifies an optional feature, known as "Advertising
Multiple Routes to a Destination", that, to the best of the
author's knowledge, has never been implemented as specified. The
functionality that this feature was intended to provide can and
has been implemented in a different way using the procedures of
[<a href="./rfc7911" title=""Advertisement of Multiple Paths in BGP"">RFC7911</a>], which were not available at the time that [<a href="./rfc3107" title=""Carrying Label Information in BGP-4"">RFC3107</a>] was
written. In [<a href="./rfc3107" title=""Carrying Label Information in BGP-4"">RFC3107</a>], this feature was controlled by a BGP
Capability Code that has never been implemented and is now
deprecated; see <a href="#section-6">Section 6</a>.
o It is possible for a BGP speaker to receive two BGP UPDATEs that
advertise paths to the same address prefix, where one UPDATE binds
a label (or sequence of labels) to the prefix and the other does
not. [<a href="./rfc3107" title=""Carrying Label Information in BGP-4"">RFC3107</a>] is silent on the issue of how the presence of two
such UPDATEs impacts the BGP decision process and does not say
explicitly whether one or the other or both of these UPDATEs
should be propagated. This has led different implementations to
handle this situation in different ways.
o Much of [<a href="./rfc3107" title=""Carrying Label Information in BGP-4"">RFC3107</a>] applies to the VPN-IPv4 ([<a href="./rfc4364" title=""BGP/MPLS IP Virtual Private Networks (VPNs)"">RFC4364</a>]) and VPN-IPv6
([<a href="./rfc4659" title=""BGP-MPLS IP Virtual Private Network (VPN) Extension for IPv6 VPN"">RFC4659</a>]) address families, but those address families are not
mentioned in it.
This document replaces and obsoletes [<a href="./rfc3107" title=""Carrying Label Information in BGP-4"">RFC3107</a>]. It defines a new BGP
Capability to be used when binding a sequence of labels to a prefix;
by using this Capability, the interoperability problems alluded to
above can be avoided. This document also removes the unimplemented
<span class="grey">Rosen Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc8277">RFC 8277</a> BGP and Labeled Address Prefixes October 2017</span>
"Advertising Multiple Routes to a Destination" feature (see <a href="./rfc3107#section-4">Section 4
of [RFC3107]</a>), while specifying how to use [<a href="./rfc7911" title=""Advertisement of Multiple Paths in BGP"">RFC7911</a>] to provide the
same functionality. This document also addresses the issue of the
how UPDATEs that bind labels to a given prefix interact with UPDATEs
that advertise paths to that prefix but do not bind labels to it.
However, for backwards compatibility, it declares most of these
interactions to be matters of local policy.
The places where this specification differs from [<a href="./rfc3107" title=""Carrying Label Information in BGP-4"">RFC3107</a>] are
indicated in the text. It is believed that implementations that
conform to the current document will interoperate correctly with
existing deployed implementations of [<a href="./rfc3107" title=""Carrying Label Information in BGP-4"">RFC3107</a>].
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in
<a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a> [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>] [<a href="./rfc8174" title=""Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words"">RFC8174</a>] when, and only when, they appear in all
capitals, as shown here.
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Using BGP to Bind an Address Prefix to One or More MPLS Labels</span>
BGP may be used to advertise that a particular node (call it N) has
bound a particular MPLS label, or a particular sequence of MPLS
labels (organized as a contiguous part of an MPLS label stack), to a
particular address prefix. This is done by sending a Multiprotocol
BGP UPDATE message, i.e., an UPDATE message with an MP_REACH_NLRI
attribute as specified in [<a href="./rfc4760" title=""Multiprotocol Extensions for BGP-4"">RFC4760</a>]. The Network Address of Next Hop
field of that attribute contains an IP address of node N. The
label(s) and the prefix are encoded in the Network Layer Reachability
Information (NLRI) field of the MP_REACH_NLRI. The encoding of the
NLRI field is specified in Sections <a href="#section-2.2">2.2</a> and <a href="#section-2.3">2.3</a>.
If the prefix is an IPv4 address prefix or a VPN-IPv4 ([<a href="./rfc4364" title=""BGP/MPLS IP Virtual Private Networks (VPNs)"">RFC4364</a>])
address prefix, the Address Family Identifier (AFI) of the
MP_REACH_NLRI attribute is set to 1. If the prefix is an IPv6
address prefix or a VPN-IPv6 prefix ([<a href="./rfc4659" title=""BGP-MPLS IP Virtual Private Network (VPN) Extension for IPv6 VPN"">RFC4659</a>]), the AFI is set to 2.
If the prefix is an IPv4 address prefix or an IPv6 address prefix,
the Subsequent Address Family Identifier (SAFI) field is set to 4.
If the prefix is a VPN-IPv4 address prefix or a VPN-IPv6 address
prefix, the SAFI is set to 128.
The use of SAFI 4 or SAFI 128 when the AFI is other than 1 or 2 is
outside the scope of this document.
<span class="grey">Rosen Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc8277">RFC 8277</a> BGP and Labeled Address Prefixes October 2017</span>
This document does not specify the format of the Network Address of
Next Hop field of the MP_REACH_NLRI attribute. The format of the
Next Hop field depends upon a number of factors and is discussed in a
number of other RFCs: see [<a href="./rfc4364" title=""BGP/MPLS IP Virtual Private Networks (VPNs)"">RFC4364</a>], [<a href="./rfc4659" title=""BGP-MPLS IP Virtual Private Network (VPN) Extension for IPv6 VPN"">RFC4659</a>], [<a href="./rfc4798" title=""Connecting IPv6 Islands over IPv4 MPLS Using IPv6 Provider Edge Routers (6PE)"">RFC4798</a>], and
[<a href="./rfc5549" title=""Advertising IPv4 Network Layer Reachability Information with an IPv6 Next Hop"">RFC5549</a>].
There are a variety of applications that make use of alternative
methods of using BGP to advertise MPLS label bindings: see, e.g.,
[<a href="./rfc7432" title=""BGP MPLS-Based Ethernet VPN"">RFC7432</a>], [<a href="./rfc6514" title=""BGP Encodings and Procedures for Multicast in MPLS/BGP IP VPNs"">RFC6514</a>], or [<a href="#ref-TUNNEL-ENCAPS">TUNNEL-ENCAPS</a>]. The method described in
the current document is not claimed to be the only way of using BGP
to advertise MPLS label bindings. Discussion of which method to use
for which application is outside the scope of the current document.
In the remainder of this document, we will use the term "SAFI-x
UPDATE" to refer to a BGP UPDATE message containing an MP_REACH_NLRI
attribute or an MP_UNREACH_NLRI attribute ([<a href="./rfc4760" title=""Multiprotocol Extensions for BGP-4"">RFC4760</a>]) whose SAFI
field contains the value x.
This document defines a BGP Optional Capabilities parameter
([<a href="./rfc5492" title=""Capabilities Advertisement with BGP-4"">RFC5492</a>]) known as the Multiple Labels Capability.
o Unless this Capability is sent on a given BGP session by both of
that session's BGP speakers, a SAFI-4 or SAFI-128 UPDATE message
sent on that session from either speaker MUST bind a prefix to
only a single label and MUST use the encoding of <a href="#section-2.2">Section 2.2</a>.
o If this Capability is sent by both BGP speakers on a given
session, an UPDATE message on that session, from either speaker,
MUST use the encoding of <a href="#section-2.3">Section 2.3</a> and MAY bind a prefix to a
sequence of more than one label.
The encoding of the Multiple Labels Capability is specified in
<a href="#section-2.1">Section 2.1</a>.
Procedures for explicitly withdrawing a label binding are given in
<a href="#section-2.4">Section 2.4</a>. Procedures for changing the label(s) bound to a given
prefix by a given node are given in <a href="#section-2.5">Section 2.5</a>.
Procedures for propagating SAFI-4 and SAFI-128 UPDATEs are discussed
in <a href="#section-3">Section 3</a>.
When a BGP speaker installs and propagates a SAFI-4 or SAFI-128
UPDATE, and if it changes the value of the Network Address of Next
Hop field, it must program its data plane appropriately. This is
discussed in <a href="#section-4">Section 4</a>.
<span class="grey">Rosen Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc8277">RFC 8277</a> BGP and Labeled Address Prefixes October 2017</span>
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a>. Multiple Labels Capability</span>
[<a id="ref-RFC5492">RFC5492</a>] defines the "Capabilities Optional Parameter". A BGP
speaker can include a Capabilities Optional Parameter in a BGP OPEN
message. The Capabilities Optional Parameter is a triple that
includes a one-octet Capability Code, a one-octet Capability length,
and a variable-length Capability Value.
This document defines a Capability Code known as the Multiple Labels
Capability code. IANA has assigned value 8 to this Capability Code.
(This Capability Code is new to this document and does not appear in
[<a href="./rfc3107" title=""Carrying Label Information in BGP-4"">RFC3107</a>].)
If a BGP speaker has not sent the Multiple Labels Capability in its
BGP OPEN message on a particular BGP session, or if it has not
received the Multiple Labels Capability in the BGP OPEN message from
its peer on that BGP session, that BGP speaker MUST NOT send on that
session any UPDATE message that binds more than one MPLS label to any
given prefix. Further, when advertising the binding of a single
label to a prefix, the BGP speaker MUST use the encoding specified in
<a href="#section-2.2">Section 2.2</a>.
The value field of the Multiple Labels Capability (shown in Figure 1)
consists of one or more triples, where each triple consists of four
octets. The first two octets of a triple specify an AFI value, the
third octet specifies a SAFI value, and the fourth specifies a Count.
If one of the triples is <AFI, SAFI, Count>, the Count is the maximum
number of labels that the BGP speaker sending the Capability can
process in a received UPDATE of the specified AFI/SAFI. If the Count
is 255, then no limit has been placed on the number of labels that
can be processed in a received UPDATE of the specified AFI/SAFI.
Any implementation that sends a Multiple Labels Capability MUST be
able to support at least two labels in the NLRI. However, there may
be deployment scenarios in which a larger number of labels is needed.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| AFI | SAFI | Count ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ AFI | SAFI | Count |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 1: Value Field of Multiple Labels Capability
If the Capability contains more than one triple with a given AFI/
SAFI, all but the first MUST be ignored.
<span class="grey">Rosen Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc8277">RFC 8277</a> BGP and Labeled Address Prefixes October 2017</span>
A triple of the form <AFI=x, SAFI=y, Count=0> or
<AFI=x, SAFI=y, Count=1> MUST NOT be sent. If such a triple is
received, it MUST be ignored.
A Multiple Labels Capability whose length is not a multiple of four
MUST be considered to be malformed.
"Graceful Restart Mechanism for BGP" [<a href="./rfc4724" title=""Graceful Restart Mechanism for BGP"">RFC4724</a>] describes a procedure
that allows routes learned over a given BGP session to be maintained
when the session fails and then restarts. This procedure requires
the entire RIB to be transmitted when the session restarts. If the
Multiple Labels Capability for a given AFI/SAFI was exchanged on the
failed session but has not been exchanged on the restarted session,
then any prefixes advertised in that AFI/SAFI with multiple labels
MUST be explicitly withdrawn. Similarly, if the maximum label count
(specified in the Capability for a given AFI/SAFI) is reduced, any
prefixes advertised with more labels than are valid for the current
session MUST be explicitly withdrawn.
"Accelerated Routing Convergence for BGP Graceful Restart"
[<a href="#ref-Enhanced-GR">Enhanced-GR</a>] describes another procedure that allows the routes
learned over a given BGP session to be maintained when the session
fails and then restarts. These procedures MUST NOT be applied if
either of the following conditions hold:
o The Multiple Labels Capability for a given AFI/SAFI had been
exchanged prior to the restart but has not been exchanged on the
restarted session.
o The Multiple Labels Capability for a given AFI/SAFI had been
exchanged with a given Count prior to the restart but have been
exchanged with a smaller count on the restarted session.
If either of these conditions hold, the complete set of routes for
the given AFI/SAFI MUST be exchanged.
If a BGP OPEN message contains multiple copies of the Multiple Labels
Capability, only the first copy is significant; subsequent copies
MUST be ignored.
If (a) a BGP speaker has sent the Multiple Labels Capability in its
BGP OPEN message for a particular BGP session, (b) it has received
the Multiple Labels Capability in its peer's BGP OPEN message for
that session, and (c) both Capabilities specify AFI/SAFI x/y, then
when using an UPDATE of AFI x and SAFI y to advertise the binding of
a label or sequence of labels to a given prefix, the BGP speaker MUST
use the encoding of <a href="#section-2.3">Section 2.3</a>. This encoding MUST be used even if
only one label is being bound to a given prefix.
<span class="grey">Rosen Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc8277">RFC 8277</a> BGP and Labeled Address Prefixes October 2017</span>
If both BGP speakers of a given BGP session have sent the Multiple
Labels Capability, but AFI/SAFI x/y has not been specified in both
Capabilities, then UPDATEs of AFI/SAFI x/y on that session MUST use
the encoding of <a href="#section-2.2">Section 2.2</a>, and such UPDATEs can only bind one label
to a prefix.
A BGP speaker SHOULD NOT send an UPDATE that binds more labels to a
given prefix than its peer is capable of receiving, as specified in
the Multiple Labels Capability sent by that peer. If a BGP speaker
receives an UPDATE that binds more labels to a given prefix than the
number of labels the BGP speaker is prepared to receive (as announced
in its Multiple Labels Capability), the BGP speaker MUST apply the
"treat-as-withdraw" strategy of [<a href="./rfc7606" title=""Revised Error Handling for BGP UPDATE Messages"">RFC7606</a>] to that UPDATE.
Notwithstanding the number of labels that a BGP speaker has claimed
to be able to receive, its peer MUST NOT attempt to send more labels
than can be properly encoded in the NLRI field of the MP_REACH_NLRI
attribute. Please note that there is only a limited amount of space
in the NLRI field for labels:
o per [<a href="./rfc4760" title=""Multiprotocol Extensions for BGP-4"">RFC4760</a>], the size of this field is limited to 255 bits (not
255 octets), including the number of bits in the prefix;
o in a SAFI-128 UPDATE, the prefix is at least 64 bits long and may
be as long as 192 bits (e.g., in a VPN-IPv6 host route).
<span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a>. NLRI Encoding When the Multiple Labels Capability Is Not Used</span>
If the Multiple Labels Capability has not been both sent and received
on a given BGP session, then in a BGP UPDATE on that session whose
MP_REACH_NLRI attribute contains one of the AFI/SAFI combinations
specified in <a href="#section-2">Section 2</a>, the NLRI field is encoded as shown in
Figure 2:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Length | Label |Rsrv |S|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Prefix ~
~ |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 2: NLRI with One Label
<span class="grey">Rosen Standards Track [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc8277">RFC 8277</a> BGP and Labeled Address Prefixes October 2017</span>
- Length:
The Length field consists of a single octet. It specifies the
length in bits of the remainder of the NLRI field.
Note that the length will always be the sum of 20 (number of bits
in Label field), plus 3 (number of bits in Rsrv field), plus 1
(number of bits in S field), plus the length in bits of the
prefix.
In an MP_REACH_NLRI attribute whose AFI/SAFI is 1/4, the prefix
length will be 32 bits or less. In an MP_REACH_NLRI attribute
whose AFI/SAFI is 2/4, the prefix length will be 128 bits or less.
In an MP_REACH_NLRI attribute whose SAFI is 128, the prefix will
be 96 bits or less if the AFI is 1 and will be 192 bits or less if
the AFI is 2.
As specified in [<a href="./rfc4760" title=""Multiprotocol Extensions for BGP-4"">RFC4760</a>], the actual length of the NLRI field
will be the number of bits specified in the Length field, rounded
up to the nearest integral number of octets.
- Label:
The Label field is a 20-bit field containing an MPLS label value
(see [<a href="./rfc3032" title=""MPLS Label Stack Encoding"">RFC3032</a>]).
- Rsrv:
This 3-bit field SHOULD be set to zero on transmission and MUST be
ignored on reception.
- S:
This 1-bit field MUST be set to one on transmission and MUST be
ignored on reception.
Note that the UPDATE message not only advertises the binding between
the prefix and the label, it also advertises a path to the prefix via
the node identified in the Network Address of Next Hop field of the
MP_REACH_NLRI attribute.
[<a id="ref-RFC3107">RFC3107</a>] requires that if only a single label is bound to a prefix,
the S bit must be set. If the S bit is not set, [<a href="./rfc3107" title=""Carrying Label Information in BGP-4"">RFC3107</a>] specifies
that additional labels will appear in the NLRI. However, some
implementations assume that the NLRI will contain only a single label
and thus do not check the setting of the S bit. The procedures
specified in the current document will interwork with such
implementations. As long as the Multiple Labels Capability is not
<span class="grey">Rosen Standards Track [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc8277">RFC 8277</a> BGP and Labeled Address Prefixes October 2017</span>
sent and received by both BGP speakers on a given BGP session, this
document REQUIRES that only one label be specified in the NLRI, that
the S bit be set on transmission, and that it be ignored on
reception.
If the procedures of [<a href="./rfc7911" title=""Advertisement of Multiple Paths in BGP"">RFC7911</a>] are being used, a four-octet "path
identifier" (as defined in <a href="./rfc7911#section-3">Section 3 of [RFC7911]</a>) is part of the
NLRI and precedes the Length field.
<span class="h3"><a class="selflink" id="section-2.3" href="#section-2.3">2.3</a>. NLRI Encoding When the Multiple Labels Capability Is Used</span>
If the Multiple Labels Capability has been both sent and received on
a given BGP session, then in a BGP UPDATE on that session whose
MP_REACH_NLRI attribute contains one of the AFI/SAFI combinations
specified in <a href="#section-2">Section 2</a>, the NLRI field is encoded as shown in
Figure 3:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+
| Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Label |Rsrv |S~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ Label |Rsrv |S|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Prefix ~
~ |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 3: NLRI with Multiple Labels
- Length:
The Length field consists of a single octet. It specifies the
length in bits of the remainder of the NLRI field.
Note that for each label, the length is increased by 24 bits (20
bits in the Label field, plus 3 bits in the Rsrv field, plus 1 S
bit).
In an MP_REACH_NLRI attribute whose AFI/SAFI is 1/4, the prefix
length will be 32 bits or less. In an MP_REACH_NLRI attribute
whose AFI/SAFI is 2/4, the prefix length will be 128 bits or less.
In an MP_REACH_NLRI attribute whose SAFI is 128, the prefix will
be 96 bits or less if the AFI is 1 and will be 192 bits or less if
the AFI is 2.
<span class="grey">Rosen Standards Track [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc8277">RFC 8277</a> BGP and Labeled Address Prefixes October 2017</span>
As specified in [<a href="./rfc4760" title=""Multiprotocol Extensions for BGP-4"">RFC4760</a>], the actual length of the NLRI field
will be the number of bits specified in the Length field rounded
up to the nearest integral number of octets.
- Label:
The Label field is a 20-bit field containing an MPLS label value
(see [<a href="./rfc3032" title=""MPLS Label Stack Encoding"">RFC3032</a>]).
- Rsrv:
This 3-bit field SHOULD be set to zero on transmission and MUST be
ignored on reception.
- S:
In all labels except the last (i.e., in all labels except the one
immediately preceding the prefix), the S bit MUST be 0. In the
last label, the S bit MUST be 1.
Note that failure to set the S bit in the last label will make it
impossible to parse the NLRI correctly. See <a href="#section-3">Section 3</a>, paragraph
j of [<a href="./rfc7606" title=""Revised Error Handling for BGP UPDATE Messages"">RFC7606</a>] for a discussion of error handling when the NLRI
cannot be parsed.
Note that the UPDATE message not only advertises the binding between
the prefix and the labels, it also advertises a path to the prefix
via the node identified in the Next Hop field of the MP_REACH_NLRI
attribute.
If the procedures of [<a href="./rfc7911" title=""Advertisement of Multiple Paths in BGP"">RFC7911</a>] are being used, a four-octet "path
identifier" (as defined in <a href="./rfc7911#section-3">Section 3 of [RFC7911]</a>) is part of the
NLRI and precedes the Length field.
<span class="grey">Rosen Standards Track [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc8277">RFC 8277</a> BGP and Labeled Address Prefixes October 2017</span>
<span class="h3"><a class="selflink" id="section-2.4" href="#section-2.4">2.4</a>. How to Explicitly Withdraw the Binding of a Label to a Prefix</span>
Suppose a BGP speaker has announced, on a given BGP session, the
binding of a given label or sequence of labels to a given prefix.
Suppose it now wishes to withdraw that binding. To do so, it may
send a BGP UPDATE message with an MP_UNREACH_NLRI attribute. The
NLRI field of this attribute is encoded as follows:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Length | Compatibility |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Prefix ~
~ |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 4: NLRI for Withdrawal
Upon transmission, the Compatibility field SHOULD be set to 0x800000.
Upon reception, the value of the Compatibility field MUST be ignored.
This encoding is used for explicitly withdrawing the binding (on a
given BGP session) between the specified prefix and whatever label or
sequence of labels had previously been bound by the procedures of
this document to that prefix on the given session. This encoding is
used whether or not the Multiple Labels Capability has been sent or
received on the session. Note that label/prefix bindings that were
not advertised on the given session cannot be withdrawn by this
method. (However, if the bindings were advertised on a previous
session with the same peer, and the current session is the result of
a "graceful restart" ([<a href="./rfc4724" title=""Graceful Restart Mechanism for BGP"">RFC4724</a>]) of the previous session, then this
withdrawal method may be used.)
When using an MP_UNREACH_NLRI attribute to withdraw a route whose
NLRI was previously specified in an MP_REACH_NLRI attribute, the
lengths and values of the respective prefixes must match, and the
respective AFI/SAFIs must match. If the procedures of [<a href="./rfc7911" title=""Advertisement of Multiple Paths in BGP"">RFC7911</a>] are
being used, the respective values of the "path identifier" fields
must match as well. Note that the prefix length is not the same as
the NLRI length; to determine the prefix length of a prefix in an
MP_UNREACH_NLRI, the length of the Compatibility field must be
subtracted from the length of the NLRI.
An explicit withdrawal in a SAFI-x UPDATE on a given BGP session not
only withdraws the binding between the prefix and the label(s), it
also withdraws the path to that prefix that was previously advertised
in a SAFI-x UPDATE on that session.
<span class="grey">Rosen Standards Track [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc8277">RFC 8277</a> BGP and Labeled Address Prefixes October 2017</span>
[<a id="ref-RFC3107">RFC3107</a>] made it possible to specify a particular label value in the
Compatibility field. However, the functionality that required the
presence of a particular label value (or sequence of label values)
was never implemented, and that functionality is not present in the
current document. Hence, the value of this field is of no
significance; there is never any reason for this field to contain a
label value or a sequence of label values.
[<a id="ref-RFC3107">RFC3107</a>] also made it possible to withdraw a binding without
specifying the label explicitly, by setting the Compatibility field
to 0x800000. However, some implementations set it to 0x000000. In
order to ensure backwards compatibility, it is RECOMMENDED by this
document that the Compatibility field be set to 0x800000, but it is
REQUIRED that it be ignored upon reception.
<span class="h3"><a class="selflink" id="section-2.5" href="#section-2.5">2.5</a>. Changing the Label That Is Bound to a Prefix</span>
Suppose a BGP speaker, S1, has received on a given BGP session, a
SAFI-4 or SAFI-128 UPDATE, U1, that specifies label (or sequence of
labels) L1, prefix P, and next hop N1. As specified above, this
indicates that label (or sequence of labels) L1 is bound to prefix P
at node N1. Suppose that S1 now receives, on the same session, an
UPDATE, U2, of the same AFI/SAFI, that specifies label (or sequence
of labels) L2, prefix P, and the same next hop, N1.
o If [<a href="./rfc7911" title=""Advertisement of Multiple Paths in BGP"">RFC7911</a>] is not being used, UPDATE U2 MUST be interpreted as
meaning that L2 is now bound to P at N1 and that L1 is no longer
bound to P at N1. That is, the UPDATE U1 is implicitly withdrawn
and is replaced by UPDATE U2.
o Suppose that [<a href="./rfc7911" title=""Advertisement of Multiple Paths in BGP"">RFC7911</a>] is being used, that UPDATE U1 has Path
Identifier I1, and that UPDATE U2 has Path Identifier I2.
* If I1 is the same as I2, UPDATE U2 MUST be interpreted as
meaning that L2 is now bound to P at N1 and that L1 is no
longer bound to P at N1. UPDATE U1 is implicitly withdrawn.
* If I1 is not the same as I2, U2 MUST be interpreted as meaning
that L2 is now bound to P at N1, but U2 MUST NOT be interpreted
as meaning that L1 is no longer bound to P at N1. Under
certain conditions (specification of which is outside the scope
of this document), S1 may choose to load-balance traffic
between the path represented by U1 and the path represented by
U2. To send traffic on the path represented by U1, S1 uses the
label(s) advertised in U1; to send traffic on the path
represented by U2, S1 uses the label(s) advertised in U2.
(Although these two paths have the same next hop, one must
suppose that they diverge further downstream.)
<span class="grey">Rosen Standards Track [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc8277">RFC 8277</a> BGP and Labeled Address Prefixes October 2017</span>
Suppose a BGP speaker, S1, has received, on a given BGP session, a
SAFI-4 or SAFI-128 UPDATE that specifies label L1, prefix P, and next
hop N1. Suppose that S1 now receives, on a different BGP session, an
UPDATE of the same AFI/SAFI, that specifies label L2, prefix P, and
the same next hop, N1. BGP speaker S1 SHOULD treat this as an
indication that N1 has at least two paths to P, and S1 MAY use this
fact to do load-balancing of any traffic that it has to send to P.
Note that this section discusses only the case where two UPDATEs have
the same next hop. Procedures for the case where two UPDATEs have
different next hops are adequately described in [<a href="./rfc4271" title=""A Border Gateway Protocol 4 (BGP-4)"">RFC4271</a>].
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Installing and/or Propagating SAFI-4 or SAFI-128 Routes</span>
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Comparability of Routes</span>
Suppose a BGP speaker has received two SAFI-4 UPDATEs specifying the
same Prefix and that either:
o the two UPDATEs are received on different BGP sessions; or
o the two UPDATEs are received on the same session, add-paths is
used on that session, and the NLRIs of the two UPDATEs have
different path identifiers.
These two routes MUST be considered to be comparable, even if they
specify different labels. Thus, the BGP best-path selection
procedures (see <a href="./rfc4271#section-9.1">Section 9.1 of [RFC4271]</a>) are applied to select one
of them as the better path. If the procedures of [<a href="./rfc7911" title=""Advertisement of Multiple Paths in BGP"">RFC7911</a>] are not
being used on a particular BGP session, only the best path is
propagated on that session. If the procedures of [<a href="./rfc7911" title=""Advertisement of Multiple Paths in BGP"">RFC7911</a>] are being
used on a particular BGP session, then both paths may be propagated
on that session, though with different path identifiers.
The same applies to SAFI-128 routes.
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. Modification of Label(s) Field When Propagating</span>
<span class="h4"><a class="selflink" id="section-3.2.1" href="#section-3.2.1">3.2.1</a>. When the Next Hop Field Is Unchanged</span>
When a SAFI-4 or SAFI-128 route is propagated, if the Network Address
of Next Hop field is left unchanged, the Label field(s) MUST also be
left unchanged.
Note that a given route MUST NOT be propagated to a given peer if the
route's NLRI has multiple labels, but the Multiple Labels Capability
was not negotiated with the peer. Similarly, a given route MUST NOT
be propagated to a given peer if the route's NLRI has more labels
<span class="grey">Rosen Standards Track [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc8277">RFC 8277</a> BGP and Labeled Address Prefixes October 2017</span>
than the peer has announced (through its Multiple Labels Capability)
that it can handle. In either case, if a previous route with the
same AFI, SAFI, and prefix (but with fewer labels) has already been
propagated to the peer, that route MUST be withdrawn from that peer
using the procedure specified in <a href="#section-2.4">Section 2.4</a>.
<span class="h4"><a class="selflink" id="section-3.2.2" href="#section-3.2.2">3.2.2</a>. When the Next Hop Field Is Changed</span>
If the Network Address of Next Hop field is changed before a SAFI-4
or SAFI-128 route is propagated, the Label field(s) of the propagated
route MUST contain the label(s) that is (are) bound to the prefix at
the new next hop.
Suppose BGP speaker S1 has received an UPDATE that binds a particular
sequence of one or more labels to a particular prefix. If S1 chooses
to propagate this route after changing its next hop, S1 may change
the label in any of the following ways, depending upon local policy:
o A single label may be replaced by a single label of the same or
different value.
o A sequence of multiple labels may be replaced by a single label.
o A single label may be replaced by a sequence of multiple labels.
o A sequence of multiple labels may be replaced by a sequence of
multiple labels; the number of labels may be left the same or may
be changed.
Of course, when deciding whether to propagate, to a given BGP peer,
an UPDATE binding a sequence of more than one label, a BGP speaker
must attend to the information provided by the Multiple Labels
Capability (see <a href="#section-2.1">Section 2.1</a>). A BGP speaker MUST NOT send multiple
labels to a peer with which it has not exchanged the Multiple Labels
Capability and MUST NOT send more labels to a given peer than the
peer has announced (via the Multiple Labels Capability) than it can
handle.
It is possible that a BGP speaker's local policy will tell it to
encode N labels in a given route's NLRI before propagating the route,
but that one of the BGP speaker's peers cannot handle N labels in the
NLRI. In this case, the BGP speaker has two choices:
o It can propagate the route to the given peer with fewer than N
labels; however, whether this makes sense, and if so, how to
choose the labels, is also a matter of local policy.
<span class="grey">Rosen Standards Track [Page 15]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
<span class="grey"><a href="./rfc8277">RFC 8277</a> BGP and Labeled Address Prefixes October 2017</span>
o It can decide not to propagate the route to the given peer. In
that case, if a previous route with the same AFI, SAFI, and prefix
(but with fewer labels) has already been propagated to that peer,
that route MUST be withdrawn from that peer using the procedure of
<a href="#section-2.4">Section 2.4</a>.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Data Plane</span>
In the following, we will use the phrase "node S tunnels packet P to
node N", where packet P is an MPLS packet. By this phrase, we mean
that node S encapsulates packet P and causes packet P to be delivered
to node N in such a way that P's label stack before encapsulation
will be seen unchanged by N but will not be seen by the nodes (if
any) between S and N.
If the tunnel is a Label Switched Path (LSP), encapsulating the
packet may be as simple as pushing on another MPLS label. If node N
is a Layer 2 adjacency of node S, a Layer 2 encapsulation may be all
that is needed. Other sorts of tunnels (e.g., IP tunnels, GRE
tunnels, UDP tunnels) may also be used, depending upon the particular
deployment scenario.
Suppose BGP speaker S1 receives a SAFI-4 or SAFI-128 BGP UPDATE with
an MP_REACH_NLRI specifying label L1, prefix P, and next hop N1, and
suppose S1 installs this route as its (or one of its) best path(s)
towards P. And suppose S1 propagates this route after changing the
next hop to itself and changing the label to L2. Suppose further
that S1 receives an MPLS data packet and, in the process of
forwarding that MPLS data packet, S1 sees label L2 rise to the top of
the packet's label stack. Then, to forward the packet further, S1
must replace L2 with L1 as the top entry in the packet's label stack,
and S1 must then tunnel the packet to N1.
Suppose that the route received by S1 specified not a single label,
but a sequence of k labels <L11, L12, ..., L1k> where L11 is the
first label appearing in the NLRI, and L1k is the last. And suppose
again that S1 propagates this route after changing the next hop to
itself and changing the Label field to the single label L2. Suppose
further that S1 receives an MPLS data packet, and in the process of
forwarding that MPLS data packet, S1 sees label L2 rise to the top of
the packet's label stack. In this case, instead of simply replacing
L2 with L1, S1 removes L2 from the top of the label stack and then
pushes labels L1k through L11 onto the label stack such that L11 is
now at the top of the label stack. Then, S1 must tunnel the packet
to N1. (Note that L1k will not be at the bottom of the packet's
label stack and hence will not have the "bottom of stack" bit set
unless L2 had previously been at the bottom of the packet's label
stack.)
<span class="grey">Rosen Standards Track [Page 16]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
<span class="grey"><a href="./rfc8277">RFC 8277</a> BGP and Labeled Address Prefixes October 2017</span>
The above paragraph assumes that when S1 propagates a SAFI-4 or
SAFI-128 route after setting the next hop to itself, it replaces the
label or labels specified in the NLRI of that route with a single
label. However, it is also possible, as determined by local policy,
for a BGP speaker to specify multiple labels when it propagates a
SAFI-4 or SAFI-128 route after setting the next hop to itself.
Suppose, for example, that S1 supports context labels ([<a href="./rfc5331" title=""MPLS Upstream Label Assignment and Context-Specific Label Space"">RFC5331</a>]).
Let L21 be a context label supported by S1, and let L22 be a label
that is in the label space identified (at S1) by L21. Suppose S1
receives a SAFI-4 or SAFI-128 UPDATE whose prefix is P, whose Label
field is <L11, L12, ..., L1k> and whose next hop is N1. Before
propagating the UPDATE, S1 may set the next hop to itself (by
replacing N1 with S1) and may replace the label stack <L11, L12, ...,
L1k> with the pair of labels <L21, L22>.
In this case, if S1 receives an MPLS data packet whose top label is
L21 and whose second label is L22, S1 will remove both L21 and L22
from the label stack and replace them with <L11, L12, ..., L1k>.
Note that the fact that L21 is a context label is known only to S1;
other BGP speakers do not know how S1 will interpret L21 (or L22).
The ability to replace one or more labels by one or more labels can
provide great flexibility, but it must be done carefully. Let's
suppose again that S1 receives an UPDATE that specifies prefix P,
label stack <L11, L12, ..., L1k>, and next hop N1. And suppose that
S1 propagates this UPDATE to BGP speaker S2 after setting next hop
self and after replacing the Label field with <L21, L22, ..., L2k>.
Finally, suppose that S1 programs its data plane so that when it
processes a received MPLS packet whose top label is L21, it replaces
L21 with <L11, L12, ..., L1k> and then tunnels the packet to N1.
In this case, BGP speaker S2 will have received a route with prefix
P, Label field <L21, L22, ..., L2k>, and next hop S1. If S2 decides
to forward an IP packet according to this route, it will push <L21,
L22, ..., L2k> onto the packet's label stack and tunnel the packet to
S1. S1 will replace L21 with <L11, L12, ..., L1k> and will tunnel
the packet to N1. N1 will receive the packet with the following
label stack: <L11, L12, ..., L1k, L22, ..., L2k>. While this may be
useful in certain scenarios, it may provide unintended results in
other scenarios.
Procedures for choosing, setting up, maintaining, or determining the
liveness of a particular tunnel or type of tunnel are outside the
scope of this document.
<span class="grey">Rosen Standards Track [Page 17]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
<span class="grey"><a href="./rfc8277">RFC 8277</a> BGP and Labeled Address Prefixes October 2017</span>
When pushing labels onto a packet's label stack, the Time-to-Live
(TTL) field ([<a href="./rfc3032" title=""MPLS Label Stack Encoding"">RFC3032</a>], [<a href="./rfc3443" title=""Time To Live (TTL) Processing in Multi-Protocol Label Switching (MPLS) Networks"">RFC3443</a>]) and the Traffic Class (TC) field
([<a href="./rfc3032" title=""MPLS Label Stack Encoding"">RFC3032</a>], [<a href="./rfc5462" title=""Multiprotocol Label Switching (MPLS) Label Stack Entry: "">RFC5462</a>]) of each label stack entry must, of course, be
set. This document does not specify any set of rules for setting
these fields; that is a matter of local policy.
This document does not specify any new rules for processing the label
stack of an incoming data packet.
It is a matter of local policy whether SAFI-4 routes can be used as
the basis for forwarding IP packets or whether SAFI-4 routes can only
be used for forwarding MPLS packets. If BGP speaker S1 is forwarding
IP packets according to SAFI-4 routes, then consider an IP packet
with destination address D, such that P is the "longest prefix match"
for D from among the routes that are being used to forward IP
packets. And suppose the packet is being forwarded according to a
SAFI-4 route whose prefix is P, whose next hop is N1 and whose
sequence of labels is L1. To forward the packet according to this
route, S1 must create a label stack for the packet, push on the
sequence of labels L1, and then tunnel the packet to N1.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Relationship between SAFI-4 and SAFI-1 Routes</span>
It is possible that a BGP speaker will receive both a SAFI-1 route
for prefix P and a SAFI-4 route for prefix P. Different
implementations treat this situation in different ways.
For example, some implementations may regard SAFI-1 routes and SAFI-4
routes as completely independent and may treat them in a "ships in
the night" fashion. In this case, best-path selection for the two
SAFIs is independent, and there will be a best SAFI-1 route to P as
well as a best SAFI-4 route to P. Which packets get forwarded
according to the routes of which SAFI is then a matter of local
policy.
Other implementations may treat the SAFI-1 and SAFI-4 routes for a
given prefix as comparable, such that the best route to prefix P is
either a SAFI-1 route or a SAFI-4 route but not both. In such
implementations, if load-balancing is done among a set of equal cost
routes, some of the equal cost routes may be SAFI-1 routes and some
may be SAFI-4 routes. Whether this is allowed is, again, a matter of
local policy.
Some implementations may allow a single BGP session to carry UPDATEs
of both SAFI-1 and SAFI-4; other implementations may disallow this.
Some implementations that allow both SAFIs on the same session may
treat the receipt of a SAFI-1 route for prefix P on a given session
<span class="grey">Rosen Standards Track [Page 18]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
<span class="grey"><a href="./rfc8277">RFC 8277</a> BGP and Labeled Address Prefixes October 2017</span>
as an implicit withdrawal of a previous SAFI-4 route for prefix P on
that session, and vice versa. Other implementations may have
different behavior.
A BGP speaker may receive a SAFI-4 route over a given BGP session but
may have other BGP sessions for which SAFI-4 is not enabled. In this
case, the BGP speaker MAY convert the SAFI-4 route to a SAFI-1 route
and then propagate the result over the session on which SAFI-4 is not
enabled. Whether this is done is a matter of local policy.
These differences in the behavior of different implementations may
result in unexpected behavior or lack of interoperability. In some
cases, it may be difficult or impossible to achieve the desired
policies with certain implementations or combinations of
implementations.
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. IANA Considerations</span>
IANA has assigned value 8 for Multiple Labels Capability in the BGP
"Capability Codes" registry, with this document as the reference.
IANA has modified the BGP "Capability Codes" registry to mark value 4
("Multiple routes to a destination capability") as deprecated, with
this document as the reference.
IANA has changed the reference for SAFI 4 in the "Subsequent Address
Family Identifiers (SAFI) Parameters" registry to this document.
Also, IANA has added this document as a reference for SAFI 128 in
that same registry.
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Security Considerations</span>
The security considerations of BGP (as specified in [<a href="./rfc4271" title=""A Border Gateway Protocol 4 (BGP-4)"">RFC4271</a>]) apply.
If a BGP implementation that is not conformant with the current
document encodes multiple labels in the NLRI but has not sent and
received the Multiple Labels Capability, a BGP implementation that
does conform with the current document will likely reset the BGP
session.
This document specifies that certain data packets be "tunneled" from
one BGP speaker to another. This requires that the packets be
encapsulated while in flight. This document does not specify the
encapsulation to be used. However, if a particular encapsulation is
used, the security considerations of that encapsulation are
applicable.
<span class="grey">Rosen Standards Track [Page 19]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
<span class="grey"><a href="./rfc8277">RFC 8277</a> BGP and Labeled Address Prefixes October 2017</span>
If a particular tunnel encapsulation does not provide integrity and
authentication, it is possible that a data packet's label stack can
be modified, through error or malfeasance, while the packet is in
flight. This can result in misdelivery of the packet. It should be
noted that the tunnel encapsulation (MPLS) most commonly used in
deployments of this specification does not provide integrity or
authentication; neither do the other tunnel encapsulations mentioned
in <a href="#section-4">Section 4</a>.
There are various techniques one can use to constrain the
distribution of BGP UPDATE messages. If a BGP UPDATE advertises the
binding of a particular label or set of labels to a particular
address prefix, such techniques can be used to control the set of BGP
speakers that are intended to learn of that binding. However, if BGP
sessions do not provide privacy, other routers may learn of that
binding.
When a BGP speaker processes a received MPLS data packet whose top
label it advertised, there is no guarantee that the label in question
was put on the packet by a router that was intended to know about
that label binding. If a BGP speaker is using the procedures of this
document, it may be useful for that speaker to distinguish its
"internal" interfaces from its "external" interfaces and to avoid
advertising the same labels to BGP speakers reached on internal
interfaces as to BGP speakers reached on external interfaces. Then,
a data packet can be discarded if its top label was not advertised
over the type of interface from which the packet was received. This
reduces the likelihood of forwarding packets whose labels have been
"spoofed" by untrusted sources.
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. References</span>
<span class="h3"><a class="selflink" id="section-8.1" href="#section-8.1">8.1</a>. Normative References</span>
[<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>,
DOI 10.17487/RFC2119, March 1997,
<<a href="https://www.rfc-editor.org/info/rfc2119">https://www.rfc-editor.org/info/rfc2119</a>>.
[<a id="ref-RFC3031">RFC3031</a>] Rosen, E., Viswanathan, A., and R. Callon, "Multiprotocol
Label Switching Architecture", <a href="./rfc3031">RFC 3031</a>,
DOI 10.17487/RFC3031, January 2001,
<<a href="https://www.rfc-editor.org/info/rfc3031">https://www.rfc-editor.org/info/rfc3031</a>>.
[<a id="ref-RFC3032">RFC3032</a>] Rosen, E., Tappan, D., Fedorkow, G., Rekhter, Y.,
Farinacci, D., Li, T., and A. Conta, "MPLS Label Stack
Encoding", <a href="./rfc3032">RFC 3032</a>, DOI 10.17487/RFC3032, January 2001,
<<a href="https://www.rfc-editor.org/info/rfc3032">https://www.rfc-editor.org/info/rfc3032</a>>.
<span class="grey">Rosen Standards Track [Page 20]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
<span class="grey"><a href="./rfc8277">RFC 8277</a> BGP and Labeled Address Prefixes October 2017</span>
[<a id="ref-RFC3107">RFC3107</a>] Rekhter, Y. and E. Rosen, "Carrying Label Information in
BGP-4", <a href="./rfc3107">RFC 3107</a>, DOI 10.17487/RFC3107, May 2001,
<<a href="https://www.rfc-editor.org/info/rfc3107">https://www.rfc-editor.org/info/rfc3107</a>>.
[<a id="ref-RFC3443">RFC3443</a>] Agarwal, P. and B. Akyol, "Time To Live (TTL) Processing
in Multi-Protocol Label Switching (MPLS) Networks",
<a href="./rfc3443">RFC 3443</a>, DOI 10.17487/RFC3443, January 2003,
<<a href="https://www.rfc-editor.org/info/rfc3443">https://www.rfc-editor.org/info/rfc3443</a>>.
[<a id="ref-RFC4271">RFC4271</a>] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A
Border Gateway Protocol 4 (BGP-4)", <a href="./rfc4271">RFC 4271</a>,
DOI 10.17487/RFC4271, January 2006,
<<a href="https://www.rfc-editor.org/info/rfc4271">https://www.rfc-editor.org/info/rfc4271</a>>.
[<a id="ref-RFC4364">RFC4364</a>] Rosen, E. and Y. Rekhter, "BGP/MPLS IP Virtual Private
Networks (VPNs)", <a href="./rfc4364">RFC 4364</a>, DOI 10.17487/RFC4364, February
2006, <<a href="https://www.rfc-editor.org/info/rfc4364">https://www.rfc-editor.org/info/rfc4364</a>>.
[<a id="ref-RFC4659">RFC4659</a>] De Clercq, J., Ooms, D., Carugi, M., and F. Le Faucheur,
"BGP-MPLS IP Virtual Private Network (VPN) Extension for
IPv6 VPN", <a href="./rfc4659">RFC 4659</a>, DOI 10.17487/RFC4659, September 2006,
<<a href="https://www.rfc-editor.org/info/rfc4659">https://www.rfc-editor.org/info/rfc4659</a>>.
[<a id="ref-RFC4760">RFC4760</a>] Bates, T., Chandra, R., Katz, D., and Y. Rekhter,
"Multiprotocol Extensions for BGP-4", <a href="./rfc4760">RFC 4760</a>,
DOI 10.17487/RFC4760, January 2007,
<<a href="https://www.rfc-editor.org/info/rfc4760">https://www.rfc-editor.org/info/rfc4760</a>>.
[<a id="ref-RFC4798">RFC4798</a>] De Clercq, J., Ooms, D., Prevost, S., and F. Le Faucheur,
"Connecting IPv6 Islands over IPv4 MPLS Using IPv6
Provider Edge Routers (6PE)", <a href="./rfc4798">RFC 4798</a>,
DOI 10.17487/RFC4798, February 2007,
<<a href="https://www.rfc-editor.org/info/rfc4798">https://www.rfc-editor.org/info/rfc4798</a>>.
[<a id="ref-RFC5462">RFC5462</a>] Andersson, L. and R. Asati, "Multiprotocol Label Switching
(MPLS) Label Stack Entry: "EXP" Field Renamed to "Traffic
Class" Field", <a href="./rfc5462">RFC 5462</a>, DOI 10.17487/RFC5462, February
2009, <<a href="https://www.rfc-editor.org/info/rfc5462">https://www.rfc-editor.org/info/rfc5462</a>>.
[<a id="ref-RFC5492">RFC5492</a>] Scudder, J. and R. Chandra, "Capabilities Advertisement
with BGP-4", <a href="./rfc5492">RFC 5492</a>, DOI 10.17487/RFC5492, February
2009, <<a href="https://www.rfc-editor.org/info/rfc5492">https://www.rfc-editor.org/info/rfc5492</a>>.
[<a id="ref-RFC5549">RFC5549</a>] Le Faucheur, F. and E. Rosen, "Advertising IPv4 Network
Layer Reachability Information with an IPv6 Next Hop",
<a href="./rfc5549">RFC 5549</a>, DOI 10.17487/RFC5549, May 2009,
<<a href="https://www.rfc-editor.org/info/rfc5549">https://www.rfc-editor.org/info/rfc5549</a>>.
<span class="grey">Rosen Standards Track [Page 21]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
<span class="grey"><a href="./rfc8277">RFC 8277</a> BGP and Labeled Address Prefixes October 2017</span>
[<a id="ref-RFC7606">RFC7606</a>] Chen, E., Ed., Scudder, J., Ed., Mohapatra, P., and K.
Patel, "Revised Error Handling for BGP UPDATE Messages",
<a href="./rfc7606">RFC 7606</a>, DOI 10.17487/RFC7606, August 2015,
<<a href="https://www.rfc-editor.org/info/rfc7606">https://www.rfc-editor.org/info/rfc7606</a>>.
[<a id="ref-RFC8174">RFC8174</a>] Leiba, B., "Ambiguity of Uppercase vs Lowercase in <a href="./rfc2119">RFC</a>
<a href="./rfc2119">2119</a> Key Words", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc8174">RFC 8174</a>, DOI 10.17487/RFC8174,
May 2017, <<a href="https://www.rfc-editor.org/info/rfc8174">https://www.rfc-editor.org/info/rfc8174</a>>.
<span class="h3"><a class="selflink" id="section-8.2" href="#section-8.2">8.2</a>. Informative References</span>
[<a id="ref-Enhanced-GR">Enhanced-GR</a>]
Patel, K., Chen, E., Fernando, R., and J. Scudder,
"Accelerated Routing Convergence for BGP Graceful
Restart", Work in Progress,
<a href="./draft-ietf-idr-enhanced-gr-06">draft-ietf-idr-enhanced-gr-06</a>, June 2016.
[<a id="ref-RFC4724">RFC4724</a>] Sangli, S., Chen, E., Fernando, R., Scudder, J., and Y.
Rekhter, "Graceful Restart Mechanism for BGP", <a href="./rfc4724">RFC 4724</a>,
DOI 10.17487/RFC4724, January 2007,
<<a href="https://www.rfc-editor.org/info/rfc4724">https://www.rfc-editor.org/info/rfc4724</a>>.
[<a id="ref-RFC5331">RFC5331</a>] Aggarwal, R., Rekhter, Y., and E. Rosen, "MPLS Upstream
Label Assignment and Context-Specific Label Space",
<a href="./rfc5331">RFC 5331</a>, DOI 10.17487/RFC5331, August 2008,
<<a href="https://www.rfc-editor.org/info/rfc5331">https://www.rfc-editor.org/info/rfc5331</a>>.
[<a id="ref-RFC6514">RFC6514</a>] Aggarwal, R., Rosen, E., Morin, T., and Y. Rekhter, "BGP
Encodings and Procedures for Multicast in MPLS/BGP IP
VPNs", <a href="./rfc6514">RFC 6514</a>, DOI 10.17487/RFC6514, February 2012,
<<a href="https://www.rfc-editor.org/info/rfc6514">https://www.rfc-editor.org/info/rfc6514</a>>.
[<a id="ref-RFC7432">RFC7432</a>] Sajassi, A., Ed., Aggarwal, R., Bitar, N., Isaac, A.,
Uttaro, J., Drake, J., and W. Henderickx, "BGP MPLS-Based
Ethernet VPN", <a href="./rfc7432">RFC 7432</a>, DOI 10.17487/RFC7432, February
2015, <<a href="https://www.rfc-editor.org/info/rfc7432">https://www.rfc-editor.org/info/rfc7432</a>>.
[<a id="ref-RFC7911">RFC7911</a>] Walton, D., Retana, A., Chen, E., and J. Scudder,
"Advertisement of Multiple Paths in BGP", <a href="./rfc7911">RFC 7911</a>,
DOI 10.17487/RFC7911, July 2016,
<<a href="https://www.rfc-editor.org/info/rfc7911">https://www.rfc-editor.org/info/rfc7911</a>>.
[<a id="ref-TUNNEL-ENCAPS">TUNNEL-ENCAPS</a>]
Rosen, E., Patel, K., and G. Velde, "The BGP Tunnel
Encapsulation Attribute", Work in Progress,
<a href="./draft-ietf-idr-tunnel-encaps-07">draft-ietf-idr-tunnel-encaps-07</a>, July 2017.
<span class="grey">Rosen Standards Track [Page 22]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span>
<span class="grey"><a href="./rfc8277">RFC 8277</a> BGP and Labeled Address Prefixes October 2017</span>
Acknowledgements
This document obsoletes <a href="./rfc3107">RFC 3107</a>. We wish to thank Yakov Rekhter,
co-author of <a href="./rfc3107">RFC 3107</a>, for his work on that document. We also wish
to thank Ravi Chandra, Enke Chen, Srihari R. Sangli, Eric Gray, and
Liam Casey for their review of and comments on that document.
We thank Alexander Okonnikov and David Lamparter for pointing out a
number of the errors in <a href="./rfc3107">RFC 3107</a>.
We wish to thank Lili Wang and Kaliraj Vairavakkalai for their help
and advice during the preparation of this document.
We also thank Mach Chen, Bruno Decraene, Jie Dong, Adrian Farrel,
Jeff Haas, Jonathan Hardwick, Jakob Heitz, Alexander Okonnikov, Keyur
Patel, Kevin Wang, and Lucy Yong for their review of and comments on
this document.
Author's Address
Eric C. Rosen
Juniper Networks, Inc.
10 Technology Park Drive
Westford, Massachusetts 01886
United States of America
Email: erosen@juniper.net
Rosen Standards Track [Page 23]
</pre>
|