idnits 2.17.1 draft-ietf-rps-rpsl-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Cannot find the required boilerplate sections (Copyright, IPR, etc.) in this document. Expected boilerplate is as follows today (2024-03-29) according to https://trustee.ietf.org/license-info : IETF Trust Legal Provisions of 28-dec-2009, Section 6.a: This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 2: Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 3: This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) 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. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** Missing expiration date. The document expiration date should appear on the first and last page. ** The document seems to lack a 1id_guidelines paragraph about Internet-Drafts being working documents. ** The document seems to lack a 1id_guidelines paragraph about 6 months document validity. ** The document seems to lack a 1id_guidelines paragraph about the list of current Internet-Drafts. ** The document seems to lack a 1id_guidelines paragraph about the list of Shadow Directories. ** The document is more than 15 pages and seems to lack a Table of Contents. == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an Abstract section. ** The document seems to lack a Security Considerations section. ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** The document seems to lack an Authors' Addresses Section. ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. ** There are 434 instances of weird spacing in the document. Is it really formatted ragged-right, rather than justified? ** There are 592 instances of too long lines in the document, the longest one being 6 characters in excess of 72. == There are 1 instance of lines with non-RFC2606-compliant FQDNs in the document. == There are 91 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. ** The document seems to lack a both a reference to RFC 2119 and the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. RFC 2119 keyword, line 1156: '... MANDATORY | OPTIONAL (<...' RFC 2119 keyword, line 1158: '... MANDATORY | OPTIONAL (<...' RFC 2119 keyword, line 1160: '...otocol; MANDATORY and OPTIONAL are...' RFC 2119 keyword, line 1226: '... OPTIONAL flap_damp() ...' Miscellaneous warnings: ---------------------------------------------------------------------------- == Line 19 has weird spacing: '... Draft is ...' == Line 20 has weird spacing: '... allows the s...' == Line 21 has weird spacing: '...at high level...' == Line 22 has weird spacing: '...At the same t...' == Line 23 has weird spacing: '...so that low l...' == (429 more instances...) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (November 25, 1996) is 9986 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: '0' is mentioned on line 1214, but not defined == Missing Reference: '65535' is mentioned on line 1214, but not defined -- Looks like a reference, but probably isn't: '0 65535' on line 1214 -- Possible downref: Non-RFC (?) normative reference: ref. '1' -- Possible downref: Non-RFC (?) normative reference: ref. '2' -- Possible downref: Non-RFC (?) normative reference: ref. '3' -- Possible downref: Non-RFC (?) normative reference: ref. '4' ** Obsolete normative reference: RFC 822 (ref. '5') (Obsoleted by RFC 2822) -- Possible downref: Non-RFC (?) normative reference: ref. '6' -- Possible downref: Non-RFC (?) normative reference: ref. '7' -- Possible downref: Non-RFC (?) normative reference: ref. '8' -- Possible downref: Non-RFC (?) normative reference: ref. '9' -- Possible downref: Non-RFC (?) normative reference: ref. '11' ** Obsolete normative reference: RFC 1654 (ref. '12') (Obsoleted by RFC 1771) Summary: 17 errors (**), 0 flaws (~~), 11 warnings (==), 12 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Internet Draft Cengiz Alaettinoglu 2 Expires May 25, 1997 USC/ISI 3 draft-ietf-rps-rpsl-00.txt Tony Bates 4 Cisco Systems 5 Elise Gerich 6 At Home Network 7 Daniel Karrenberg 8 RIPE 9 Marten Terpstra 10 Bay Networks 11 Curtis Villamizar 12 ANS 13 November 25, 1996 15 Routing Policy Specification Language (RPSL) 17 Status of this Memo 19 This Internet Draft is the reference document for Routing Policy 20 Specification Language (RPSL). RPSL allows the specification of routing 21 policies at high level; for example at the Autonomous System (AS) level. 22 At the same time, policies can be specified with sufficient detail in 23 RPSL so that low level router configurations can be generated from them. 24 RPSL is extensible; new routing protocols and new protocol features can be 25 introduced at any time. 27 This document is an Internet Draft, and can be found as draft-ietf-rps-rpsl- 28 00.txt in any standard internet drafts repository. Internet Drafts are 29 working documents of the Internet Engineering Task Force (IETF), its Areas, 30 and its Working Groups. Note that other groups may also distribute working 31 documents as Internet Drafts. 33 Internet Drafts are draft documents valid for a maximum of six months. 34 Internet Drafts may be updated, replaced, or obsoleted by other documents 35 at any time. It is not appropriate to use Internet Drafts as reference 36 material, or to cite them other than as a ``working draft'' or ``work in 37 progress.'' 39 Please check the I-D abstract listing contained in each Internet Draft 40 directory to learn the current status of this or any other Internet Draft. 42 1 Introduction 44 This Internet Draft is the reference document for Routing Policy 45 Specification Language (RPSL). RPSL allows the specification of routing 46 policies at high level; for example at the Autonomous System (AS) level. 47 At the same time, policies can be specified with sufficient detail in 48 RPSL so that low level router configurations can be generated from them. 49 RPSL is extensible; new routing protocols and new protocol features can be 50 introduced at any time. 52 RIPE-81 [4] was the first language deployed in the Internet for specifying 53 routing policies. It was later replaced by another language called 54 RIPE-181 [3]. There are limitations in the types of policies that can 55 be described by RIPE-181 and the limitations became evident when several 56 enterprises tried to use RIPE-181 to describe their routing policies. RPSL 57 addresses RIPE-181's limitations. 59 RPSL is object oriented; that is, objects contain pieces of policy and 60 administrative information. These objects are registered in the Internet 61 Routing Registry (IRR) by the authorized organizations. The registration 62 process is not within the scope of this document. Please refer to [1]. 64 In the following sections, we present the classes that are used to define 65 various policy and administrative objects. The mntner class defines 66 entities authorized to add, delete and modify a set of objects. The person 67 class describes technical and administrative contact personnel. Autonomous 68 systems (ASes) are specified using the aut-num class. Routes are specified 69 using the route class. Sets of ASes and routes can be defined using 70 the as-set and route-set classes. The dictionary class provides the 71 extensibility to the language. The inet-rtr class is used to specify 72 routers. 74 The reader of this document is expected to be familiar with BGP [12] and 75 interAS routing policies. This document is not a tutorial on RPSL, nor on 76 policy routing. Please refer to applications document for a tutorial on 77 RPSL[2]. 79 2 RPSL Names, Reserved Words, and Representation 81 Each class has a set of attributes which store a piece of information about 82 the objects of the class. Attributes can be mandatory or optional: A 83 mandatory attribute has to be defined for all objects of the class; optional 84 attributes can be skipped. Attributes can also be single or multiple 85 valued. Each object is uniquely identified by a set of attributes, referred 86 to as the class ``key''. 88 The value of an attribute has a type. The following types are most widely 89 used: 91 Many objects in RPSL have a name. An is made 92 up of letters, digits, the character underscore ``_'', and the character 93 hyphen ``-''; the first character of a name must be a letter, and the 94 last character of a name must be a letter or a digit. Names are case 95 insensitive. The following words are reserved by RPSL, and they can not 96 be used as names: 98 any as-any rs-any peeras 99 and or not 100 atomic from to at action accept announce networks 102 Names starting with certain prefixes are reserved for certain object 103 types. Names starting with ``as-'' are reserved for as set names. 104 Names starting with ``rs-'' are reserved for route set names. 106 An AS number x is represented as the string ``ASx''. That is, 107 the AS 226 is represented as AS226. 109 An IP address is represented as a sequence of four integers in 110 the range from 0 to 255 separated by the character dot ``.''. For 111 example, 128.9.128.5 represents a valid IP address. 113 An address prefix is represented as an IP address followed 114 by the character slash ``/'' followed by an integer in the range from 115 0 to 32. The following are valid address prefixes: 128.9.128.5/32, 116 128.9.0.0/16, 0.0.0.0/0; and the following address prefixes are invalid: 117 0/0, 128.9/16 since 0 or 128.9 are not strings containing four integers. 119 A date is represented as an eight digit integer of the form YYYYMMDD 120 where YYYY represents the year, MM represents the month of the year (01 121 through 12), and DD represents the day of the month (01 through 31). 122 For example, June 24, 1996 is represented as 19960624. 124 is as described in RFC-822[5]. 126 is as described in RFC-1034[10]. 128 is either a full name of a person or a uniquely assigned 129 NIC-handle. Its syntax has the following form: 131 [] 132 | 134 E.g. 135 John E Doe 136 JED31 138 A NIC handle is an identifier used by INTERNIC to unambiguously refer to 139 people. 141 is a sequence of ASCII characters. 143 is a name of an object of type X. That is is a name of an mntner object. 146 is a name of an IRR registry. The routing registries are 147 listed in Appendix A. 149 A value of an attribute may also be a lists of one of these types. A list 150 is represented by separating the list members by commas ``,''. For example, 151 ``AS1, AS2, AS3, AS4'' is a list of AS numbers. Note that being list valued 152 and being multiple valued are orthogonal. A multiple valued attribute has 153 more than one value each of which may or may not be a list depending on 154 the attribute. On the other hand a single valued attribute may have a list 155 value. 157 An RPSL object is textually represented as a list of attribute-value pairs. 158 Each attribute-value pair is written on a separate line. The attribute name 159 starts at column 0, followed by character ``:'' and followed by the value 160 of the attribute. The object's representation ends when a blank line is 161 encountered. An attribute's value can be split over multiple lines, by 162 starting the continuation lines with a white-space (`` '' or tab) character. 163 The order of attribute-value pairs is significant, hence attribute-value 164 pairs can not be reordered. 166 An object's description may contain comments. A comment can be anywhere in 167 an object's definition except for column 0, it starts at the first ``#'' 168 character on a line and ends at the first end-of-line character. White 169 space characters can be used to improve readability. 171 3 mntner Class 173 The mntner class defines entities that can create, delete and update RPSL 174 objects. A provider, before he/she can create any RPSL object, first needs 175 to create a mntner object. The attributes of the mntner class are shown in 176 Figure 1. A more complete description of mntner class can be found in [7]. 177 Here, we summarize the mntner class for completeness. 179 The mntner attribute is mandatory and is the class key attribute. Its value 180 is an RPSL name. The auth attribute specifies the scheme that will be used 181 to identify and authenticate update requests from this maintainer. It has 182 Attribute Value Type 183 mntner mandatory, single-valued, class key 184 descr mandatory, single-valued 185 auth see description in text mandatory, multi-valued 186 upd-to mandatory, multi-valued 187 mnt-nfy optional, multi-valued 188 tech-c mandatory, multi-valued 189 admin-c mandatory, multi-valued 190 remarks optional, multi-valued 191 notify optional, multi-valued 192 mnt-by mandatory, multi-valued 193 changed mandatory, multi-valued 194 source mandatory, single-valued 196 Figure 1: mntner Class Attributes 198 the following syntax: 200 auth: 202 E.g. 203 auth: NONE 204 auth: CRYPT-PW dhjsdfhruewf 205 auth: MAIL-FROM .*@ripe\.net 207 The 's currently defined are: NONE, MAIL-FROM and CRYPT-PW. The 208 is additional information required by a particular scheme: in 209 the case of MAIL-FROM, it is a regular expression matching valid email 210 addresses; in the case of CRYPT-PW, it is a password in UNIX crypt format. 211 If multiple auth attributes are specified, an update request satisfying any 212 one of them is authenticated to be from the maintainer. 214 The upd-to attribute is an email address. On an unauthorized update 215 attempt of an object maintained by this maintainer, an email message will 216 be sent to this address. The mnt-nfy attribute is an email address. A 217 notification message will be forwarded to this email address whenever an 218 object maintained by this maintainer is added, changed or deleted. 220 The descr attribute is a short, free-form textual description of the object. 221 The tech-c attribute is a technical contact person. This is someone to 222 be contacted for technical problems such as misconfiguration. The admin-c 223 attribute is an administrative contact person. The remarks attribute is a 224 free text explanation or clarification. The notify attribute is an email 225 address to which notifications of changes to this object should be sent. 226 The mnt-by attribute is a mntner object name. The authorization for changes 227 to this object is governed by that maintainer object. The changed attribute 228 documents who last changed this object, and when this change was made. Its 229 syntax has the following form: 231 changed: 233 E.g. 234 changed: johndoe@terabit-labs.nn 19900401 236 The identifies the person who made the last change. 237 is the date of the change. The source attribute specifies the 238 registry where the object is registered. 240 The descr, tech-c, admin-c, remarks, notify, mnt-by, changed and source 241 attributes are attributes of all RPSL classes. We do not further discuss 242 them in other sections. 244 4 person Class 246 A person class is used to describe information about people. Even though it 247 does not describe routing policy, we still describe it here briefly since 248 many policy objects make reference to person objects. The details of the 249 person class can be found in Reference [9]. 251 The attributes of the person class are shown in Figure 2. The person 252 attribute is the full name of the person. The phone and the fax-no 253 attributes have the following syntax: 255 phone: + [ext. ] 257 E.g.: 258 phone: +31 20 12334676 259 phone: +44 123 987654 ext. 4711 261 5 route Class 263 Each interAS route originated by an AS is specified using a route object. 264 The attributes of the route class are shown in Figure 3. The route 265 attribute is the address prefix of the route and the origin attribute is 266 the AS number of the AS that originates the route into the interAS routing 267 system. The route and origin attribute pair is the class key. 269 Attribute Value Type 270 person mandatory, single-valued, class key 271 address mandatory, multi-valued 272 phone see description in text mandatory, multi-valued 273 fax-no same as phone optional, multi-valued 274 e-mail mandatory, multi-valued 275 nic-hdl see description in text optional, single-valued 277 Figure 2: person Class Attributes 279 Attribute Value Type 280 route mandatory, single-valued, class key 281 origin mandatory, single-valued, class key 282 withdrawn optional, single-valued 283 member-of optional, single-valued Section 6 284 inject-at see Section 9 optional, multi-valued 285 aggregate-by see Section 9 optional, single-valued 286 export-components see Section 9 optional, single-valued 287 holes see Section 9 optional, single-valued 289 Figure 3: route Class Attributes 291 The Figure 4 shows examples of four route objects. Note that the last two 292 route objects have the same address prefix, namely 128.8.0.0/16. However, 293 they are different route objects since they are originated by different ASes 294 (i.e. they have different keys). 296 route:128.9.0.0/16 297 origin: AS226 299 route: 128.99.0.0/16 300 origin: AS226 302 route: 128.8.0.0/16 303 origin: AS1 305 route: 128.8.0.0/16 306 origin: AS2 307 withdrawn: 19960624 309 Figure 4: Route Objects 311 The withdrawn attribute, if present, signifies that the originator AS no 312 longer originates this address prefix in the Internet. Its value is a date 313 indicating the date of withdrawal. In Figure 4, the last route object is 314 withdrawn (i.e. no longer originated by AS2) on June 24, 1996. 316 6 Set Classes 318 To specify policies, it is often useful to define sets of objects. For 319 this purpose we define two classes route-set and as-set. These classes 320 define a named set. The members of these sets can be specified by either 321 explicitly listing them in the set object's definition, or implicitly by 322 having route and aut-num objects refer to the set name in their definitions, 323 or a combination of both methods. 325 6.1 route-set Class 327 The attributes of the route-set class are shown in Figure 5. The route-set 328 attribute defines the name of the set. It is an RPSL name that starts with 329 ``rs-''. The members attribute lists the members of the set. The members 330 attribute is a list of address prefixes or other route-set names. 332 Attribute Value Type 333 route-set mandatory, single-valued, class key 334 members list of optional, single-valued 335 members-by-referral list of optional, single-valued 337 Figure 5: route-set Class Attributes 339 Figure 6 presents some example route-set objects. The set rs-foo contains 340 two address prefixes, namely 128.9.0.0/16 and 128.9.0.0/16. The set rs-bar 341 contains the members of the set rs-foo and the address prefix 128.7.0.0/16. 342 The set rs-empty contains no members. 344 The members-by-referral attribute is a list of maintainer names or the 345 keyword ANY. If this attribute is used, the route set also includes 346 those address prefixes whose route objects are registered by one of these 347 maintainers and whose member-of attribute refers to the name of this 348 route set. If the value of a members-by-referral attribute is ANY, 349 any route object referring to the route set name is a member. If the 350 members-by-referral attribute is missing, only the address prefixes listed 351 in the members attribute are members of the set. 353 Figure 7 presents example route-set objects that use the members-by-referral 354 route-set: rs-foo 355 members: 128.9.0.0/16, 128.9.0.0/24 357 route-set: rs-bar 358 members: 128.7.0.0/16, rs-foo 360 route-set: rs-empty 362 Figure 6: route-set Objects 364 route-set: rs-foo 365 members-by-referral: MNTR-ME, MNTR-YOU 367 route-set: rs-bar 368 members: 128.7.0.0/16 369 members-by-referral: MNTR-YOU 371 route: 128.9.0.0/16 372 origin: AS1 373 member-of: rs-foo 374 mnt-by: MNTR-ME 376 route: 128.8.0.0/16 377 origin: AS2 378 member-of: rs-foo, rs-bar 379 mnt-by: MNTR-YOU 381 Figure 7: route-set objects. 383 attribute. The set rs-foo contains two address prefixes, namely 384 128.8.0.0/16 and 128.9.0.0/16 since the route objects for 128.8.0.0/16 and 385 128.9.0.0/16 refer to the set name rs-foo in their member-of attribute. The 386 set rs-bar contains the address prefixes 128.7.0.0/16 and 128.8.0.0/16. The 387 route 128.7.0.0/16 is explicitly listed in the members attribute of rs-bar, 388 and the route object for 128.8.0.0/16 refer to the set name rs-bar in its 389 member-of attribute. 391 6.2 as-set Class 393 The attributes of the as-set class are shown in Figure 8. The as-set 394 attribute defines the name of the set. It is an RPSL name that starts with 395 ``as-''. The members attribute lists the members of the set. The members 396 attribute is a list of AS numbers, or other as-set names. 398 Attribute Value Type 399 as-set mandatory, single-valued, class key 400 members list of optional, single-valued 401 members-by-referral list of optional, single-valued 403 Figure 8: as-set Class Attributes 405 Figure 9 presents two as-set objects. The set as-foo contains two ASes, 406 namely AS1 and AS2. The set as-bar contains the members of the set as-foo 407 and AS3, that is it contains AS1, AS2, AS3. 409 as-set: as-foo as-set: as-bar 410 members: AS1, AS2 members: AS3, as-foo 412 Figure 9: as-set objects. 414 The members-by-referral attribute is a list of maintainer names or the 415 keyword ANY. If this attribute is used, the AS set also includes those ASes 416 whose aut-num objects are registered by one of these maintainers and whose 417 member-of attribute refers to the name of this AS set. If the value of a 418 members-by-referral attribute is ANY, any AS object referring to the AS set 419 is a member of the set. If the members-by-referral attribute is missing, 420 only the ASes listed in the members attribute are members of the set. 422 as-set: as-foo 423 members: AS1, AS2 424 members-by-referral: MNTR-ME 426 aut-num: AS3 aut-num: AS4 427 member-of: as-foo member-of: as-foo 428 mnt-by: MNTR-ME mnt-by: MNTR-OTHER 430 Figure 10: as-set objects. 432 Figure 10 presents an example as-set object that uses the members-by- 433 referral attribute. The set as-foo contains AS1, AS2 and AS3. AS4 is not a 434 member of the set as-foo even though the aut-num object references as-foo. 435 This is because MNTR-OTHER is not listed in the as-foo's members-by-referral 436 attribute. 438 6.3 Predefined Set Objects 440 In a context that expects a route set (e.g. members attribute of the 441 route-set class), an AS number ASx defines the set of routes that are 442 originated by ASx; and an as-set AS-X defines the set of routes that are 443 originated by the ASes in AS-X. A route p is said to be originated by ASx if 444 there is a route object for p with ASx as the value of the origin attribute. 445 For example, in Figure 11, the route set rs-special contains 128.9.0.0/16, 446 routes of AS1 and AS2, and routes of the ASes in AS set AS-FOO. 448 route-set: rs-special 449 members: 128.9.0.0/16, AS1, AS2, AS-FOO 451 Figure 11: Use of AS numbers and AS sets in route sets. 453 The keyword rs-any defines the set of all routes registered in IRR. The 454 keyword as-any defines the set of all ASes registered in IRR. 456 6.4 Splitting the set name space 458 Set names can be hierarchical. A hierarchical set name is a sequence of set 459 names and AS numbers separated by colons ``:''. For example, the following 460 names are valid: AS1:AS-CUSTOMERS, AS1:RS-EXCEPTIONS, AS1:RS-EXPORT:AS2, 461 RS-EXCEPTIONS:RS-BOGUS. All set names in an hierarchical as-set name should 462 start with ``as-''; and all set names in an hierarchical route-set name 463 should start with ``rs-''. 465 A set object with name X1:...:Xn-1:Xn can only be created by the maintainer 466 of the object with name X1:...:Xn-1. That is, only the maintainer of AS1 467 can create a set with name AS1:AS-FOO; and only the maintainer of AS1:AS-FOO 468 can create a set with name AS1:AS-FOO:AS-BAR. 470 7 aut-num Class 472 ASes are specified using the aut-num class. The attributes of the aut-num 473 class are shown in Figure 12. The value of the aut-num attribute is the 474 AS number of the AS described by this object. The as-name attribute is 475 a symbolic name (in RPSL name syntax) of the AS. The import, export and 476 default routing policies of the AS are specified using as-in, as-out and 477 default attributes respectively. igp-to-egp and egp-to-igp attributes are 478 used to specify how routes are injected to and from the IGP protocol. 480 Attribute Value Type 481 aut-num mandatory, single-valued, class key 482 as-name mandatory, single-valued 483 member-of optional, single-valued 484 as-in see Section 7.1 optional, multi valued 485 as-out see Section 7.2 optional, multi valued 486 default see Section 7.3 optional, multi valued 487 igp-to-egp see Section 7.4 optional, multi valued 488 egp-to-igp see Section 7.4 optional, multi valued 490 Figure 12: aut-num Class Attributes 492 7.1 as-in Attribute: Import Policy Specification 494 ---------------------- ---------------------- 495 | 7.7.7.1 |-------| |-------| 7.7.7.2 | 496 | | ======== | | 497 | AS1 | EX1 |-------| 7.7.7.3 AS2 | 498 | | | | 499 | 9.9.9.1 |------ ------| 9.9.9.2 | 500 ---------------------- | | ---------------------- 501 =========== 502 | EX2 503 ---------------------- | 504 | 9.9.9.3 |--------- 505 | | 506 | AS3 | 507 ---------------------- 509 Figure 13: Example topology consisting of three ASes, AS1, AS2, and AS3; 510 two exchange points, EX1 and EX2; and six routers. 512 A typical interconnection of ASes is shown in Figure 13. In this example 513 topology, there are three ASes, AS1, AS2, and AS3; two exchange points, 514 EX1 and EX2; and six routers. Routers connected to the same exchange 515 point peer with each other, i.e. open a connection for exchanging routing 516 information. Each router would export a subset of the routes it has to its 517 peer routers. Peer routers would import a subset of these routes. A router 518 while importing routes would set some route attributes. For example, AS1 519 can assign higher preference values to the routes it imports from AS2 so 520 that it prefers AS2 over AS3. While exporting routes, a router may also 521 set some route attributes in order to affect route selection by its peers. 522 For example, AS2 may set the MULTI-EXIT-DISCRIMINATOR BGP attribute so that 523 AS1 prefers to use the router 9.9.9.2. Most interAS policies are specified 524 by specifying what route subsets can be imported or exported, and how the 525 various route attributes are set and used. 527 In RPSL, an import policy is divided into import policy expressions. Each 528 import policy expression is specified using an as-in attribute. The as-in 529 attribute has the following syntax: 531 as-in: from [action ] 532 . . . 533 from [action ] 534 accept 536 The action specification is optional. The semantics are as follows: the 537 set of routes that are matched by are imported in all the peerings 538 specified; while importing routes at is executed to 539 set the attributes. 541 E.g. 542 aut-num: AS1 543 as-in: from AS2 action pref = 1 accept { 128.9.0.0/16 } 545 This example states that the route 128.9.0.0/16 is accepted from AS2 with 546 preference 1. In the next few subsections, we will describe how peerings, 547 actions and filters are specified. 549 7.1.1 Peering Specification 551 Our example above used an AS number to specify peerings. The peerings 552 can be specified at different granularities. The syntax of a peering 553 specification is as follows: 555 [] [at ] 556 | [at ] 558 where and are IP addresses of routers, 559 is an AS number, and is an AS set name. must 560 be the AS number of . Both and 561 are optional. We first describe the semantics using the first form. 562 If both and are specified, this peering 563 specification identifies only the peering between these two routers. If 564 only is specified, this peering specification identifies 565 all the peerings between and any of its peer routers in 566 . If only is specified, this peering specification 567 identifies all the peerings between any router in the local AS and 568 . If neither nor is specified, 569 this peering specification identifies all the peerings between any router in 570 the local AS and any router in . If the form is used, the 571 peering specification identifies all the peerings between and 572 any of its peer routers in one of the ASes in . If 573 is not specified, the peering specification identifies all the peerings 574 between any router in the local AS and any of its peer routers in one of the 575 ASes in . 577 We next give examples. Consider the topology of Figure 13 where AS1 has 578 two routers 7.7.7.1 and 9.9.9.1; AS2 has three routers 7.7.7.2, 7.7.7.3 and 579 9.9.9.2; AS3 has one router 9.9.9.3. 7.7.7.1, 7.7.7.2 and 7.7.7.3 peer with 580 each other; 9.9.9.1, 9.9.9.2 and 9.9.9.3 peer with each other. In example 581 (1) below 7.7.7.1 imports 128.9.0.0/16 from 7.7.7.2. 583 (1) aut-num: AS1 584 as-in: from AS2 7.7.7.2 at 7.7.7.1 accept { 128.9.0.0/16 } 586 (2) aut-num: AS1 587 as-in: from AS2 at 7.7.7.1 accept { 128.9.0.0/16 } 589 (3) aut-num: AS1 590 as-in: from AS2 accept { 128.9.0.0/16 } 592 (4) as-set: AS-FOO 593 members: AS2, AS3 595 aut-num: AS1 596 as-in: from AS-FOO at 9.9.9.1 accept { 128.9.0.0/16 } 598 (5) aut-num: AS1 599 as-in: from AS-FOO accept { 128.9.0.0/16 } 601 (6) aut-num: AS1 602 as-in: from AS2 at 9.9.9.1 accept { 128.9.0.0/16 } 603 as-in: from AS3 at 9.9.9.1 accept { 128.9.0.0/16 } 605 (7) aut-num: AS1 606 as-in: from AS2 accept { 128.9.0.0/16 } 607 as-in: from AS3 accept { 128.9.0.0/16 } 609 In example (2), 7.7.7.1 imports 128.9.0.0/16 from 7.7.7.2 and 7.7.7.3. In 610 example (3), 7.7.7.1 imports 128.9.0.0/16 from 7.7.7.2 and 7.7.7.3, and 611 9.9.9.1 imports 128.9.0.0/16 from 9.9.9.2. In example (4), 9.9.9.1 imports 612 128.9.0.0/16 from 9.9.9.2 and 9.9.9.3. In example (5), 9.9.9.1 imports 613 128.9.0.0/16 from 9.9.9.2 and 9.9.9.3, and 7.7.7.1 imports 128.9.0.0/16 from 614 7.7.7.2 and 7.7.7.3. The example (4) and (5) are equivalent to examples (6) 615 and (7) respectively. 617 7.1.2 Action Specification 619 Policy actions in RPSL set or modify route attributes, such as assigning a 620 preference to a route, adding a community to the community attribute, or 621 setting the MULTI-EXIT-DISCRIMINATOR attribute. Policy actions can also 622 instruct routers to perform special operations, such as route flap damping. 623 The routing policy attributes whose values can be modified in policy actions 624 are specified in the RPSL dictionary. Please refer to Section 8 for 625 details. 627 It is possible to form composite policy actions by separating policy 628 actions with semicolons in which case the actions are executed in the order 629 specified (i.e. left to right). For example: 631 aut-num: AS1 632 as-in: from AS2 633 action pref = 10; med = 0; community .= 10250; 634 accept { 128.9.0.0/16 } 636 7.1.3 Filter Specification 638 A policy filter is a logical expression which when applied to a set of 639 routes returns a subset of these routes. We say that the policy filter 640 matches the subset returned. The policy filter can match routes using any 641 route attribute, such as the destination address prefix (or NLRI), AS-path, 642 or community attributes. 644 The following policy filters can be used to select a subset of routes: 646 ANY 647 The keyword ANY matches all routes. 649 Address-Prefix Set 650 This is an explicit list of address prefixes enclosed in braces '{' and 651 '}'. The policy filter matches the set of routes whose destination 652 address-prefix is in the set. For example: 654 { 0.0.0.0/0 } 655 { 128.9.0.0/16, 128.8.0.0/16, 128.7.128.0/17, 5.0.0.0/8 } 656 { } 658 An address prefix can be optionally followed by an operator '^-', '^+', 659 '^n', or '^n-m' where n and m are integers. ^- operator is the 660 exclusive more specifics operator; it stands for the more specifics of 661 the address prefix excluding the address prefix itself. ^+ operator is 662 the inclusive more specifics operator; it stands for the more specifics 663 of the address prefix including the address prefix itself. ^n operator, 664 stands for all the length n specifics of the address prefix. ^n-m 665 operator, stands for all the length n to length m specifics of the 666 address prefix. For example, the set 668 { 5.0.0.0/8^+, 128.9.0.0/16^-, 30.0.0.0/8^16, 30.0.0.0/8^24-32 } 670 contains all the more specifics of 5.0.0.0/8 including 5.0.0.0/8, all 671 the more specifics of 128.9.0.0/16 excluding 128.9.0.0/16, all the more 672 specifics of 30.0.0.0/8 which are of length 16 such as 30.9.0.0/16, and 673 all the more specifics of 30.0.0.0/8 which are of length 24 to 32 such 674 as 30.9.9.100/28. 676 Route Set Name 677 A route set name matches the set of routes that are members of the set. 678 A route set name may be a name of a route-set object, an AS number, or a 679 name of an as-set object (AS numbers and as-set names implicitly define 680 route sets; please see Section 6.3). For example: 682 aut-num: AS1 683 as-in: from AS2 action pref = 1 accept AS2 684 as-in: from AS2 action pref = 1 accept AS-FOO 685 as-in: from AS2 action pref = 1 accept RS-FOO 687 The keyword PeerAS can be used instead of the AS number of the peer AS. 688 PeerAS is particularly useful when the peering is specified using an AS 689 set. For example: 691 as-set: AS-FOO 692 members: AS2 AS3 694 aut-num: AS1 695 as-in: from AS-FOO action pref = 1 accept PeerAS 697 is same as: 699 aut-num: AS1 700 as-in: from AS2 action pref = 1 accept AS2 701 as-in: from AS3 action pref = 1 accept AS3 703 A route set name can also be followed by one of the operators '^-', 704 '^+', '^n' or '^n-m'. These operators are distributive over the route 705 sets. For example, { 5.0.0.0/8, 6.0.0.0/8 }^+ equals { 5.0.0.0/8^+, 706 6.0.0.0/8^+ }, and AS1^- equals all the exclusive more specifics of 707 routes originated by AS1. 709 AS Path Regular Expressions 710 An AS-path regular expression can be used as a policy filter by 711 enclosing the expression in `<' and `>'. An AS-path policy filter 712 matches the set of routes which traverses a sequence of ASes matched 713 by the AS-path regular expression. A router can check this using the 714 AS_PATH attribute in the Border Gateway Protocol [12], or the RD_PATH 715 attribute in the Inter-Domain Routing Protocol[11]. 717 AS-path Regular Expressions are POSIX compliant regular expressions over 718 the alphabet of AS numbers. The regular expression constructs are as 719 follows: 721 ASN where ASN is an AS number. ASN matches the AS-path that is 722 of length 1 and contains the corresponding AS number (e.g. 723 AS-path regular expression AS1 matches the AS-path ``1''). 725 The keyword PeerAS can be used instead of the AS number of 726 the peer AS. 728 AS-set where AS-set is an AS set name. AS-set matches the AS-paths 729 that is matched by one of the ASes in the AS-set. 731 . matches the AS-paths matched by any AS number. 733 [...] is an AS number set. It matches the AS-paths matched by the 734 AS numbers listed between the brackets. The AS numbers in 735 the set are separated by white space characters. If a `-' 736 is used between two AS numbers in this set, all AS numbers 737 between the two AS numbers are included in the set. If 738 an as-set name is listed, all AS numbers in the as-set are 739 included. 741 [^...] is a complemented AS number set. It matches any AS-path which 742 is not matched by the AS numbers in the set. 744 ^ Matches the empty string at the beginning of an AS-path. 746 $ Matches the empty string at the end of an AS-path. 748 We next list the regular expression operators in the decreasing order of 749 evaluation. These operators are left associative, i.e. performed left 750 to right. 752 Unary postfix operators * + ? 753 For a regular expression A, A* matches zero or more 754 occurrences of A; A+ matches one or more occurrences of A; 755 A? matches zero or one occurrence of A. 757 Binary catenation operator 758 This is an implicit operator and exists between two 759 regular expressions A and B when no other explicit 760 operator is specified. The resulting expression A B 761 matches an AS-path if A matches some prefix of the AS-path 762 and B matches the rest of the AS-path. 764 Binary alternative (or) operator | 765 For a regular expressions A and B, A | B matches any 766 AS-path that is matched by A or B. 768 Parenthesis can be used to override the default order of evaluation. 769 White spaces can be used to increase readability. 771 The following are examples of AS-path filters: 773 774 <^AS1> 775 776 <^AS1 AS2 AS3$> 777 <^AS1 .* AS2$>. 779 The first example matches any route whose AS-path contains AS3, the 780 second matches routes whose AS-path starts with AS1, the third matches 781 routes whose AS-path ends with AS2, the fourth matches routes whose 782 AS-path is exactly ``1 2 3'', and the fifth matches routes whose AS-path 783 starts with AS1 and ends in AS2 with any number of AS numbers in 784 between. 786 Composite Policy Filters 788 The following operators (in decreasing order of evaluation) can be used to 789 form composite policy filters: 791 NOT Given a policy filter x, NOT x matches the set of routes that are not 792 matched by x. That is it is the negation of policy filter x. 794 AND Given two policy filters x and y, x AND y matches the intersection of 795 the routes that are matched by x and that are matched by y. 797 OR Given two policy filters x and y, x OR y matches the union of the routes 798 that are matched by x and that are matched by y. 800 Note that an OR operator can be implicit, that is `x y' is equivalent to `x 801 OR y'. 803 E.g. 804 NOT {128.9.0.0/16, 128.8.0.0/16} 805 AS226 AS227 OR AS228 806 AS226 AND NOT {128.9.0.0/16} 807 AS226 AND {0.0.0.0/0^0-18} 809 The first example matches any route except 128.9.0.0/16 and 128.8.0.0/16. 810 The second example matches the routes of AS226, AS227 and AS228. The third 811 example matches the routes of AS226 except 128.9.0.0/16. The fourth example 812 matches the routes of AS226 whose length are shorter than 19. 814 Policy filters can also use the values of other attributes (e.g. the 815 community attribute) for comparison. The attributes whose values can be 816 used in policy filters are specified in the RPSL dictionary. Please refer 817 to Section 8 for details. 819 7.1.4 Example Policy Expressions 821 aut-num: AS1 822 as-in: from AS2 action pref = 1 823 from AS3 action pref = 2 824 accept AS4 826 The above example states that AS4's routes are accepted from AS2 with 827 preference 1, and from AS3 with preference 2 (routes with lower integer 828 preference values are preferred over routes with higher integer preference 829 values). 831 aut-num: AS1 832 as-in: from AS2 7.7.7.2 at 7.7.7.1 action pref = 1 833 from AS2 action pref = 2 834 accept AS4 836 The above example states that AS4's routes are accepted from AS2 on peering 837 7.7.7.1-7.7.7.2 with preference 1, and on any other peering with AS2 with 838 preference 2. 840 7.2 as-out Attribute: Export Policy Specification 842 Similarly, an export policy expression is specified using an as-out 843 attribute. The value of an as-out attribute has the following syntax: 845 as-out: to [action ] 846 . . . 847 to [action ] 848 announce 850 The action specification is optional. The semantics are as follows: the 851 set of routes that are matched by are exported in all the peerings 852 specified; while exporting routes at is executed to 853 set the attributes. 855 E.g. 856 aut-num: AS1 857 as-out: to AS2 action med = 5; community .= 70 858 announce AS4 860 In this example, AS4's routes are announced to AS2 with the med attribute's 861 value set to 5 and community 70 added to the community list. 863 Example: 865 aut-num: AS1 866 as-out: to AS-FOO announce ANY 868 In this example, AS1 announces all of its routes to the ASes in the set 869 AS-FOO. 871 7.3 default Attribute: Default Policy Specification 873 Default routing policies are specified using the default attribute. The 874 default attribute has the following syntax: 876 default: to [action ] [networks ] 878 The and specifications are optional. The semantics 879 are as follows: The specification indicates the AS (and the 880 router if present) is being defaulted to; the specification, 881 if present, indicates various attributes of defaulting, for example a 882 relative preference if multiple defaults are specified; and the 883 specifications, if present, is a policy filter. A router chooses a default 884 router from the routes in its routing table that matches this . 886 In the following example, AS1 defaults to AS2 for routing. 888 aut-num: AS1 889 default: to AS2 891 In the following example, router 7.7.7.1 in AS1 defaults to router 7.7.7.2 892 in AS2. 894 aut-num: AS1 895 default: to AS2 7.7.7.2 at 7.7.7.1 897 In the following example, AS1 defaults to AS2 and AS3, but prefers AS2 over 898 AS3. 900 aut-num: AS1 901 default: to AS2 action pref = 1 902 default: to AS3 action pref = 2 904 In the following example, AS1 defaults to AS2 and uses 128.9.0.0/16 as the 905 default network. 907 aut-num: AS1 908 default: to AS2 networks { 128.9.0.0/16 } 910 7.4 egp-to-igp and igp-to-egp Attributes: Injecting Routes 912 egp-to-igp attribute specifies how routes from an interAS routing protocol 913 are injected into an IGP protocol, and igp-to-egp attribute specifies how 914 IGP routes are injected into the interAS routing protocol. The syntax of 915 the egp-to-igp and igp-to-egp attributes are as follows: 917 egp-to-igp: [at ] into 918 [action ] inject 919 igp-to-egp: [at ] from 920 [action ] inject 922 where is an IP address of a router; is the IGP protocol 923 name (valid protocol names are defined in the dictionary); and and 924 are as in the as-in attribute. The semantics are that the router 925 injects the set of routes matched by to/from the IGP and 926 sets the route attributes according to the specified. If 927 is not specified, all routers in the AS perform the injection. 929 In the following example, all interAS routes are injected into RIP. 931 aut-num: AS1 932 as-in: from AS2 accept AS2 933 egp-to-igp: into RIP inject ANY 935 In the following example, AS1 accepts AS2's routes including more specifics, 936 but does not inject the more specifics into OSPF. 938 aut-num: AS1 939 as-in: from AS2 accept AS2^+ 940 egp-to-igp: into OSPF inject AS2 942 In the following example, AS1 injects its static routes (routes which are 943 members of the set AS1:RS-STATIC-ROUTES) to the interAS routing protocol and 944 appends AS1 twice to their as paths. 946 aut-num: AS1 947 igp-to-egp: from STATIC action aspath.prepend(AS1, AS1) 948 inject AS1:RS-STATIC-ROUTES 950 7.5 Ambiguity Resolution 952 It is possible that the same peering can be covered by more that one peering 953 specification in a policy expression. For example: 955 aut-num: AS1 956 as-in: from AS2 7.7.7.2 at 7.7.7.1 action pref = 2 957 from AS2 7.7.7.2 at 7.7.7.1 action pref = 1 958 accept AS4 960 This is not an error, though definitely not desirable. To break the 961 ambiguity, the action corresponding to the first peering specification is 962 used. That is the routes are accepted with preference 2. We call this rule 963 as the specification-order rule. 965 Consider the example: 967 aut-num: AS1 968 as-in: from AS2 action pref = 2 969 from AS2 7.7.7.2 at 7.7.7.1 action pref = 1; dpa = 5 970 accept AS4 972 where both peering specifications cover the peering 7.7.7.1-7.7.7.2, though 973 the second one covers it more specifically. The specification order rule 974 still applies, and only the action ``pref = 2'' is executed. In fact, the 975 second peering-action pair has no use since the first peering-action pair 976 always covers it. If the intended policy was to accept these routes with 977 preference 1 on this particular peering and with preference 2 in all other 978 peerings, the user should have specified: 980 aut-num: AS1 981 as-in: from AS2 7.7.7.2 at 7.7.7.1 action pref = 1; dpa = 5 982 from AS2 action pref = 2 983 accept AS4 985 It is also possible that more than one policy expression can cover the same 986 set of routes for the same peering. For example: 988 aut-num: AS1 989 as-in: from AS2 action pref = 2 accept AS4 990 as-in: from AS2 action pref = 1 accept AS4 992 In this case, the specification-order rule is still used. That is, AS4's 993 routes are accepted from AS2 with preference 2. If the filters were 994 overlapping but not exactly the same: 996 aut-num: AS1 997 as-in: from AS2 action pref = 2 accept AS4 998 as-in: from AS2 action pref = 1 accept AS4 OR AS5 1000 the AS4's routes are accepted from AS2 with preference 2 and however AS5's 1001 routes are also accepted, but with preference 1. 1003 We next give the general specification order rule for the benefit of the 1004 RPSL implementors. Consider two policy expressions: 1006 aut-num: AS1 1007 as-in: from peerings-1 action action-1 accept filter-1 1008 as-in: from peerings-2 action action-2 accept filter-2 1010 The above policy expressions are equivalent to the following three 1011 expressions where there is no overlap: 1013 aut-num: AS1 1014 as-in: from peerings-1 action action-1 accept filter-1 1015 as-in: from peerings-3 action action-2 accept filter-2 AND NOT filter-1 1016 as-in: from peerings-4 action action-2 accept filter-2 1018 where peerings-3 are those that are covered by both peerings-1 and 1019 peerings-2, and peerings-4 are those that are covered by peerings-2 but not 1020 by peerings-1 (``filter-2 AND NOT filter-1'' matches the routes that are 1021 matched by filter-2 but not by filter-1). 1023 Example: 1025 aut-num: AS1 1026 as-in: from AS2 7.7.7.2 at 7.7.7.1 1027 action pref = 2 1028 accept {128.9.0.0/16} 1029 as-in: from AS2 1030 action pref = 1 1031 accept {128.9.0.0/16, 75.0.0.0/8} 1033 Lets consider two peerings with AS2, 7.7.7.1-7.7.7.2 and 9.9.9.1-9.9.9.2. 1034 Both policy expressions cover 7.7.7.1-7.7.7.2. On this peering, the route 1035 128.9.0.0/16 is accepted with preference 2, and the route 75.0.0.0/8 is 1036 accepted with preference 1. The peering 9.9.9.1-9.9.9.2 is only covered by 1037 the second policy expressions. Hence, both the route 128.9.0.0/16 and the 1038 route 75.0.0.0/8 are accepted with preference 1 on peering 9.9.9.1-9.9.9.2. 1040 8 dictionary Class 1042 The dictionary class provides extensibility to RPSL. Dictionary objects 1043 define routing policy attributes, types, and routing protocols. Routing 1044 policy attributes, henceforth called rp-attributes, may correspond to actual 1045 protocol attributes, such as the BGP path attributes (e.g. community, dpa, 1046 and AS-path), or they may correspond to router features (e.g. BGP route flap 1047 damping). As new protocols, new protocol attributes, or new router features 1048 are introduced, the dictionary object is updated to include appropriate 1049 rp-attribute and protocol definitions. 1051 An rp-attribute is an abstract class; that is their data representation is 1052 not available. Instead, they are accessed through access methods. For 1053 example, an rp-attribute for the BGP AS-path attribute may have an access 1054 method called length which returns the length of the AS-path. Access 1055 methods can take arguments. Arguments are strongly typed. For example, an 1056 rp-attribute for the BGP AS-path attribute may have an access method called 1057 prepend which takes AS numbers as argument and prepends them to the BGP 1058 AS-path attribute. 1060 Once an rp-attribute is defined in the dictionary, it can be used to 1061 describe policy filters and actions. Policy analysis tools are required 1062 to fetch the dictionary object and recognize newly defined rp-attributes, 1063 types, and protocols. The analysis tools may approximate policy analyses 1064 on rp-attributes: a filter defining rp-attribute method may always match, 1065 and an action defining rp-attribute method may always perform no-operation. 1066 Analysis tools may even download code to perform appropriate operations. 1068 The attributes of the dictionary class are shown in Figure 14. The 1069 dictionary attribute is the name of the dictionary object, obeying the RPSL 1070 naming rules. There can be many dictionary objects, however there is always 1071 one well-known dictionary object ``RPSL''. All tools use this dictionary by 1072 default. 1074 Attribute Value Type 1075 dictionary mandatory, single-valued, class key 1076 rp-attribute see description in text optional, multi valued 1077 typedef see description in text optional, multi valued 1078 protocol see description in text optional, multi valued 1080 Figure 14: dictionary Class Attributes 1082 The rp-attribute attribute has the following syntax: 1084 rp-attribute: 1085 (, ..., [, "..."]) 1086 ... 1087 (, ..., [, "..."]) 1089 where is the name of the rp-attribute; and is the name of 1090 an access method for the rp-attribute, taking Ni arguments where the j-th 1091 argument is of type . A method name is either an RPSL name or one 1092 of the operators defined in Figure 15. The operator methods can take only 1093 one argument. 1095 operator= operator== 1096 operator<<= operator< 1097 operator>>= operator> 1098 operator+= operator>= 1099 operator-= operator<= 1100 operator*= 1101 operator/= 1102 operator.= 1104 Figure 15: Operators 1106 An rp-attribute can have many methods defined for it. Some of the methods 1107 may even have the same name, in which case their arguments are of different 1108 types. If the argument list is followed by ``...'', the method takes a 1109 variable number of arguments. In this case, the actual arguments after the 1110 Nth argument are of type . 1112 Arguments are strongly typed. A type of an argument can be one of the 1113 predefined types or one of the dictionary defined types. The predefined 1114 type names are listed in Figure 16. The integer and the real types can be 1115 followed by a lower and an upper bound to specify the set of valid values of 1116 the argument. The range specification is optional. We use the C language 1117 conventions for representing integer and real values. The enum type is 1118 followed by a list of RPSL names which are the valid values of the type. 1119 The boolean type can take the values true or false. as_number, ip_address, 1120 address_prefix and dns_name types are as in Section 2. filter type is a 1121 policy filter as in Section 7. 1123 integer[lower, upper] as_number 1124 real[lower, upper] ip_address 1125 enum[name, name, ...] address_prefix 1126 string dns_name 1127 boolean filter 1129 Figure 16: Predefined Types 1131 The typedef attribute specifies a dictionary defined type. Its syntax is as 1132 follows: 1134 typedef: ... 1136 where is the name of the type being defined and is another 1137 type name, either predefined or dictionary defined. The type defined by a 1138 typedef is either of the types 1 through N (analogous to unions in C[8]). 1140 A dictionary defined type can also be a list type, specified as: 1142 list [:] of 1144 where the list elements are of and the list contains at least 1145 and at most elements. The size specification is 1146 optional. In this case, there is no restriction in the number of list 1147 elements. A value of a list type is represented as a sequence of elements 1148 separated by the character ``,'' and enclosed by the characters ``{'' and 1149 ``}''. 1151 A protocol attribute of the dictionary class defines a protocol and a set 1152 of peering options for that protocol (which are used in inet-rtr class in 1153 Section 10). Its syntax is as follows: 1155 protocol: 1156 MANDATORY | OPTIONAL (, ..., [, "..."]) 1157 ... 1158 MANDATORY | OPTIONAL (, ..., [, "..."]) 1160 where is the name of the protocol; MANDATORY and OPTIONAL are 1161 keywords; and is a peering option for this protocol, taking Ni 1162 many arguments. The syntax and semantics of the arguments are as in the 1163 rp-attribute. If the keyword MANDATORY is used the option is mandatory and 1164 needs to be specified for each peering of this protocol. If the keyword 1165 OPTIONAL is used the option can be skipped. 1167 The Figure 18 shows the initial RPSL dictionary. It has eight 1168 rp-attributes: pref to assign local preference to the routes accepted; 1169 med to assign a value to the MULTI_EXIT_DISCRIMINATOR BGP attribute; dpa to 1170 assign a value to the DPA BGP attribute; aspath to prepend a value to the 1171 AS_PATH BGP attribute; community to assign a value to or to check the value 1172 of the community BGP attribute; flap_damp to enable or disable routing flap 1173 damping feature of the routers; next-hop to assign next hop routers to 1174 static routes; and cost to assign a cost to static routes. The dictionary 1175 defines two types: community_elm and community_list. community_elm type 1176 is either a 4-byte unsigned integer, or one of the keywords no_export or 1177 no_advertise, or a list of two 2-byte unsigned integers in which case the 1178 two integers are concatenated to form a 4-byte integer. (The last form is 1179 often used in the Internet to partition the community space. A provider 1180 uses its AS number as the first two bytes, and assigns a semantics of its 1181 dictionary: RPSL 1182 rp-attribute: pref # preference, smaller values represent higher preferences 1183 operator=(integer[0, 65535]) # assign an integer 1184 rp-attribute: med # BGP multi_exit_discriminator attribute 1185 operator=(integer[0, 65535]) # assign an integer 1186 operator=(enum[igp_cost]) # assign the IGP metric 1187 rp-attribute: dpa # BGP destination preference attribute (dpa) 1188 operator=(integer[0 65535]) # assign an integer 1189 rp-attribute: aspath # BGP aspath attribute 1190 prepend(as_number, ...) # prepend the AS numbers 1191 # from last to first order 1192 typedef: community_elm # needed for the community attribute 1193 integer(0, 4294967000), # 4 byte community value 1194 enum[no_export, no_advertise]# defined in RFC 1997 1195 list[2:2] of integer[0 65535] # construct a 4 byte integer 1196 # by concating two 2-byte integers 1197 typedef: community_list # needed for the community attribute 1198 list of community_elm 1199 rp-attribute: community # BGP community attribute 1200 operator=(community_list) # assign a list of communities 1201 operator==(community_list) # true if equals the argument 1202 # order independent comparison 1203 operator.=(community_elm) # append an element 1204 append(community_elm) # same as .= 1205 remove(community_elm) # delete an element 1206 contains(community_elm) # true if element is contained 1207 rp-attribute: flap_damp # flap_damping router feature 1208 enable() # enable flap_damping 1209 disable() # disable flap_damping 1210 rp-attribute: next-hop # next hop router in a static route 1211 operator=(ip_address) # assign a router address 1212 rp-attribute: cost # cost of a static route 1213 operator=(integer[0, 65535]) # assign an integer 1215 Figure 17: RPSL Dictionary (cont.) 1217 choice to the last two bytes.) 1219 The initial dictionary (Figure 18) defines only options for the Border 1220 Gateway Protocol: asno and flap_damp. The mandatory asno option is the AS 1221 number of the peer router. The optional flap_damp option instructs the 1222 router to damp route flaps when importing routes from the peer router. 1224 protocol: BGP # Border Gateway Protocol 1225 MANDATORY asno(as_number) # as number of the peer router 1226 OPTIONAL flap_damp() # enable flap damping 1227 protocol: OSPF 1228 protocol: RIP 1229 protocol: IGRP 1230 protocol: IS-IS 1231 protocol: STATIC 1233 Figure 18: RPSL Dictionary 1235 8.1 Policy Actions and Filters Using RP-Attributes 1237 The syntax of a policy action or a filter using an rp-attribute x is as 1238 follows: 1240 x.method(arguments) 1241 x ``op'' argument 1243 where method is a method and ``op'' is an operator method of the 1244 rp-attribute x. 1246 The pref rp-attribute can be assigned a positive integer as follows: 1248 pref = 10 1250 The med rp-attribute can be assigned either a positive integer or the word 1251 ``igp_cost'' as follows: 1253 med = 0 1254 med = igp_cost 1256 The dpa rp-attribute can be assigned a positive integer as follows: 1258 dpa = 100 1260 The BGP community attribute is list-valued, that is it is a list of 1261 4-byte integers each representing a ``community''. The following examples 1262 demonstrate how to add communities to this rp-attribute: 1264 community .= 100 1265 community .= NO_EXPORT 1266 community .= {3561, 10} 1268 In the last case, a 4-byte integer is constructed where the more significant 1269 two bytes equal 3561 and the less significant two bytes equal 10. The 1270 following examples demonstrate how to delete communities from the community 1271 rp-attribute: 1273 community.delete(100) 1274 community.delete(NO_EXPORT) 1275 community.delete({3561, 10}) 1277 Filters that use the community rp-attribute can be defined as demonstrated 1278 by the following examples: 1280 community.contains(100) 1281 community.contains(NO_EXPORT) 1282 community.contains({3561, 10}) 1284 The community rp-attribute can be set to a list of communities as follows: 1286 community = {100, NO_EXPORT, {3561, 10}, 200} 1287 community = {} 1289 In this first case, the community rp-attribute contains the communities 1290 100, NO_EXPORT, {3561, 10}, and 200. In the latter case, the community 1291 rp-attribute is cleared. The community rp-attribute can be compared against 1292 a list of communities as follows: 1294 community == {100, 200} 1295 community == {} 1297 To influence the route selection, the BGP as_path rp-attribute can be made 1298 longer by prepending AS numbers to it as follows: 1300 aspath.prepend(AS1) 1301 aspath.prepend(AS1, AS1, AS1) 1303 Flap damping can be turned on or off as follows: 1305 flap_damp.enable() 1306 flap_damp.disable() 1308 The following examples are invalid: 1310 med = -50 # -50 is not in the range 1311 med = igp # igp is not one of the enum values 1312 med.assign(10) # method assign is not defined 1313 community.append({AS3561, 20}) # the first argument should be 3561 1315 Figure 19 shows a more advanced example using the rp-attribute community. 1316 In this example, AS3561 bases its route selection preference on the 1317 community attribute. Other ASes may indirectly affect AS3561's route 1318 selection by including the appropriate communities in their route 1319 announcements. 1321 aut-num: AS1 1322 as-out: to AS2 action community.={3651, 10} 1323 to AS3 action community.={3651, 20} 1324 announce AS1 1326 as-set: AS3561:AS-PEERS 1327 members: AS2, AS3 1329 aut-num: AS3561 1330 as-in: from AS3561:AS-PEERS 1331 action pref = 10 1332 accept community.contains({3651, 10}) 1333 as-in: from AS3561:AS-PEERS 1334 action pref = 20 1335 accept community.contains({3651, 20}) 1336 as-in: from AS3561:AS-PEERS 1337 action pref = 30 1338 accept ANY 1340 Figure 19: Policy example using the community rp-attribute. 1342 9 Advanced route Class 1344 9.1 Specifying Static Routes 1346 The attribute inject-at can be used to specify static routes. Its syntax is 1347 as follows: 1349 inject-at: [action ] 1351 where is an IP address of a router and is as in the 1352 aut-num class. executes the and injects the route to the 1353 interAS routing system. may set certain route attributes such as a 1354 next-hop router or a cost. 1356 In the following example, the router 7.7.7.1 injects the route 128.7.0.0/16. 1357 The next-hop router for this route is 7.7.7.2 and the route has a cost of 1358 10. 1360 route: 128.7.0.0/16 1361 origin: AS1 1362 inject-at: 7.7.7.1 action next-hop = 7.7.7.2; cost = 10; 1364 9.2 Specifying Aggregate Routes 1366 The attributes aggregate-by, inject-at, export-components, and holes are 1367 used for specifying aggregate routes [6]. 1369 The aggregate-by attribute defines what component routes are used to form 1370 the aggregate. Its syntax is as follows: 1372 aggregate-by: [atomic] 1374 A router in the origin AS forms the aggregate route if there is at least one 1375 route in its routing table that matches . If the keyword ATOMIC 1376 is specified, the aggregation is done atomically, otherwise the BGP path 1377 attributes of the matching routes are used to form the BGP path attributes 1378 of the aggregate route. For example, if atomic aggregation is done, the 1379 aggregate route would have an AS-path that starts from the aggregating 1380 AS [6]. Otherwise, the aggregate route would have an AS-path containing 1381 AS-sets formed from the AS-paths of the matching routes. 1383 Figure 20 shows some example aggregate route objects. The aggregate 1384 128.9.0.0/16 is generated if there is a route that matches the filter 1385 ``128.9.0.0/16^- AND <^AS226>'' (this filter matches more specifics of 1386 128.9.0.0/16 that are received form AS226). The BGP path attributes of 1387 the matching routes are used to form the BGP path attributes of the 1388 route 128.9.0.0/16. Similarly, the aggregate 128.8.0.0/16 is generated if 1389 there is a route that matches the filter ``128.8.0.0/16^- AND <^AS226>''. 1390 However, its path attributes are generated using the atomic aggregation 1391 rules [6]. The aggregate 128.7.0.0/16 is always and atomically generated 1392 since the policy filter ``ANY'' matches any route in the routing table. 1394 route: 128.9.0.0/16 1395 origin: AS1 1396 aggregate-by: {128.9.0.0/16^-} AND <^AS226> 1398 route: 128.8.0.0/16 1399 origin: AS1 1400 aggregate-by: ATOMIC {128.8.0.0/16^-} AND <^AS226> 1402 route: 128.7.0.0/16 1403 origin: AS1 1404 aggregate-by: ATOMIC ANY 1405 inject-at: 7.7.7.1 1406 inject-at: 9.9.9.1 1407 export-components: {128.7.9.0/24} 1409 Figure 20: Aggregate route objects. 1411 The inject-at attribute lists the routers in the originating AS that inject 1412 this route to the interAS routing system. That is, these routers are 1413 configured to perform the aggregation. If the inject-at attribute is 1414 missing, all routers in the originating AS perform the aggregation. The 1415 route 128.7.0.0/16 in Figure 20 is injected by routers 7.7.7.1 and 9.9.9.1 1416 in AS1. 1418 When a set of routes are aggregated, the intent is to export only the 1419 aggregate route and suppress the exporting of the component routes to the 1420 outside world. However, to satisfy certain policy and topology constraints 1421 (e.g. a multi-homed component), it is often required to export some of the 1422 components. The export-components attribute equals an RPSL filter that 1423 matches the routes that need to be exported to the neighboring ASes. If 1424 this attribute is missing, no component route needs to be exported to the 1425 neighboring ASes. The export-components attribute can only be specified if 1426 an aggregate-by attribute is specified for the route object. The component 1427 128.7.9.0/24 of route 128.7.0.0/16 in Figure 20 needs to be exported to 1428 other ASes. 1430 The holes attribute lists the component address prefixes which are not 1431 reachable through the aggregate route (perhaps that part of the address 1432 space is unallocated). Figure 21 shows a route object whose two components, 1433 namely 128.9.0.0/16 and 128.7.0.0/16, are not reachable via the aggregate. 1434 That is, if a data packet destined to a host in 128.9.0.0/16 is sent to AS1, 1435 AS1 can not deliver it to its final destination (i.e. it is black-holed). 1437 route: 128.9.0.0/12 1438 origin: AS1 1439 aggregate-by: {128.9.0.0/12^-} 1440 holes: 128.7.0.0/16, 128.9.0.0/16 1442 Figure 21: The route 128.9.0.0/12 does not lead to destinations in 1443 128.9.0.0/16. 1445 10 inet-rtr Class 1447 Routers are specified using the inet-rtr class. The attributes of the 1448 inet-rtr class are shown in Figure 22. The inet-rtr attribute is a valid 1449 DNS name of the router described. Each alias attribute, if present, is a 1450 canonical DNS name for the router. The value of an ifaddr attribute is an 1451 IP address followed by the word ``masklen'' and followed by an integer. The 1452 local-as attribute specifies the AS number of the AS which owns/operates 1453 this router. 1455 Attribute Value Type 1456 inet-rtr mandatory, single-valued, class key 1457 alias optional, multi-valued 1458 local-as mandatory, single-valued 1459 ifaddr masklen mandatory, multi-valued 1460 peer see description in text optional, multi-valued 1462 Figure 22: inet-rtr Class Attributes 1464 Figure 23 presents an example inet-rtr object. The name of the router is 1465 ``amsterdam.ripe.net''. ``amsterdam1.ripe.net'' is a canonical name for the 1466 router. The router is connected to 4 networks. Its IP addresses and mask 1467 lengths in those networks are specified in the ifaddr attributes. 1469 Each peer attribute, if present, specifies a protocol peering with another 1470 router. The value of a peer attribute is a protocol name followed by the 1471 IP address of the peer router and followed by a comma separated list of 1472 peering options for that protocol. Possible protocol names and attributes 1473 are defined in the dictionary (please see Section 8). In the above example, 1474 the router has a BGP peering with the router 192.87.45.195 in AS3334 and 1475 turns the flap damping on when importing routes from this router. 1477 inet-rtr: Amsterdam.ripe.net 1478 alias: amsterdam1.ripe.net 1479 localas: AS3333 1480 ifaddr: 192.87.45.190 masklen 24 1481 ifaddr: 192.87.4.28 masklen 24 1482 ifaddr: 193.0.0.222 masklen 27 1483 ifaddr: 193.0.0.158 masklen 27 1484 peer: BGP 192.87.45.195 asno(AS3334), flap_damp() 1486 Figure 23: inet-rtr Objects 1488 11 Acknowledgements 1490 We would like to thank Jessica Yu, Randy Bush, Alan Barrett, David Meyer, 1491 David Kessens, Bill Manning, Sue Hares, Ramesh Govindan, Kannan Varadhan, 1492 Satish Kumar, Craig Labovitz, Rusty Eddy, David J. LeRoy, David Whipple, 1493 Jon Postel, Deborah Estrin, and Elliot Schwartz for various comments and 1494 suggestions. 1496 References 1498 [1] How to register in RADB. http://www.ra.net/RADB.tools.docs/. 1500 [2] C. Alaettinouglu. Application of Routing Policy Specification Language 1501 (RPSL) on the Internet. Internet draft, USC Information Sciences 1502 Institute. Work in progress. 1504 [3] T. Bates, E. Gerich, L. Joncheray, J-M. Jouanigot, D. Karrenberg, 1505 M. Terpstra, and J. Yu. Representation of IP Routing Policies 1506 in a Routing Registry. Technical Report ripe-181, RIPE, RIPE NCC, 1507 Amsterdam, Netherlands, October 1994. 1509 [4] T. Bates, J-M. Jouanigot, D. Karrenberg, P. Lothberg, and M. Terpstra. 1510 Representation of IP Routing Policies in the RIPE Database. Technical 1511 Report ripe-81, RIPE, RIPE NCC, Amsterdam, Netherlands, February 1993. 1513 [5] D. Crocker. Standard for the format of ARPA Internet text messages. 1514 Request for Comment RFC-822, Network Information Center, August 1982. 1516 [6] V. Fuller, T. Li, J. Yu, and K. Varadhan. Classless Inter-Domain 1517 Routing (CIDR): an Address Assignment and Aggregation Strategy, 1993. 1519 [7] D. Karrenberg and M. Terpstra. Authorisation and Notification of 1520 Changes in the RIPE Database. Technical Report ripe-120, RIPE, RIPE 1521 NCC, Amsterdam, Netherlands, October 1994. 1523 [8] B. W. Kernighan and D. M. Ritchie. The C Programming Language. 1524 Prentice-Hall, 1978. 1526 [9] A. Lord and M. Terpstra. RIPE Database Template for Networks 1527 and Persons. Technical Report ripe-119, RIPE, RIPE NCC, Amsterdam, 1528 Netherlands, October 1994. 1530 [10] P. V. Mockapetris. Domain names - concepts and facilities. Request for 1531 Comment RFC-1034, Network Information Center, November 1987. 1533 [11] Y. Rekhter. Inter-Domain Routing Protocol (IDRP). Journal of 1534 Internetworking Research and Experience, 4:61--80, 1993. 1536 [12] Y. Rekhter and T. Li. A Border Gateway Protocol 4 (BGP-4). Request for 1537 Comment RFC-1654, Network Information Center, July 1994. 1539 A Routing Registry Sites 1541 The set of routing registries as of November 1996 are RIPE, RADB, CANet, MCI 1542 and ANS. You may contact one of these registries to find out the current 1543 list of registries.