· 5 years ago · Jul 10, 2020, 01:22 PM
1
2
3
4
5
6
7Network Working Group C. Alaettinoglu
8Request for Comments: 2622 USC/Information Sciences Institute
9Obsoletes: 2280 C. Villamizar
10Category: Standards Track Avici Systems
11 E. Gerich
12 At Home Network
13 D. Kessens
14 Qwest Communications
15 D. Meyer
16 University of Oregon
17 T. Bates
18 Cisco Systems
19 D. Karrenberg
20 RIPE NCC
21 M. Terpstra
22 Bay Networks
23 June 1999
24
25
26 Routing Policy Specification Language (RPSL)
27
28Status of this Memo
29
30 This document specifies an Internet standards track protocol for the
31 Internet community, and requests discussion and suggestions for
32 improvements. Please refer to the current edition of the "Internet
33 Official Protocol Standards" (STD 1) for the standardization state
34 and status of this protocol. Distribution of this memo is unlimited.
35
36Copyright Notice
37
38 Copyright (C) The Internet Society (1999). All Rights Reserved.
39
40Abstract
41
42 RPSL allows a network operator to be able to specify routing policies
43 at various levels in the Internet hierarchy; for example at the
44 Autonomous System (AS) level. At the same time, policies can be
45 specified with sufficient detail in RPSL so that low level router
46 configurations can be generated from them. RPSL is extensible; new
47 routing protocols and new protocol features can be introduced at any
48 time.
49
50
51
52
53
54
55
56
57
58Alaettinoglu, et al. Standards Track [Page 1]
59
60RFC 2622 RPSL June 1999
61
62
63Table of Contents
64
65 1 Introduction 3
66 2 RPSL Names, Reserved Words, and Representation 4
67 3 Contact Information 7
68 3.1 mntner Class . . . . . . . . . . . . . . . . . . . . . . . . 7
69 3.2 person Class . . . . . . . . . . . . . . . . . . . . . . . . 10
70 3.3 role Class . . . . . . . . . . . . . . . . . . . . . . . . . 11
71 4 route Class 12
72 5 Set Classes 13
73 5.1 as-set Class . . . . . . . . . . . . . . . . . . . . . . . . 14
74 5.2 route-set Class. . . . . . . . . . . . . . . . . . . . . . . 15
75 5.3 Predefined Set Objects . . . . . . . . . . . . . . . . . . . 17
76 5.4 Filters and filter-set Class . . . . . . . . . . . . . . . . 17
77 5.5 rtr-set Class. . . . . . . . . . . . . . . . . . . . . . . . 22
78 5.6 Peerings and peering-set Class . . . . . . . . . . . . . . . 24
79 6 aut-num Class 27
80 6.1 import Attribute: Import Policy Specification . . . . . . . 27
81 6.1.1 Action Specification . . . . . . . . . . . . . . . . . . 28
82 6.2 export Attribute: Export Policy Specification . . . . . . . 29
83 6.3 Other Routing Protocols, Multi-Protocol Routing Protocols,
84 and Injecting Routes Between Protocols . . . . . . . . . . . . 29
85 6.4 Ambiguity Resolution . . . . . . . . . . . . . . . . . . . . 31
86 6.5 default Attribute: Default Policy Specification . . . . . . 33
87 6.6 Structured Policy Specification. . . . . . . . . . . . . . . 33
88 7 dictionary Class 37
89 7.1 Initial RPSL Dictionary and Example Policy Actions and
90 Filters. . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
91 8 Advanced route Class 45
92 8.1 Specifying Aggregate Routes. . . . . . . . . . . . . . . . . 45
93 8.1.1Interaction with policies in aut-num class. . . . . . . . 49
94 8.1.2Ambiguity resolution with overlapping aggregates. . . . . 50
95 8.2 Specifying Static Routes . . . . . . . . . . . . . . . . . . 52
96 9 inet-rtr Class 52
97 10 Extending RPSL 54
98 10.1 Extensions by changing the dictionary class . . . . . . . . 54
99 10.2 Extensions by adding new attributes to existing classes . . 55
100 10.3 Extensions by adding new classes . . . . . . . . . . . . . 55
101 10.4 Extensions by changing the syntax of existing RPSL
102 attributes. . . . . . . . . . . . . . . . . . . . . . . . . . 55
103 11 Security Considerations 56
104 12 Acknowledgements 56
105 References 56
106 A Routing Registry Sites 59
107 B Grammar Rules 59
108 C Changes from RFC 2280 67
109 D Authors' Addresses 68
110 Full Copyright Statement 69
111
112
113
114Alaettinoglu, et al. Standards Track [Page 2]
115
116RFC 2622 RPSL June 1999
117
118
1191 Introduction
120
121 This memo is the reference document for the Routing Policy
122 Specification Language (RPSL). RPSL allows a network operator to be
123 able to specify routing policies at various levels in the Internet
124 hierarchy; for example at the Autonomous System (AS) level. At the
125 same time, policies can be specified with sufficient detail in RPSL
126 so that low level router configurations can be generated from them.
127 RPSL is extensible; new routing protocols and new protocol features
128 can be introduced at any time.
129
130 RPSL is a replacement for the current Internet policy specification
131 language known as RIPE-181 [6] or RFC-1786 [7]. RIPE-81 [8] was the
132 first language deployed in the Internet for specifying routing
133 policies. It was later replaced by RIPE-181 [6]. Through
134 operational use of RIPE-181 it has become apparent that certain
135 policies cannot be specified and a need for an enhanced and more
136 generalized language is needed. RPSL addresses RIPE-181's
137 limitations.
138
139 RPSL was designed so that a view of the global routing policy can be
140 contained in a single cooperatively maintained distributed database
141 to improve the integrity of Internet's routing. RPSL is not designed
142 to be a router configuration language. RPSL is designed so that
143 router configurations can be generated from the description of the
144 policy for one autonomous system (aut-num class) combined with the
145 description of a router (inet-rtr class), mainly providing router ID,
146 autonomous system number of the router, interfaces and peers of the
147 router, and combined with a global database mappings from AS sets to
148 ASes (as-set class), and from origin ASes and route sets to route
149 prefixes (route and route-set classes). The accurate population of
150 the RPSL database can help contribute toward such goals as router
151 configurations that protect against accidental (or malicious)
152 distribution of inaccurate routing information, verification of
153 Internet's routing, and aggregation boundaries beyond a single AS.
154
155 RPSL is object oriented; that is, objects contain pieces of policy
156 and administrative information. These objects are registered in the
157 Internet Routing Registry (IRR) by the authorized organizations. The
158 registration process is beyond the scope of this document. Please
159 refer to [1, 17, 4] for more details on the IRR.
160
161 In the following sections, we present the classes that are used to
162 define various policy and administrative objects. The "mntner" class
163 defines entities authorized to add, delete and modify a set of
164 objects. The "person" and "role" classes describes technical and
165 administrative contact personnel. Autonomous systems (ASes) are
166 specified using the "aut-num" class. Routes are specified using the
167
168
169
170Alaettinoglu, et al. Standards Track [Page 3]
171
172RFC 2622 RPSL June 1999
173
174
175 "route" class. Sets of objects can be defined using the "as-set",
176 "route-set", "filter-set", "peering-set", and "rtr-set" classes. The
177 "dictionary" class provides the extensibility to the language. The
178 "inet-rtr" class is used to specify routers. Many of these classes
179 were originally defined in earlier documents [6, 13, 16, 12, 5] and
180 have all been enhanced.
181
182 This document is self-contained. However, the reader is encouraged
183 to read RIPE-181 [7] and the associated documents [13, 16, 12, 5] as
184 they provide significant background as to the motivation and
185 underlying principles behind RIPE-181 and consequently, RPSL. For a
186 tutorial on RPSL, the reader should read the RPSL applications
187 document [4].
188
1892 RPSL Names, Reserved Words, and Representation
190
191 Each class has a set of attributes which store a piece of information
192 about the objects of the class. Attributes can be mandatory or
193 optional: A mandatory attribute has to be defined for all objects of
194 the class; optional attributes can be skipped. Attributes can also
195 be single or multiple valued. Each object is uniquely identified by
196 a set of attributes, referred to as the class "key".
197
198 The value of an attribute has a type. The following types are most
199 widely used. Note that RPSL is case insensitive and only the
200 characters from the ASCII character set can be used.
201
202 <object-name>
203 Many objects in RPSL have a name. An <object-name> is made up of
204 letters, digits, the character underscore "_", and the character
205 hyphen "-"; the first character of a name must be a letter, and
206 the last character of a name must be a letter or a digit. The
207 following words are reserved by RPSL, and they can not be used as
208 names:
209
210 any as-any rs-any peeras
211 and or not
212 atomic from to at action accept announce except refine
213 networks into inbound outbound
214
215 Names starting with certain prefixes are reserved for certain
216 object types. Names starting with "as-" are reserved for as set
217 names. Names starting with "rs-" are reserved for route set
218 names. Names starting with "rtrs-" are reserved for router set
219 names. Names starting with "fltr-" are reserved for filter set
220 names. Names starting with "prng-" are reserved for peering set
221 names.
222
223
224
225
226Alaettinoglu, et al. Standards Track [Page 4]
227
228RFC 2622 RPSL June 1999
229
230
231 <as-number> An AS number x is represented as the string "ASx". That
232 is, the AS 226 is represented as AS226.
233
234 <ipv4-address> An IPv4 address is represented as a sequence of four
235 integers in the range from 0 to 255 separated by the character dot
236 ".". For example, 128.9.128.5 represents a valid IPv4 address.
237 In the rest of this document, we may refer to IPv4 addresses as IP
238 addresses.
239
240 <address-prefix> An address prefix is represented as an IPv4 address
241 followed by the character slash "/" followed by an integer in the
242 range from 0 to 32. The following are valid address prefixes:
243 128.9.128.5/32, 128.9.0.0/16, 0.0.0.0/0; and the following address
244 prefixes are invalid: 0/0, 128.9/16 since 0 or 128.9 are not
245 strings containing four integers.
246
247 <address-prefix-range> An address prefix range is an address prefix
248 followed by an optional range operator. The range operators are:
249
250 ^- is the exclusive more specifics operator; it stands for the more
251 specifics of the address prefix excluding the address prefix
252 itself. For example, 128.9.0.0/16^- contains all the more
253 specifics of 128.9.0.0/16 excluding 128.9.0.0/16.
254
255 ^+ is the inclusive more specifics operator; it stands for the more
256 specifics of the address prefix including the address prefix
257 itself. For example, 5.0.0.0/8^+ contains all the more specifics
258 of 5.0.0.0/8 including 5.0.0.0/8.
259
260 ^n where n is an integer, stands for all the length n specifics of
261 the address prefix. For example, 30.0.0.0/8^16 contains all the
262 more specifics of 30.0.0.0/8 which are of length 16 such as
263 30.9.0.0/16.
264
265 ^n-m where n and m are integers, stands for all the length n to
266 length m specifics of the address prefix. For example,
267 30.0.0.0/8^24-32 contains all the more specifics of 30.0.0.0/8
268 which are of length 24 to 32 such as 30.9.9.96/28.
269
270 Range operators can also be applied to address prefix sets. In this
271 case, they distribute over the members of the set. For example, for
272 a route-set (defined later) rs-foo, rs-foo^+ contains all the
273 inclusive more specifics of all the prefixes in rs-foo.
274
275 It is an error to follow a range operator with another one (e.g.
276 30.0.0.0/8^24-28^+ is an error). However, a range operator can be
277 applied to an address prefix set that has address prefix ranges in it
278 (e.g. {30.0.0.0/8^24-28}^27-30 is not an error). In this case, the
279
280
281
282Alaettinoglu, et al. Standards Track [Page 5]
283
284RFC 2622 RPSL June 1999
285
286
287 outer operator ^n-m distributes over the inner operator ^k-l and
288 becomes the operator ^max(n,k)-m if m is greater than or equal to
289 max(n,k), or otherwise, the prefix is deleted from the set. Note
290 that the operator ^n is equivalent to ^n-n; prefix/l^+ is equivalent
291 to prefix/l^l-32; prefix/l^- is equivalent to prefix/l^(l+1)-32;
292 {prefix/l^n-m}^+ is equivalent to {prefix/l^n-32}; and {prefix/l^n-
293 m}^- is equivalent to {prefix/l^(n+1)-32}. For example,
294
295 {128.9.0.0/16^+}^- == {128.9.0.0/16^-}
296 {128.9.0.0/16^-}^+ == {128.9.0.0/16^-}
297 {128.9.0.0/16^17}^24 == {128.9.0.0/16^24}
298 {128.9.0.0/16^20-24}^26-28 == {128.9.0.0/16^26-28}
299 {128.9.0.0/16^20-24}^22-28 == {128.9.0.0/16^22-28}
300 {128.9.0.0/16^20-24}^18-28 == {128.9.0.0/16^20-28}
301 {128.9.0.0/16^20-24}^18-22 == {128.9.0.0/16^20-22}
302 {128.9.0.0/16^20-24}^18-19 == {}
303
304 <date>
305 A date is represented as an eight digit integer of the form
306 YYYYMMDD where YYYY represents the year, MM represents the month
307 of the year (01 through 12), and DD represents the day of the
308 month (01 through 31). All dates are in UTC unless otherwise
309 specified. For example, June 24, 1996 is represented as 19960624.
310
311 <email-address>is as described in RFC-822 [10].
312
313 <dns-name>is as described in RFC-1034 [17].
314
315 <nic-handle> is a uniquely assigned identifier word used by routing,
316 address allocation, and other registries to unambiguously refer to
317 contact information. Person and role classes map NIC handles to
318 actual person names, and contact information.
319
320 <free-form>is a sequence of ASCII characters.
321
322 <X-name> is a name of an object of type X. That is <mntner-name> is a
323 name of a mntner object.
324
325 <registry-name> is a name of an IRR registry. The routing registries
326 are listed in Appendix A.
327
328 A value of an attribute may also be a list of one of these types. A
329 list is represented by separating the list members by commas ",".
330 For example, "AS1, AS2, AS3, AS4" is a list of AS numbers. Note that
331 being list valued and being multiple valued are orthogonal. A
332 multiple valued attribute has more than one value, each of which may
333 or may not be a list. On the other hand a single valued attribute
334 may have a list value.
335
336
337
338Alaettinoglu, et al. Standards Track [Page 6]
339
340RFC 2622 RPSL June 1999
341
342
343 An RPSL object is textually represented as a list of attribute-value
344 pairs. Each attribute-value pair is written on a separate line. The
345 attribute name starts at column 0, followed by character ":" and
346 followed by the value of the attribute. The attribute which has the
347 same name as the object's class should be specified first. The
348 object's representation ends when a blank line is encountered. An
349 attribute's value can be split over multiple lines, by having a
350 space, a tab or a plus ('+') character as the first character of the
351 continuation lines. The character "+" for line continuation allows
352 attribute values to contain blank lines. More spaces may optionally
353 be used after the continuation character to increase readability.
354 The order of attribute-value pairs is significant.
355
356 An object's description may contain comments. A comment can be
357 anywhere in an object's definition, it starts at the first "#"
358 character on a line and ends at the first end-of-line character.
359 White space characters can be used to improve readability.
360
361 An integer can be specified using (1) the C programming language
362 notation (e.g. 1, 12345); (2) sequence of four 1-octet integers (in
363 the range from 0 to 255) separated by the character dot "." (e.g.
364 1.1.1.1, 255.255.0.0), in this case a 4-octet integer is formed by
365 concatenating these 1-octet integers in the most significant to least
366 significant order; (3) sequence of two 2-octet integers (in the range
367 from 0 to 65535) separated by the character colon ":" (e.g. 3561:70,
368 3582:10), in this case a 4-octet integer is formed by concatenating
369 these 2-octet integers in the most significant to least significant
370 order.
371
3723 Contact Information
373
374 The mntner, person and role classes, admin-c, tech-c, mnt-by,
375 changed, and source attributes of all classes describe contact
376 information. The mntner class also specifies authenticaiton
377 information required to create, delete and update other objects.
378 These classes do not specify routing policies and each registry may
379 have different or additional requirements on them. Here we present
380 the common denominator for completeness which is the RIPE database
381 implementation [16]. Please consult your routing registry for the
382 latest specification of these classes and attributes. The "Routing
383 Policy System Security" document [20] describes the authenticaiton
384 and authorization model in more detail.
385
3863.1 mntner Class
387
388 The mntner class specifies authenticaiton information required to
389 create, delete and update RPSL objects. A provider, before he/she
390 can create RPSL objects, first needs to create a mntner object. The
391
392
393
394Alaettinoglu, et al. Standards Track [Page 7]
395
396RFC 2622 RPSL June 1999
397
398
399 attributes of the mntner class are shown in Figure 1. The mntner
400 class was first described in [13].
401
402 The mntner attribute is mandatory and is the class key. Its value is
403 an RPSL name. The auth attribute specifies the scheme that will be
404 used to identify and authenticate update requests from this
405 maintainer. It has the following syntax:
406
407 auth: <scheme-id> <auth-info>
408
409 E.g.
410 auth: NONE
411
412 Attribute Value Type
413 mntner <object-name> mandatory, single-valued, class key
414 descr <free-form> mandatory, single-valued
415 auth see description in text mandatory, multi-valued
416 upd-to <email-address> mandatory, multi-valued
417 mnt-nfy <email-address> optional, multi-valued
418 tech-c <nic-handle> mandatory, multi-valued
419 admin-c <nic-handle> optional, multi-valued
420 remarks <free-form> optional, multi-valued
421 notify <email-address> optional, multi-valued
422 mnt-by list of <mntner-name> mandatory, multi-valued
423 changed <email-address> <date> mandatory, multi-valued
424 source <registry-name> mandatory, single-valued
425
426
427 Figure 1: mntner Class Attributes
428
429
430 auth: CRYPT-PW dhjsdfhruewf
431 auth: MAIL-FROM .*@ripe\.net
432
433 The <scheme-id>'s currently defined are: NONE, MAIL-FROM, PGP-KEY and
434 CRYPT-PW. The <auth-info> is additional information required by a
435 particular scheme: in the case of MAIL-FROM, it is a regular
436 expression matching valid email addresses; in the case of CRYPT-PW,
437 it is a password in UNIX crypt format; and in the case of PGP-KEY, it
438 is a pointer to key-certif object [22] containing the PGP public key
439 of the user. If multiple auth attributes are specified, an update
440 request satisfying any one of them is authenticated to be from the
441 maintainer.
442
443 The upd-to attribute is an email address. On an unauthorized update
444 attempt of an object maintained by this maintainer, an email message
445 will be sent to this address. The mnt-nfy attribute is an email
446 address. A notification message will be forwarded to this email
447
448
449
450Alaettinoglu, et al. Standards Track [Page 8]
451
452RFC 2622 RPSL June 1999
453
454
455 address whenever an object maintained by this maintainer is added,
456 changed or deleted.
457
458 The descr attribute is a short, free-form textual description of the
459 object. The tech-c attribute is a technical contact NIC handle.
460 This is someone to be contacted for technical problems such as
461 misconfiguration. The admin-c attribute is an administrative contact
462 NIC handle. The remarks attribute is a free text explanation or
463 clarification. The notify attribute is an email address to which
464 notifications of changes to this object should be sent. The mnt-by
465 attribute is a list of mntner object names. The authorization for
466 changes to this object is governed by any of the maintainer objects
467 referenced. The changed attribute documents who last changed this
468 object, and when this change was made. Its syntax has the following
469 form:
470
471 changed: <email-address> <YYYYMMDD>
472
473 E.g.
474 changed: johndoe@terabit-labs.nn 19900401
475
476 The <email-address> identifies the person who made the last change.
477 <YYYYMMDD> is the date of the change. The source attribute specifies
478 the registry where the object is registered. Figure 2 shows an
479 example mntner object. In the example, UNIX crypt format password
480 authentication is used.
481
482 mntner: RIPE-NCC-MNT
483 descr: RIPE-NCC Maintainer
484 admin-c: DK58
485 tech-c: OPS4-RIPE
486 upd-to: ops@ripe.net
487 mnt-nfy: ops-fyi@ripe.net
488 auth: CRYPT-PW lz1A7/JnfkTtI
489 mnt-by: RIPE-NCC-MNT
490 changed: ripe-dbm@ripe.net 19970820
491 source: RIPE
492
493
494 Figure 2: An example mntner object.
495
496 The descr, tech-c, admin-c, remarks, notify, mnt-by, changed and
497 source attributes are attributes of all RPSL classes. Their syntax,
498 semantics, and mandatory, optional, multi-valued, or single-valued
499 status are the same for for all RPSL classes. Only exception to this
500 is the admin-c attribute which is mandatory for the aut-num class.
501 We do not further discuss them in other sections.
502
503
504
505
506Alaettinoglu, et al. Standards Track [Page 9]
507
508RFC 2622 RPSL June 1999
509
510
5113.2 person Class
512
513 A person class is used to describe information about people. Even
514 though it does not describe routing policy, we still describe it here
515 briefly since many policy objects make reference to person objects.
516 The person class was first described in [15].
517
518 The attributes of the person class are shown in Figure 3. The person
519 attribute is the full name of the person. The phone and the fax-no
520 attributes have the following syntax:
521
522 phone: +<country-code> <city> <subscriber> [ext. <extension>]
523
524 E.g.:
525 phone: +31 20 12334676
526
527 Attribute Value Type
528 person <free-form> mandatory, single-valued
529 nic-hdl <nic-handle> mandatory, single-valued, class key
530 address <free-form> mandatory, multi-valued
531 phone see description in text mandatory, multi-valued
532 fax-no same as phone optional, multi-valued
533 e-mail <email-address> mandatory, multi-valued
534
535
536 Figure 3: person Class Attributes
537
538
539 phone: +44 123 987654 ext. 4711
540
541 Figure 4 shows an example person object.
542
543 person: Daniel Karrenberg
544 address: RIPE Network Coordination Centre (NCC)
545 address: Singel 258
546 address: NL-1016 AB Amsterdam
547 address: Netherlands
548 phone: +31 20 535 4444
549 fax-no: +31 20 535 4445
550 e-mail: Daniel.Karrenberg@ripe.net
551 nic-hdl: DK58
552 changed: Daniel.Karrenberg@ripe.net 19970616
553 source: RIPE
554
555
556 Figure 4: An example person object.
557
558
559
560
561
562Alaettinoglu, et al. Standards Track [Page 10]
563
564RFC 2622 RPSL June 1999
565
566
5673.3 role Class
568
569 The role class is similar to the person object. However, instead of
570 describing a human being, it describes a role performed by one or
571 more human beings. Examples include help desks, network monitoring
572 centers, system administrators, etc. Role object is particularly
573 useful since often a person performing a role may change, however the
574 role itself remains.
575
576 The attributes of the role class are shown in Figure 5. The nic-hdl
577 attributes of the person and role classes share the same name space.
578 The trouble attribute of role object may contain additional contact
579 information to be used when a problem arises in any object that
580 references this role object. Figure 6 shows an example role object.
581
582 Attribute Value Type
583 role <free-form> mandatory, single-valued
584 nic-hdl <nic-handle> mandatory, single-valued,
585 class key
586 trouble <free-form> optional, multi-valued
587 address <free-form> mandatory, multi-valued
588 phone see description in text mandatory, multi-valued
589 fax-no same as phone optional, multi-valued
590 e-mail <email-address> mandatory, multi-valued
591
592
593 Figure 5: role Class Attributes
594
595
596 role: RIPE NCC Operations
597 trouble:
598 address: Singel 258
599 address: 1016 AB Amsterdam
600 address: The Netherlands
601 phone: +31 20 535 4444
602 fax-no: +31 20 545 4445
603 e-mail: ops@ripe.net
604 admin-c: CO19-RIPE
605 tech-c: RW488-RIPE
606 tech-c: JLSD1-RIPE
607 nic-hdl: OPS4-RIPE
608 notify: ops@ripe.net
609 changed: roderik@ripe.net 19970926
610 source: RIPE
611
612
613 Figure 6: An example role object.
614
615
616
617
618Alaettinoglu, et al. Standards Track [Page 11]
619
620RFC 2622 RPSL June 1999
621
622
6234 route Class
624
625 Each interAS route (also referred to as an interdomain route)
626 originated by an AS is specified using a route object. The
627 attributes of the route class are shown in Figure 7. The route
628 attribute is the address prefix of the route and the origin attribute
629 is the AS number of the AS that originates the route into the interAS
630 routing system. The route and origin attribute pair is the class
631 key.
632
633 Figure 8 shows examples of four route objects (we do not include
634 contact attributes such as admin-c, tech-c for brevity). Note that
635 the last two route objects have the same address prefix, namely
636 128.8.0.0/16. However, they are different route objects since they
637 are originated by different ASes (i.e. they have different keys).
638
639 Attribute Value Type
640 route <address-prefix> mandatory, single-valued,
641 class key
642 origin <as-number> mandatory, single-valued,
643 class key
644 member-of list of <route-set-names> optional, multi-valued
645 see Section 5
646 inject see Section 8 optional, multi-valued
647 components see Section 8 optional, single-valued
648 aggr-bndry see Section 8 optional, single-valued
649 aggr-mtd see Section 8 optional, single-valued
650 export-comps see Section 8 optional, single-valued
651 holes see Section 8 optional, multi-valued
652
653
654 Figure 7: route Class Attributes
655
656
657 route: 128.9.0.0/16
658 origin: AS226
659
660 route: 128.99.0.0/16
661 origin: AS226
662
663 route: 128.8.0.0/16
664 origin: AS1
665
666 route: 128.8.0.0/16
667 origin: AS2
668
669 Figure 8: Route Objects
670
671
672
673
674Alaettinoglu, et al. Standards Track [Page 12]
675
676RFC 2622 RPSL June 1999
677
678
6795 Set Classes
680
681 To specify policies, it is often useful to define sets of objects.
682 For this purpose we define as-set, route-set, rtr-set, filter-set,
683 and peering-set classes. These classes define a named set. The
684 members of these sets can be specified either directly by listing
685 them in the sets' definition, or indirectly by having member objects
686 refer to the sets' names, or a combination of both methods.
687
688 A set's name is an rpsl word with the following restrictions: All
689 as-set names start with prefix "as-". All route-set names start with
690 prefix "rs-". All rtr-set names start with prefix "rtrs-". All
691 filter-set names start with prefix "fltr-". All peering-set names
692 start with prefix "prng-". For example, as-foo is a valid as-set
693 name.
694
695 Set names can also be hierarchical. A hierarchical set name is a
696 sequence of set names and AS numbers separated by colons ":". At
697 least one component of such a name must be an actual set name (i.e.
698 start with one of the prefixes above). All the set name components
699 of an hierarchical name has to be of the same type. For example, the
700 following names are valid: AS1:AS-CUSTOMERS, AS1:RS-EXPORT:AS2, RS-
701 EXCEPTIONS:RS-BOGUS.
702
703 The purpose of an hierarchical set name is to partition the set name
704 space so that the maintainers of the set X1 controls the whole set
705 name space underneath, i.e. X1:...:Xn-1. Thus, a set object with
706 name X1:...:Xn-1:Xn can only be created by the maintainer of the
707 object with name X1:...:Xn-1. That is, only the maintainer of AS1
708 can create a set with name AS1:AS-FOO; and only the maintainer of
709 AS1:AS-FOO can create a set with name AS1:AS-FOO:AS-BAR. Please see
710 RPS Security Document [20] for details.
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730Alaettinoglu, et al. Standards Track [Page 13]
731
732RFC 2622 RPSL June 1999
733
734
7355.1 as-set Class
736
737 The attributes of the as-set class are shown in Figure 9. The as-set
738 attribute defines the name of the set. It is an RPSL name that
739 starts with "as-". The members attribute lists the members of the
740 set. The members attribute is a list of AS numbers, or other as-set
741 names.
742
743 Attribute Value Type
744 as-set <object-name> mandatory, single-valued,
745 class key
746 members list of <as-numbers> or optional, multi-valued
747 <as-set-names>
748 mbrs-by-ref list of <mntner-names> optional, multi-valued
749
750
751 Figure 9: as-set Class Attributes
752
753 Figure 10 presents two as-set objects. The set as-foo contains two
754 ASes, namely AS1 and AS2. The set as-bar contains the members of the
755 set as-foo and AS3, that is it contains AS1, AS2, AS3. The set as-
756 empty contains no members.
757
758 as-set: as-foo as-set: as-bar as-set: as-empty
759 members: AS1, AS2 members: AS3, as-foo
760
761
762 Figure 10: as-set objects.
763
764 The mbrs-by-ref attribute is a list of maintainer names or the
765 keyword ANY. If this attribute is used, the AS set also includes
766 ASes whose aut-num objects are registered by one of these maintainers
767 and whose member-of attribute refers to the name of this AS set. If
768 the value of a mbrs-by-ref attribute is ANY, any AS object referring
769 to the AS set is a member of the set. If the mbrs-by-ref attribute
770 is missing, only the ASes listed in the members attribute are members
771 of the set.
772
773 as-set: as-foo
774 members: AS1, AS2
775 mbrs-by-ref: MNTR-ME
776
777 aut-num: AS3 aut-num: AS4
778 member-of: as-foo member-of: as-foo
779 mnt-by: MNTR-ME mnt-by: MNTR-OTHER
780
781
782 Figure 11: as-set objects.
783
784
785
786Alaettinoglu, et al. Standards Track [Page 14]
787
788RFC 2622 RPSL June 1999
789
790
791 Figure 11 presents an example as-set object that uses the mbrs-by-ref
792 attribute. The set as-foo contains AS1, AS2 and AS3. AS4 is not a
793 member of the set as-foo even though the aut-num object references
794 as-foo. This is because MNTR-OTHER is not listed in the as-foo's
795 mbrs-by-ref attribute.
796
7975.2 route-set Class
798
799 The attributes of the route-set class are shown in Figure 12. The
800 route-set attribute defines the name of the set. It is an RPSL name
801 that starts with "rs-". The members attribute lists the members of
802 the set. The members attribute is a list of address prefixes or
803 other route-set names. Note that, the route-set class is a set of
804 route prefixes, not of RPSL route objects.
805
806 Attribute Value Type
807 route-set <object-name> mandatory,
808 single-valued,
809 class key
810 members list of <address-prefix-range> or optional, multi-valued
811 <route-set-name> or
812 <route-set-name><range-operator>
813 mbrs-by-ref list of <mntner-names> optional, multi-valued
814
815
816 Figure 12: route-set Class Attributes
817
818 Figure 13 presents some example route-set objects. The set rs-foo
819 contains two address prefixes, namely 128.9.0.0/16 and 128.9.0.0/24.
820 The set rs-bar contains the members of the set rs-foo and the address
821 prefix 128.7.0.0/16.
822
823 An address prefix or a route-set name in a members attribute can be
824 optionally followed by a range operator. For example, the following
825 set:
826
827 route-set: rs-foo
828 members: 128.9.0.0/16, 128.9.0.0/24
829
830 route-set: rs-bar
831 members: 128.7.0.0/16, rs-foo
832
833
834 Figure 13: route-set Objects
835
836
837
838
839
840
841
842Alaettinoglu, et al. Standards Track [Page 15]
843
844RFC 2622 RPSL June 1999
845
846
847 route-set: rs-bar
848 members: 5.0.0.0/8^+, 30.0.0.0/8^24-32, rs-foo^+
849
850 contains all the more specifics of 5.0.0.0/8 including 5.0.0.0/8, all
851 the more specifics of 30.0.0.0/8 which are of length 24 to 32 such as
852 30.9.9.96/28, and all the more specifics of address prefixes in route
853 set rs-foo.
854
855 The mbrs-by-ref attribute is a list of maintainer names or the
856 keyword ANY. If this attribute is used, the route set also includes
857 address prefixes whose route objects are registered by one of these
858 maintainers and whose member-of attribute refers to the name of this
859 route set. If the value of a mbrs-by-ref attribute is ANY, any route
860 object referring to the route set name is a member. If the mbrs-by-
861 ref attribute is missing, only the address prefixes listed in the
862 members attribute are members of the set.
863
864
865 route-set: rs-foo
866 mbrs-by-ref: MNTR-ME, MNTR-YOU
867
868 route-set: rs-bar
869 members: 128.7.0.0/16
870 mbrs-by-ref: MNTR-YOU
871
872 route: 128.9.0.0/16
873 origin: AS1
874 member-of: rs-foo
875 mnt-by: MNTR-ME
876
877 route: 128.8.0.0/16
878 origin: AS2
879 member-of: rs-foo, rs-bar
880 mnt-by: MNTR-YOU
881
882
883 Figure 14: route-set objects.
884
885 Figure 14 presents example route-set objects that use the mbrs-by-ref
886 attribute. The set rs-foo contains two address prefixes, namely
887 128.8.0.0/16 and 128.9.0.0/16 since the route objects for
888 128.8.0.0/16 and 128.9.0.0/16 refer to the set name rs-foo in their
889 member-of attribute. The set rs-bar contains the address prefixes
890 128.7.0.0/16 and 128.8.0.0/16. The route 128.7.0.0/16 is explicitly
891 listed in the members attribute of rs-bar, and the route object for
892 128.8.0.0/16 refer to the set name rs-bar in its member-of attribute.
893
894
895
896
897
898Alaettinoglu, et al. Standards Track [Page 16]
899
900RFC 2622 RPSL June 1999
901
902
903 Note that, if an address prefix is listed in a members attribute of a
904 route set, it is a member of that route set. The route object
905 corresponding to this address prefix does not need to contain a
906 member-of attribute referring to this set name. The member-of
907 attribute of the route class is an additional mechanism for
908 specifying the members indirectly.
909
9105.3 Predefined Set Objects
911
912 In a context that expects a route set (e.g. members attribute of the
913 route-set class), an AS number ASx defines the set of routes that are
914 originated by ASx; and an as-set AS-X defines the set of routes that
915 are originated by the ASes in AS-X. A route p is said to be
916 originated by ASx if there is a route object for p with ASx as the
917 value of the origin attribute. For example, in Figure 15, the route
918 set rs-special contains 128.9.0.0/16, routes of AS1 and AS2, and
919 routes of the ASes in AS set AS-FOO.
920
921 route-set: rs-special
922 members: 128.9.0.0/16, AS1, AS2, AS-FOO
923
924
925 Figure 15: Use of AS numbers and AS sets in route sets.
926
927 The set rs-any contains all routes registered in IRR. The set as-any
928 contains all ASes registered in IRR.
929
9305.4 Filters and filter-set Class
931
932 The attributes of the filter-set class are shown in Figure 16. A
933 filter-set object defines a set of routes that are matched by its
934 filter. The filter-set attribute defines the name of the filter. It
935 is an RPSL name that starts with "fltr-".
936
937 Attribute Value Type
938 filter-set <object-name> mandatory, single-valued, class key
939 filter <filter> mandatory, single-valued
940
941 Figure 16: filter Class Attributes
942
943 filter-set: fltr-foo
944 filter: { 5.0.0.0/8, 6.0.0.0/8 }
945
946 filter-set: fltr-bar
947 filter: (AS1 or fltr-foo) and <AS2>
948
949 Figure 17: filter-set objects.
950
951
952
953
954Alaettinoglu, et al. Standards Track [Page 17]
955
956RFC 2622 RPSL June 1999
957
958
959 The filter attribute defines the set's policy filter. A policy
960 filter is a logical expression which when applied to a set of routes
961 returns a subset of these routes. We say that the policy filter
962 matches the subset returned. The policy filter can match routes
963 using any BGP path attribute, such as the destination address prefix
964 (or NLRI), AS-path, or community attributes.
965
966 The policy filters can be composite by using the operators AND, OR,
967 and NOT. The following policy filters can be used to select a subset
968 of routes:
969
970 ANY
971 The keyword ANY matches all routes.
972
973 Address-Prefix Set This is an explicit list of address prefixes
974 enclosed in braces '{' and '}'. The policy filter matches the set
975 of routes whose destination address-prefix is in the set. For
976 example:
977
978 { 0.0.0.0/0 }
979 { 128.9.0.0/16, 128.8.0.0/16, 128.7.128.0/17, 5.0.0.0/8 }
980 { }
981
982
983 An address prefix can be optionally followed by a range operator
984 (i.e.
985
986 { 5.0.0.0/8^+, 128.9.0.0/16^-, 30.0.0.0/8^16, 30.0.0.0/8^24-32 }
987
988
989 contains all the more specifics of 5.0.0.0/8 including 5.0.0.0/8, all
990 the more specifics of 128.9.0.0/16 excluding 128.9.0.0/16, all the
991 more specifics of 30.0.0.0/8 which are of length 16 such as
992 30.9.0.0/16, and all the more specifics of 30.0.0.0/8 which are of
993 length 24 to 32 such as 30.9.9.96/28.
994
995 Route Set Name A route set name matches the set of routes that are
996 members of the set. A route set name may be a name of a route-set
997 object, an AS number, or a name of an as-set object (AS numbers and
998 as-set names implicitly define route sets; please see Section 5.3).
999 For example:
1000
1001 aut-num: AS1
1002 import: from AS2 accept AS2
1003 import: from AS2 accept AS-FOO
1004 import: from AS2 accept RS-FOO
1005
1006
1007
1008
1009
1010Alaettinoglu, et al. Standards Track [Page 18]
1011
1012RFC 2622 RPSL June 1999
1013
1014
1015 The keyword PeerAS can be used instead of the AS number of the peer
1016 AS. PeerAS is particularly useful when the peering is specified
1017 using an AS expression. For example:
1018
1019 as-set: AS-FOO
1020 members: AS2, AS3
1021
1022 aut-num: AS1
1023 import: from AS-FOO accept PeerAS
1024
1025 is same as:
1026
1027 aut-num: AS1
1028 import: from AS2 accept AS2
1029 import: from AS3 accept AS3
1030
1031 A route set name can also be followed by one of the operators '^-',
1032 '^+', example, { 5.0.0.0/8, 6.0.0.0/8 }^+ equals { 5.0.0.0/8^+,
1033 6.0.0.0/8^+ }, and AS1^- equals all the exclusive more specifics of
1034 routes originated by AS1.
1035
1036 AS Path Regular Expressions
1037 An AS-path regular expression can be used as a policy filter by
1038 enclosing the expression in `<' and `>'. An AS-path policy filter
1039 matches the set of routes which traverses a sequence of ASes
1040 matched by the AS-path regular expression. A router can check
1041 this using the AS_PATH attribute in the Border Gateway Protocol
1042 [19], or the RD_PATH attribute in the Inter-Domain Routing
1043 Protocol [18].
1044
1045 AS-path Regular Expressions are POSIX compliant regular
1046 expressions over the alphabet of AS numbers. The regular
1047 expression constructs are as follows:
1048
1049 ASN
1050 where ASN is an AS number. ASN matches the AS-path that is of
1051 length 1 and contains the corresponding AS number (e.g. AS-path
1052 regular expression AS1 matches the AS-path "1").
1053
1054 The keyword PeerAS can be used instead of the AS number of the
1055 peer AS.
1056
1057 AS-set
1058 where AS-set is an AS set name. AS-set matches the AS-paths that
1059 is matched by one of the ASes in the AS-set.
1060
1061 .
1062 matches the AS-paths matched by any AS number.
1063
1064
1065
1066Alaettinoglu, et al. Standards Track [Page 19]
1067
1068RFC 2622 RPSL June 1999
1069
1070
1071 [...]
1072 is an AS number set. It matches the AS-paths matched by the AS
1073 numbers listed between the brackets. The AS numbers in the set
1074 are separated by white space characters. If a `-' is used between
1075 two AS numbers in this set, all AS numbers between the two AS
1076 numbers are included in the set. If an as-set name is listed, all
1077 AS numbers in the as-set are included.
1078
1079 [^...]
1080 is a complemented AS number set. It matches any AS-path which is
1081 not matched by the AS numbers in the set.
1082
1083 ^
1084 Matches the empty string at the beginning of an AS-path.
1085
1086 $
1087 Matches the empty string at the end of an AS-path.
1088
1089 We next list the regular expression operators in the decreasing order
1090 of evaluation. These operators are left associative, i.e. performed
1091 left to right.
1092
1093 Unary postfix operators * + ? {m} {m,n} {m,}
1094 For a regular expression A, A* matches zero or more occurrences of
1095 A; A+ matches one or more occurrences of A; A? matches zero or
1096 one occurrence of A; A{m} matches m occurrence of A; A{m,n}
1097 matches m to n occurrence of A; A{m,} matches m or more occurrence
1098 of A. For example, [AS1 AS2]{2} matches AS1 AS1, AS1 AS2, AS2 AS1,
1099 and AS2 AS2.
1100
1101 Unary postfix operators ~* ~+ ~{m} ~{m,n} ~{m,}
1102 These operators have similar functionality as the corresponding
1103 operators listed above, but all occurrences of the regular
1104 expression has to match the same pattern. For example, [AS1
1105 AS2]~{2} matches AS1 AS1 and AS2 AS2, but it does not match AS1
1106 AS2 and AS2 AS1.
1107
1108 Binary catenation operator
1109 This is an implicit operator and exists between two regular
1110 expressions A and B when no other explicit operator is specified.
1111 The resulting expression A B matches an AS-path if A matches some
1112 prefix of the AS-path and B matches the rest of the AS-path.
1113
1114 Binary alternative (or) operator |
1115 For a regular expressions A and B, A | B matches any AS-path that
1116 is matched by A or B.
1117
1118
1119
1120
1121
1122Alaettinoglu, et al. Standards Track [Page 20]
1123
1124RFC 2622 RPSL June 1999
1125
1126
1127 Parenthesis can be used to override the default order of evaluation.
1128 White spaces can be used to increase readability.
1129
1130 The following are examples of AS-path filters:
1131
1132 <AS3>
1133 <^AS1>
1134 <AS2$>
1135 <^AS1 AS2 AS3$>
1136 <^AS1 .* AS2$>.
1137
1138 The first example matches any route whose AS-path contains AS3, the
1139 second matches routes whose AS-path starts with AS1, the third
1140 matches routes whose AS-path ends with AS2, the fourth matches routes
1141 whose AS-path is exactly "1 2 3", and the fifth matches routes whose
1142 AS-path starts with AS1 and ends in AS2 with any number of AS numbers
1143 in between.
1144
1145 Composite Policy Filters The following operators (in decreasing order
1146 of evaluation) can be used to form composite policy filters:
1147
1148
1149 NOT Given a policy filter x, NOT x matches the set of routes that
1150 are not matched by x. That is it is the negation of policy
1151 filter x.
1152
1153 AND Given two policy filters x and y, x AND y matches the intersection
1154 of the routes that are matched by x and that are matched by y.
1155
1156 OR Given two policy filters x and y, x OR y matches the union of the
1157 routes that are matched by x and that are matched by y.
1158
1159 Note that an OR operator can be implicit, that is `x y' is equivalent
1160 to `x OR y'.
1161
1162 E.g.
1163 NOT {128.9.0.0/16, 128.8.0.0/16}
1164 AS226 AS227 OR AS228
1165 AS226 AND NOT {128.9.0.0/16}
1166 AS226 AND {0.0.0.0/0^0-18}
1167
1168 The first example matches any route except 128.9.0.0/16 and
1169 128.8.0.0/16. The second example matches the routes of AS226, AS227
1170 and AS228. The third example matches the routes of AS226 except
1171 128.9.0.0/16. The fourth example matches the routes of AS226 whose
1172 length are not longer than 18.
1173
1174
1175
1176
1177
1178Alaettinoglu, et al. Standards Track [Page 21]
1179
1180RFC 2622 RPSL June 1999
1181
1182
1183 Routing Policy Attributes Policy filters can also use the values of
1184 other attributes for comparison. The attributes whose values can be
1185 used in policy filters are specified in the RPSL dictionary. Please
1186 refer to Section 7 for details. An example using the the BGP
1187 community attribute is shown below:
1188
1189 aut-num: AS1
1190 export: to AS2 announce AS1 AND NOT community(NO_EXPORT)
1191
1192 Filters using the routing policy attributes defined in the dictionary
1193 are evaluated before evaluating the operators AND, OR and NOT.
1194
1195 Filter Set Name
1196 A filter set name matches the set of routes that are matched by
1197 its filter attribute. Note that the filter attribute of a filter
1198 set, can recursively refer to other filter set names. For example
1199 in Figure 17, fltr-foo matches { 5.0.0.0/8, 6.0.0.0/8 }, and
1200 fltr-bar matches AS1'S routes or { 5.0.0.0/8, 6.0.0.0/8 } if their
1201 as path contained AS2.
1202
12035.5 rtr-set Class
1204
1205 The attributes of the rtr-set class are shown in Figure 18. The
1206 rtr-set attribute defines the name of the set. It is an RPSL name
1207 that starts with "rtrs-". The members attribute lists the members of
1208 the set. The members attribute is a list of inet-rtr names,
1209 ipv4_addresses or other rtr-set names.
1210
1211 Attribute Value Type
1212 rtr-set <object-name> mandatory, single-valued,
1213 class key
1214 members list of <inet-rtr-names> or optional, multi-valued
1215 <rtr-set-names>
1216 or <ipv4_addresses>
1217 mbrs-by-ref list of <mntner-names> optional, multi-valued
1218
1219
1220 Figure 18: rtr-set Class Attributes
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234Alaettinoglu, et al. Standards Track [Page 22]
1235
1236RFC 2622 RPSL June 1999
1237
1238
1239 Figure 19 presents two rtr-set objects. The set rtrs-foo contains
1240 two routers, namely rtr1.isp.net and rtr2.isp.net. The set rtrs-bar
1241 contains the members of the set rtrs-foo and rtr3.isp.net, that is it
1242 contains rtr1.isp.net, rtr2.isp.net, rtr3.isp.net.
1243
1244 rtr-set: rtrs-foo rtr-set: rtrs-bar
1245 members: rtr1.isp.net, rtr2.isp.net members: rtr3.isp.net, rtrs-foo
1246
1247
1248 Figure 19: rtr-set objects.
1249
1250 The mbrs-by-ref attribute is a list of maintainer names or the
1251 keyword ANY. If this attribute is used, the router set also includes
1252 routers whose inet-rtr objects are registered by one of these
1253 maintainers and whose member-of attribute refers to the name of this
1254 router set. If the value of a mbrs-by-ref attribute is ANY, any
1255 inet-rtr object referring to the router set is a member of the set.
1256 If the mbrs-by-ref attribute is missing, only the routers listed in
1257 the members attribute are members of the set.
1258
1259 rtr-set: rtrs-foo
1260 members: rtr1.isp.net, rtr2.isp.net
1261 mbrs-by-ref: MNTR-ME
1262
1263 inet-rtr: rtr3.isp.net
1264 local-as: as1
1265 ifaddr: 1.1.1.1 masklen 30
1266 member-of: rtrs-foo
1267 mnt-by: MNTR-ME
1268
1269
1270 Figure 20: rtr-set objects.
1271
1272 Figure 20 presents an example rtr-set object that uses the mbrs-by-
1273 ref attribute. The set rtrs-foo contains rtr1.isp.net, rtr2.isp.net
1274 and rtr3.isp.net.
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290Alaettinoglu, et al. Standards Track [Page 23]
1291
1292RFC 2622 RPSL June 1999
1293
1294
12955.6 Peerings and peering-set Class
1296
1297 The attributes of the peering-set class are shown in Figure 21. A
1298 peering-set object defines a set of peerings that are listed in its
1299 peering attributes. The peering-set attribute defines the name of
1300 the set. It is an RPSL name that starts with "prng-".
1301
1302 Attribute Value Type
1303 peering-set <object-name> mandatory, single-valued, class key
1304 peering <peering> mandatory, multi-valued
1305
1306 Figure 21: filter Class Attributes
1307
1308 The peering attribute defines a peering that can be used for
1309 importing or
1310
1311 ---------------------- ----------------------
1312 | 7.7.7.1 |-------| |-------| 7.7.7.2 |
1313 | | ======== | |
1314 | AS1 | EX1 |-------| 7.7.7.3 AS2 |
1315 | | | |
1316 | 9.9.9.1 |------ ------| 9.9.9.2 |
1317 ---------------------- | | ----------------------
1318 ===========
1319 | EX2
1320 ---------------------- |
1321 | 9.9.9.3 |---------
1322 | |
1323 | AS3 |
1324 ----------------------
1325
1326 Figure 22: Example topology consisting of three ASes, AS1, AS2, and
1327 AS3; two exchange points, EX1 and EX2; and six routers.
1328
1329 exporting routes.
1330 In describing peerings, we are going to use the topology of Figure
1331 22. In this topology, there are three ASes, AS1, AS2, and AS3;
1332 two exchange points, EX1 and EX2; and six routers. Routers
1333 connected to the same exchange point peer with each other and
1334 exchange routing information. That is, 7.7.7.1, 7.7.7.2 and
1335 7.7.7.3 peer with each other; 9.9.9.1, 9.9.9.2 and 9.9.9.3 peer
1336 with each other.
1337
1338 The syntax of a peering specification is:
1339
1340 <as-expression> [<router-expression-1>] [at <router-expression-2>]
1341 | <peering-set-name>
1342
1343
1344
1345
1346Alaettinoglu, et al. Standards Track [Page 24]
1347
1348RFC 2622 RPSL June 1999
1349
1350
1351 where <as-expression> is an expression over AS numbers and AS sets
1352 using operators AND, OR, and EXCEPT, and <router-expression-1> and
1353 <router-expression-2> are expressions over router IP addresses,
1354 inet-rtr names, and rtr-set names using operators AND, OR, and
1355 EXCEPT. The binary "EXCEPT" operator is the set subtraction
1356 operator and has the same precedence as the operator AND (it is
1357 semantically equivalent to "AND NOT" combination). That is "(AS1
1358 OR AS2) EXCEPT AS2" equals "AS1".
1359
1360 This form identifies all the peerings between any local router in
1361 <router-expression-2> to any of their peer routers in <router-
1362 expression-1> in the ASes in <as-expression>. If <router-
1363 expression-2> is not specified, it defaults to all routers of the
1364 local AS that peer with ASes in <as-expression>. If <router-
1365 expression-1> is not specified, it defaults to all routers of the
1366 peer ASes in <as-expression> that peer with the local AS.
1367
1368 If a <peering-set-name> is used, the peerings are listed in the
1369 corresponding peering-set object. Note that the peering-set
1370 objects can be recursive.
1371
1372 Many special forms of this general peering specification is
1373 possible. The following examples illustrate the most common
1374 cases, using the import attribute of the aut-num class. In the
1375 following example 7.7.7.1 imports 128.9.0.0/16 from 7.7.7.2.
1376
1377 (1) aut-num: AS1
1378 import: from AS2 7.7.7.2 at 7.7.7.1 accept { 128.9.0.0/16 }
1379
1380 In the following example 7.7.7.1 imports 128.9.0.0/16 from 7.7.7.2
1381 and 7.7.7.3.
1382
1383 (2) aut-num: AS1
1384 import: from AS2 at 7.7.7.1 accept { 128.9.0.0/16 }
1385
1386
1387 In the following example 7.7.7.1 imports 128.9.0.0/16 from 7.7.7.2
1388 and 7.7.7.3, and 9.9.9.1 imports 128.9.0.0/16 from 9.9.9.2.
1389
1390 (3) aut-num: AS1
1391 import: from AS2 accept { 128.9.0.0/16 }
1392
1393 In the following example 9.9.9.1 imports 128.9.0.0/16 from 9.9.9.2
1394 and 9.9.9.3.
1395
1396
1397
1398
1399
1400
1401
1402Alaettinoglu, et al. Standards Track [Page 25]
1403
1404RFC 2622 RPSL June 1999
1405
1406
1407 (4) as-set: AS-FOO
1408 members: AS2, AS3
1409
1410 aut-num: AS1
1411 import: from AS-FOO at 9.9.9.1 accept { 128.9.0.0/16 }
1412
1413 In the following example 9.9.9.1 imports 128.9.0.0/16 from 9.9.9.2
1414 and 9.9.9.3, and 7.7.7.1 imports 128.9.0.0/16 from 7.7.7.2 and
1415 7.7.7.3.
1416
1417 (5) aut-num: AS1
1418 import: from AS-FOO accept { 128.9.0.0/16 }
1419
1420 In the following example AS1 imports 128.9.0.0/16 from AS3 at router
1421 9.9.9.1
1422
1423 (6) aut-num: AS1
1424 import: from AS-FOO and not AS2 at not 7.7.7.1
1425 accept { 128.9.0.0/16 }
1426
1427 This is because "AS-FOO and not AS2" equals AS3 and "not 7.7.7.1"
1428 equals 9.9.9.1.
1429
1430 In the following example 9.9.9.1 imports 128.9.0.0/16 from 9.9.9.2
1431 and 9.9.9.3.
1432
1433 (7) peering-set: prng-bar
1434 peering: AS1 at 9.9.9.1
1435
1436 peering-set: prng-foo
1437 peering: prng-bar
1438 peering: AS2 at 9.9.9.1
1439
1440 aut-num: AS1
1441 import: from prng-foo accept { 128.9.0.0/16 }
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458Alaettinoglu, et al. Standards Track [Page 26]
1459
1460RFC 2622 RPSL June 1999
1461
1462
14636 aut-num Class
1464
1465 Routing policies are specified using the aut-num class. The
1466 attributes of the aut-num class are shown in Figure 23. The value of
1467 the aut-num attribute is the AS number of the AS described by this
1468 object. The as-name attribute is a symbolic name (in RPSL name
1469 syntax) of the AS. The import, export and default routing policies of
1470 the AS are specified using import, export and default attributes
1471 respectively.
1472
1473 Attribute Value Type
1474 aut-num <as-number> mandatory, single-valued, class key
1475 as-name <object-name> mandatory, single-valued
1476 member-of list of <as-set-names> optional, multi-valued
1477 import see Section 6.1 optional, multi valued
1478 export see Section 6.2 optional, multi valued
1479 default see Section 6.5 optional, multi valued
1480
1481 Figure 23: aut-num Class Attributes
1482
14836.1 import Attribute: Import Policy Specification
1484
1485 In RPSL, an import policy is divided into import policy expressions.
1486 Each import policy expression is specified using an import attribute.
1487 The import attribute has the following syntax (we will extend this
1488 syntax later in Sections 6.3 and 6.6):
1489
1490 import: from <peering-1> [action <action-1>]
1491 . . .
1492 from <peering-N> [action <action-N>]
1493 accept <filter>
1494
1495 The action specification is optional. The semantics of an import
1496 attribute is as follows: the set of routes that are matched by
1497 <filter> are imported from all the peers in <peerings>; while
1498 importing routes at <peering-M>, <action-M> is executed.
1499
1500 E.g.
1501 aut-num: AS1
1502 import: from AS2 action pref = 1; accept { 128.9.0.0/16 }
1503
1504 This example states that the route 128.9.0.0/16 is accepted from AS2
1505 with preference 1. We already presented how peerings (see Section
1506 5.6) and filters (see Section 5.4) are specified. We next present
1507 how to specify actions.
1508
1509
1510
1511
1512
1513
1514Alaettinoglu, et al. Standards Track [Page 27]
1515
1516RFC 2622 RPSL June 1999
1517
1518
15196.1.1 Action Specification
1520
1521 Policy actions in RPSL either set or modify route attributes, such as
1522 assigning a preference to a route, adding a BGP community to the BGP
1523 community path attribute, or setting the MULTI-EXIT-DISCRIMINATOR
1524 attribute. Policy actions can also instruct routers to perform
1525 special operations, such as route flap damping.
1526
1527 The routing policy attributes whose values can be modified in policy
1528 actions are specified in the RPSL dictionary. Please refer to
1529 Section 7 for a list of these attributes. Each action in RPSL is
1530 terminated by the semicolon character (';'). It is possible to form
1531 composite policy actions by listing them one after the other. In a
1532 composite policy action, the actions are executed left to right. For
1533 example,
1534
1535 aut-num: AS1
1536 import: from AS2
1537 action pref = 10; med = 0; community.append(10250, 3561:10);
1538 accept { 128.9.0.0/16 }
1539
1540 sets pref to 10, med to 0, and then appends 10250 and 3561:10 to the
1541 BGP community path attribute. The pref attribute is the inverse of
1542 the local-pref attribute (i.e. local-pref == 65535 - pref). A route
1543 with a local-pref attribute is always preferred over a route without
1544 one.
1545
1546 aut-num: AS1
1547 import: from AS2 action pref = 1;
1548 from AS3 action pref = 2;
1549 accept AS4
1550
1551 The above example states that AS4's routes are accepted from AS2 with
1552 preference 1, and from AS3 with preference 2 (routes with lower
1553 integer preference values are preferred over routes with higher
1554 integer preference values).
1555
1556 aut-num: AS1
1557 import: from AS2 7.7.7.2 at 7.7.7.1 action pref = 1;
1558 from AS2 action pref = 2;
1559 accept AS4
1560
1561 The above example states that AS4's routes are accepted from AS2 on
1562 peering 7.7.7.1-7.7.7.2 with preference 1, and on any other peering
1563 with AS2 with preference 2.
1564
1565
1566
1567
1568
1569
1570Alaettinoglu, et al. Standards Track [Page 28]
1571
1572RFC 2622 RPSL June 1999
1573
1574
15756.2 export Attribute: Export Policy Specification
1576
1577 Similarly, an export policy expression is specified using an export
1578 attribute. The export attribute has the following syntax:
1579
1580 export: to <peering-1> [action <action-1>]
1581 . . .
1582 to <peering-N> [action <action-N>]
1583 announce <filter>
1584
1585 The action specification is optional. The semantics of an export
1586 attribute is as follows: the set of routes that are matched by
1587 <filter> are exported to all the peers specified in <peerings>; while
1588 exporting routes at <peering-M>, <action-M> is executed.
1589
1590 E.g.
1591 aut-num: AS1
1592 export: to AS2 action med = 5; community .= { 70 };
1593 announce AS4
1594
1595 In this example, AS4's routes are announced to AS2 with the med
1596 attribute's value set to 5 and community 70 added to the community
1597 list.
1598
1599 Example:
1600
1601 aut-num: AS1
1602 export: to AS-FOO announce ANY
1603
1604 In this example, AS1 announces all of its routes to the ASes in the
1605 set AS-FOO.
1606
16076.3 Other Routing Protocols, Multi-Protocol Routing Protocols, and
1608 Injecting Routes Between Protocols
1609
1610 The more complete syntax of the import and export attributes are as
1611 follows:
1612
1613 import: [protocol <protocol-1>] [into <protocol-2>]
1614 from <peering-1> [action <action-1>]
1615 . . .
1616 from <peering-N> [action <action-N>]
1617 accept <filter>
1618 export: [protocol <protocol-1>] [into <protocol-2>]
1619 to <peering-1> [action <action-1>]
1620 . . .
1621 to <peering-N> [action <action-N>]
1622 announce <filter>
1623
1624
1625
1626Alaettinoglu, et al. Standards Track [Page 29]
1627
1628RFC 2622 RPSL June 1999
1629
1630
1631 Where the optional protocol specifications can be used for specifying
1632 policies for other routing protocols, or for injecting routes of one
1633 protocol into another protocol, or for multi-protocol routing
1634 policies. The valid protocol names are defined in the dictionary.
1635 The <protocol-1> is the name of the protocol whose routes are being
1636 exchanged. The <protocol-2> is the name of the protocol which is
1637 receiving these routes. Both <protocol-1> and <protocol-2> default
1638 to the Internet Exterior Gateway Protocol, currently BGP.
1639
1640 In the following example, all interAS routes are injected into RIP.
1641
1642 aut-num: AS1
1643 import: from AS2 accept AS2
1644 export: protocol BGP4 into RIP
1645 to AS1 announce ANY
1646
1647 In the following example, AS1 accepts AS2's routes including any more
1648 specifics of AS2's routes, but does not inject these extra more
1649 specific routes into OSPF.
1650
1651 aut-num: AS1
1652 import: from AS2 accept AS2^+
1653 export: protocol BGP4 into OSPF
1654 to AS1 announce AS2
1655
1656 In the following example, AS1 injects its static routes (routes which
1657 are members of the set AS1:RS-STATIC-ROUTES) to the interAS routing
1658 protocol and appends AS1 twice to their AS paths.
1659
1660 aut-num: AS1
1661 import: protocol STATIC into BGP4
1662 from AS1 action aspath.prepend(AS1, AS1);
1663 accept AS1:RS-STATIC-ROUTES
1664
1665 In the following example, AS1 imports different set of unicast routes
1666 for multicast reverse path forwarding from AS2:
1667
1668 aut-num: AS1
1669 import: from AS2 accept AS2
1670 import: protocol IDMR
1671 from AS2 accept AS2:RS-RPF-ROUTES
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682Alaettinoglu, et al. Standards Track [Page 30]
1683
1684RFC 2622 RPSL June 1999
1685
1686
16876.4 Ambiguity Resolution
1688
1689 It is possible that the same peering can be covered by more that one
1690 peering specification in a policy expression. For example:
1691
1692 aut-num: AS1
1693 import: from AS2 7.7.7.2 at 7.7.7.1 action pref = 2;
1694 from AS2 7.7.7.2 at 7.7.7.1 action pref = 1;
1695 accept AS4
1696
1697 This is not an error, though definitely not desirable. To break the
1698 ambiguity, the action corresponding to the first peering
1699 specification is used. That is the routes are accepted with
1700 preference 2. We call this rule as the specification-order rule.
1701
1702 Consider the example:
1703
1704 aut-num: AS1
1705 import: from AS2 action pref = 2;
1706 from AS2 7.7.7.2 at 7.7.7.1 action pref = 1; dpa = 5;
1707 accept AS4
1708
1709 where both peering specifications cover the peering 7.7.7.1-7.7.7.2,
1710 though the second one covers it more specifically. The specification
1711 order rule still applies, and only the action "pref = 2" is executed.
1712 In fact, the second peering-action pair has no use since the first
1713 peering-action pair always covers it. If the intended policy was to
1714 accept these routes with preference 1 on this particular peering and
1715 with preference 2 in all other peerings, the user should have
1716 specified:
1717
1718 aut-num: AS1
1719 import: from AS2 7.7.7.2 at 7.7.7.1 action pref = 1; dpa = 5;
1720 from AS2 action pref = 2;
1721 accept AS4
1722
1723 It is also possible that more than one policy expression can cover
1724 the same set of routes for the same peering. For example:
1725
1726 aut-num: AS1
1727 import: from AS2 action pref = 2; accept AS4
1728 import: from AS2 action pref = 1; accept AS4
1729
1730 In this case, the specification-order rule is still used. That is,
1731 AS4's routes are accepted from AS2 with preference 2. If the filters
1732 were overlapping but not exactly the same:
1733
1734
1735
1736
1737
1738Alaettinoglu, et al. Standards Track [Page 31]
1739
1740RFC 2622 RPSL June 1999
1741
1742
1743 aut-num: AS1
1744 import: from AS2 action pref = 2; accept AS4
1745 import: from AS2 action pref = 1; accept AS4 OR AS5
1746
1747 the AS4's routes are accepted from AS2 with preference 2 and however
1748 AS5's routes are also accepted, but with preference 1.
1749
1750 We next give the general specification order rule for the benefit of
1751 the RPSL implementors. Consider two policy expressions:
1752
1753 aut-num: AS1
1754 import: from peerings-1 action action-1 accept filter-1
1755 import: from peerings-2 action action-2 accept filter-2
1756
1757 The above policy expressions are equivalent to the following three
1758 expressions where there is no ambiguity:
1759
1760 aut-num: AS1
1761 import: from peerings-1 action action-1 accept filter-1
1762 import: from peerings-3 action action-2 accept filter-2 AND NOT filter-1
1763 import: from peerings-4 action action-2 accept filter-2
1764
1765 where peerings-3 are those that are covered by both peerings-1 and
1766 peerings-2, and peerings-4 are those that are covered by peerings-2
1767 but not by peerings-1 ("filter-2 AND NOT filter-1" matches the routes
1768 that are matched by filter-2 but not by filter-1).
1769
1770 Example:
1771
1772 aut-num: AS1
1773 import: from AS2 7.7.7.2 at 7.7.7.1
1774 action pref = 2;
1775 accept {128.9.0.0/16}
1776 import: from AS2
1777 action pref = 1;
1778 accept {128.9.0.0/16, 75.0.0.0/8}
1779
1780 Lets consider two peerings with AS2, 7.7.7.1-7.7.7.2 and 9.9.9.1-
1781 9.9.9.2. Both policy expressions cover 7.7.7.1-7.7.7.2. On this
1782 peering, the route 128.9.0.0/16 is accepted with preference 2, and
1783 the route 75.0.0.0/8 is accepted with preference 1. The peering
1784 9.9.9.1-9.9.9.2 is only covered by the second policy expressions.
1785 Hence, both the route 128.9.0.0/16 and the route 75.0.0.0/8 are
1786 accepted with preference 1 on peering 9.9.9.1-9.9.9.2.
1787
1788 Note that the same ambiguity resolution rules also apply to export
1789 and default policy expressions.
1790
1791
1792
1793
1794Alaettinoglu, et al. Standards Track [Page 32]
1795
1796RFC 2622 RPSL June 1999
1797
1798
17996.5 default Attribute: Default Policy Specification
1800
1801 Default routing policies are specified using the default attribute.
1802 The default attribute has the following syntax:
1803
1804 default: to <peering> [action <action>] [networks <filter>]
1805
1806 The <action> and <filter> specifications are optional. The semantics
1807 are as follows: The <peering> specification indicates the AS (and
1808 the router if present) is being defaulted to; the <action>
1809 specification, if present, indicates various attributes of
1810 defaulting, for example a relative preference if multiple defaults
1811 are specified; and the <filter> specifications, if present, is a
1812 policy filter. A router only uses the default policy if it received
1813 the routes matched by <filter> from this peer.
1814
1815 In the following example, AS1 defaults to AS2 for routing.
1816
1817 aut-num: AS1
1818 default: to AS2
1819
1820 In the following example, router 7.7.7.1 in AS1 defaults to router
1821 7.7.7.2 in AS2.
1822
1823 aut-num: AS1
1824 default: to AS2 7.7.7.2 at 7.7.7.1
1825
1826 In the following example, AS1 defaults to AS2 and AS3, but prefers
1827 AS2 over AS3.
1828
1829 aut-num: AS1
1830 default: to AS2 action pref = 1;
1831 default: to AS3 action pref = 2;
1832
1833 In the following example, AS1 defaults to AS2 and uses 128.9.0.0/16
1834 as the default network.
1835
1836 aut-num: AS1
1837 default: to AS2 networks { 128.9.0.0/16 }
1838
18396.6 Structured Policy Specification
1840
1841 The import and export policies can be structured. We only reccomend
1842 structured policies to advanced RPSL users. Please feel free to skip
1843 this section.
1844
1845 The syntax for a structured policy specification is the following:
1846
1847
1848
1849
1850Alaettinoglu, et al. Standards Track [Page 33]
1851
1852RFC 2622 RPSL June 1999
1853
1854
1855 <import-factor> ::= from <peering-1> [action <action-1>]
1856 . . .
1857 from <peering-N> [action <action-N>]
1858 accept <filter>;
1859
1860 <import-term> ::= <import-factor> |
1861 LEFT-BRACE
1862 <import-factor>
1863 . . .
1864 <import-factor>
1865 RIGHT-BRACE
1866
1867 <import-expression> ::= <import-term> |
1868 <import-term> EXCEPT <import-expression> |
1869 <import-term> REFINE <import-expression>
1870
1871 import: [protocol <protocol1>] [into <protocol2>]
1872 <import-expression>
1873
1874 Please note the semicolon at the end of an <import-factor>. If the
1875 policy specification is not structured (as in all the examples in
1876 other sections), this semicolon is optional. The syntax and
1877 semantics for an <import-factor> is already defined in Section 6.1.
1878
1879 An <import-term> is either a sequence of <import-factor>'s enclosed
1880 within matching braces (i.e. `{' and `}') or just a single <import-
1881 factor>. The semantics of an <import-term> is the union of <import-
1882 factor>'s using the specification order rule. An <import-expression>
1883 is either a single <import-term> or an <import-term> followed by one
1884 of the keywords "except" and "refine", followed by another <import-
1885 expression>. Note that our definition allows nested expressions.
1886 Hence there can be exceptions to exceptions, refinements to
1887 refinements, or even refinements to exceptions, and so on.
1888
1889 The semantics for the except operator is as follows: The result of an
1890 except operation is another <import-term>. The resulting policy set
1891 contains the policies of the right hand side but their filters are
1892 modified to only include the routes also matched by the left hand
1893 side. The policies of the left hand side are included afterwards and
1894 their filters are modified to exclude the routes matched by the right
1895 hand side. Please note that the filters are modified during this
1896 process but the actions are copied verbatim. When there are multiple
1897 levels of nesting, the operations (both except and refine) are
1898 performed right to left.
1899
1900
1901
1902
1903
1904
1905
1906Alaettinoglu, et al. Standards Track [Page 34]
1907
1908RFC 2622 RPSL June 1999
1909
1910
1911 Consider the following example:
1912
1913 import: from AS1 action pref = 1; accept as-foo;
1914 except {
1915 from AS2 action pref = 2; accept AS226;
1916 except {
1917 from AS3 action pref = 3; accept {128.9.0.0/16};
1918 }
1919 }
1920
1921 where the route 128.9.0.0/16 is originated by AS226, and AS226 is a
1922 member of the as set as-foo. In this example, the route 128.9.0.0/16
1923 is accepted from AS3, any other route (not 128.9.0.0/16) originated
1924 by AS226 is accepted from AS2, and any other ASes' routes in as-foo
1925 is accepted from AS1.
1926
1927 We can come to the same conclusion using the algebra defined above.
1928 Consider the inner exception specification:
1929
1930 from AS2 action pref = 2; accept AS226;
1931 except {
1932 from AS3 action pref = 3; accept {128.9.0.0/16};
1933 }
1934
1935
1936 is equivalent to
1937
1938
1939 {
1940 from AS3 action pref = 3; accept AS226 AND {128.9.0.0/16};
1941 from AS2 action pref = 2; accept AS226 AND NOT {128.9.0.0/16};
1942 }
1943
1944
1945 Hence, the original expression is equivalent to:
1946
1947
1948 import: from AS1 action pref = 1; accept as-foo;
1949 except {
1950 from AS3 action pref = 3; accept AS226 AND {128.9.0.0/16};
1951 from AS2 action pref = 2; accept AS226 AND NOT {128.9.0.0/16};
1952 }
1953
1954
1955 which is equivalent to
1956
1957
1958import: {
1959
1960
1961
1962Alaettinoglu, et al. Standards Track [Page 35]
1963
1964RFC 2622 RPSL June 1999
1965
1966
1967 from AS3 action pref = 3;
1968 accept as-foo AND AS226 AND {128.9.0.0/16};
1969 from AS2 action pref = 2;
1970 accept as-foo AND AS226 AND NOT {128.9.0.0/16};
1971 from AS1 action pref = 1;
1972 accept as-foo AND NOT
1973 (AS226 AND NOT {128.9.0.0/16} OR AS226 AND {128.9.0.0/16});
1974 }
1975
1976
1977 Since AS226 is in as-foo and 128.9.0.0/16 is in AS226, it simplifies
1978 to:
1979
1980
1981import: {
1982 from AS3 action pref = 3; accept {128.9.0.0/16};
1983 from AS2 action pref = 2; accept AS226 AND NOT {128.9.0.0/16};
1984 from AS1 action pref = 1; accept as-foo AND NOT AS226;
1985 }
1986
1987 In the case of the refine operator, the resulting set is constructed
1988 by taking the cartasian product of the two sides as follows: for
1989 each policy l in the left hand side and for each policy r in the
1990 right hand side, the peerings of the resulting policy are the
1991 peerings common to both r and l; the filter of the resulting policy
1992 is the intersection of l's filter and r's filter; and action of the
1993 resulting policy is l's action followed by r's action. If there are
1994 no common peerings, or if the intersection of filters is empty, a
1995 resulting policy is not generated.
1996
1997 Consider the following example:
1998
1999 import: { from AS-ANY action pref = 1; accept community(3560:10);
2000 from AS-ANY action pref = 2; accept community(3560:20);
2001 } refine {
2002 from AS1 accept AS1;
2003 from AS2 accept AS2;
2004 from AS3 accept AS3;
2005 }
2006
2007 Here, any route with community 3560:10 is assigned a preference of 1
2008 and any route with community 3560:20 is assigned a preference of 2
2009 regardless of whom they are imported from. However, only AS1's
2010 routes are imported from AS1, and only AS2's routes are imported from
2011 AS2, and only AS3's routes are imported form AS3, and no routes are
2012 imported from any other AS. We can reach the same conclusion using
2013 the above algebra. That is, our example is equivalent to:
2014
2015
2016
2017
2018Alaettinoglu, et al. Standards Track [Page 36]
2019
2020RFC 2622 RPSL June 1999
2021
2022
2023 import: {
2024 from AS1 action pref = 1; accept community(3560:10) AND AS1;
2025 from AS1 action pref = 2; accept community(3560:20) AND AS1;
2026 from AS2 action pref = 1; accept community(3560:10) AND AS2;
2027 from AS2 action pref = 2; accept community(3560:20) AND AS2;
2028 from AS3 action pref = 1; accept community(3560:10) AND AS3;
2029 from AS3 action pref = 2; accept community(3560:20) AND AS3;
2030 }
2031
2032 Note that the common peerings between "from AS1" and "from AS-ANY"
2033 are those peerings in "from AS1". Even though we do not formally
2034 define "common peerings", it is straight forward to deduce the
2035 definition from the definitions of peerings (please see Section 5.6).
2036
2037 Consider the following example:
2038
2039 import: {
2040 from AS-ANY action med = 0; accept {0.0.0.0/0^0-18};
2041 } refine {
2042 from AS1 at 7.7.7.1 action pref = 1; accept AS1;
2043 from AS1 action pref = 2; accept AS1;
2044 }
2045
2046 where only routes of length 0 to 18 are accepted and med's value is
2047 set to 0 to disable med's effect for all peerings; In addition, from
2048 AS1 only AS1's routes are imported, and AS1's routes imported at
2049 7.7.7.1 are preferred over other peerings. This is equivalent to:
2050
2051 import: {
2052 from AS1 at 7.7.7.1 action med=0; pref=1; accept {0.0.0.0/0^0-
205318} AND AS1;
2054 from AS1 action med=0; pref=2; accept {0.0.0.0/0^0-
205518} AND AS1;
2056 }
2057
2058 The above syntax and semantics also apply equally to structured
2059 export policies with "from" replaced with "to" and "accept" is
2060 replaced with "announce".
2061
20627 dictionary Class
2063
2064 The dictionary class provides extensibility to RPSL. Dictionary
2065 objects define routing policy attributes, types, and routing
2066 protocols. Routing policy attributes, henceforth called rp-
2067 attributes, may correspond to actual protocol attributes, such as the
2068 BGP path attributes (e.g. community, dpa, and AS-path), or they may
2069 correspond to router features (e.g. BGP route flap damping). As new
2070 protocols, new protocol attributes, or new router features are
2071
2072
2073
2074Alaettinoglu, et al. Standards Track [Page 37]
2075
2076RFC 2622 RPSL June 1999
2077
2078
2079 introduced, the dictionary object is updated to include appropriate
2080 rp-attribute and protocol definitions.
2081
2082 An rp-attribute is an abstract class; that is a data representation
2083 is not available. Instead, they are accessed through access methods.
2084 For example, the rp-attribute for the BGP AS-path attribute is called
2085 aspath; and it has an access method called prepend which stuffs extra
2086 AS numbers to the AS-path attributes. Access methods can take
2087 arguments. Arguments are strongly typed. For example, the method
2088 prepend above takes AS numbers as arguments.
2089
2090 Once an rp-attribute is defined in the dictionary, it can be used to
2091 describe policy filters and actions. Policy analysis tools are
2092 required to fetch the dictionary object and recognize newly defined
2093 rp-attributes, types, and protocols. The analysis tools may
2094 approximate policy analyses on rp-attributes that they do not
2095 understand: a filter method may always match, and an action method
2096 may always perform no-operation. Analysis tools may even download
2097 code to perform appropriate operations using mechanisms outside the
2098 scope of RPSL.
2099
2100 We next describe the syntax and semantics of the dictionary class.
2101 This description is not essential for understanding dictionary
2102 objects (but it is essential for creating one). Please feel free to
2103 skip to the RPSL Initial Dictionary subsection (Section 7.1).
2104
2105 The attributes of the dictionary class are shown in Figure 24. The
2106 dictionary attribute is the name of the dictionary object, obeying
2107 the RPSL naming rules. There can be many dictionary objects, however
2108 there is always one well-known dictionary object "RPSL". All tools
2109 use this dictionary by default.
2110
2111 Attribute Value Type
2112 dictionary <object-name> mandatory, single-valued,
2113 class key
2114 rp-attribute see description in text optional, multi valued
2115 typedef see description in text optional, multi valued
2116 protocol see description in text optional, multi valued
2117
2118 Figure 24: dictionary Class Attributes
2119
2120 The rp-attribute attribute has the following syntax:
2121
2122 rp-attribute: <name>
2123 <method-1>(<type-1-1>, ..., <type-1-N1> [, "..."])
2124 ...
2125 <method-M>(<type-M-1>, ..., <type-M-NM> [, "..."])
2126
2127
2128
2129
2130Alaettinoglu, et al. Standards Track [Page 38]
2131
2132RFC 2622 RPSL June 1999
2133
2134
2135 where <name> is the name of the rp-attribute; and <method-i> is the
2136 name of an access method for the rp-attribute, taking Ni arguments
2137 where the j-th argument is of type <type-i-j>. A method name is
2138 either an RPSL name or one of the operators defined in Figure 25.
2139 The operator methods with the exception of operator() and operator[]
2140 can take only one argument.
2141
2142 operator= operator==
2143 operator<<= operator<
2144 operator>>= operator>
2145 operator+= operator>=
2146 operator-= operator<=
2147 operator*= operator!=
2148 operator/= operator()
2149 operator.= operator[]
2150
2151
2152 Figure 25: Operators
2153
2154 An rp-attribute can have many methods defined for it. Some of the
2155 methods may even have the same name, in which case their arguments
2156 are of different types. If the argument list is followed by "...",
2157 the method takes a variable number of arguments. In this case, the
2158 actual arguments after the Nth argument are of type <type-N>.
2159
2160 Arguments are strongly typed. A <type> in RPSL is either a
2161 predefined type, a union type, a list type, or a dictionary defined
2162 type. The predefined types are listed in Figure 26.
2163
2164 integer[lower, upper] ipv4_address
2165 real[lower, upper] address_prefix
2166 enum[name, name, ...] address_prefix_range
2167 string dns_name
2168 boolean filter
2169 rpsl_word as_set_name
2170 free_text route_set_name
2171 email rtr_set_name
2172 as_number filter_set_name
2173 peering_set_name
2174
2175
2176 Figure 26: Predefined Types
2177
2178 The integer and the real predefined types can be followed by a lower
2179 and an upper bound to specify the set of valid values of the
2180 argument. The range specification is optional. We use the ANSI C
2181 language conventions for representing integer, real and string
2182 values. The enum type is followed by a list of RPSL names which are
2183
2184
2185
2186Alaettinoglu, et al. Standards Track [Page 39]
2187
2188RFC 2622 RPSL June 1999
2189
2190
2191 the valid values of the type. The boolean type can take the values
2192 true or false. as_number, ipv4_address, address_prefix and dns_name
2193 types are as in Section 2. filter type is a policy filter as in
2194 Section 6. The value of filter type is suggested to be enclosed in
2195 parenthesis.
2196
2197 The syntax of a union type is as follows:
2198
2199 union <type-1>, ... , <type-N>
2200
2201 where <type-i> is an RPSL type. The union type is either of the
2202 types <type-1> through <type-N> (analogous to unions in C[14]).
2203
2204 The syntax of a list type is as follows:
2205
2206 list [<min_elems>:<max_elems>] of <type>
2207
2208 In this case, the list elements are of <type> and the list contains
2209 at least <min_elems> and at most <max_elems> elements. The size
2210 specification is optional. If it is not specified, there is no
2211 restriction in the number of list elements. A value of a list type
2212 is represented as a sequence of elements separated by the character
2213 "," and enclosed by the characters "{" and "}".
2214
2215 The typedef attribute in the dictionary defines named types as
2216 follows:
2217
2218 typedef: <name> <type>
2219
2220 where <name> is a name for type <type>. typedef attribute is
2221 paticularly useful when the type defined is not a predefined type
2222 (e.g. list of unions, list of lists, etc.).
2223
2224 A protocol attribute of the dictionary class defines a protocol and a
2225 set of peering parameters for that protocol (which are used in inet-
2226 rtr class in Section 9). Its syntax is as follows:
2227
2228 protocol: <name>
2229 MANDATORY | OPTIONAL <parameter-1>(<type-1-1>,...,
2230 <type-1-N1> [,"..."])
2231 ...
2232 MANDATORY | OPTIONAL <parameter-M>(<type-M-1>,...,
2233 <type-M-NM> [,"..."])
2234
2235 where <name> is the name of the protocol; MANDATORY and OPTIONAL are
2236 keywords; and <parameter-i> is a peering parameter for this protocol,
2237 taking Ni many arguments. The syntax and semantics of the arguments
2238 are as in the rp-attribute. If the keyword MANDATORY is used, the
2239
2240
2241
2242Alaettinoglu, et al. Standards Track [Page 40]
2243
2244RFC 2622 RPSL June 1999
2245
2246
2247 parameter is mandatory and needs to be specified for each peering of
2248 this protocol. If the keyword OPTIONAL is used, the parameter can be
2249 skipped.
2250
22517.1 Initial RPSL Dictionary and Example Policy Actions and Filters
2252
2253dictionary: RPSL
2254rp-attribute: # preference, smaller values represent higher preferences
2255 pref
2256 operator=(integer[0, 65535])
2257rp-attribute: # BGP multi_exit_discriminator attribute
2258 med
2259 # to set med to 10: med = 10;
2260 # to set med to the IGP metric: med = igp_cost;
2261 operator=(union integer[0, 65535], enum[igp_cost])
2262rp-attribute: # BGP destination preference attribute (dpa)
2263 dpa
2264 operator=(integer[0, 65535])
2265rp-attribute: # BGP aspath attribute
2266 aspath
2267 # prepends AS numbers from last to first order
2268 prepend(as_number, ...)
2269typedef: # a community value in RPSL is either
2270 # - a 4 byte integer (ok to use 3561:70 notation)
2271 # - internet, no_export, no_advertise (see RFC-1997)
2272 community_elm union
2273 integer[1, 4294967295],
2274 enum[internet, no_export, no_advertise],
2275typedef: # list of community values { 40, no_export, 3561:70 }
2276 community_list list of community_elm
2277rp-attribute: # BGP community attribute
2278 community
2279 # set to a list of communities
2280 operator=(community_list)
2281 # append community values
2282 operator.=(community_list)
2283 append(community_elm, ...)
2284 # delete community values
2285 delete(community_elm, ...)
2286 # a filter: true if one of community values is contained
2287 contains(community_elm, ...)
2288 # shortcut to contains: community(no_export, 3561:70)
2289 operator()(community_elm, ...)
2290 # order independent equality comparison
2291 operator==(community_list)
2292rp-attribute: # next hop router in a static route
2293 next-hop
2294 # to set to 7.7.7.7: next-hop = 7.7.7.7;
2295
2296
2297
2298Alaettinoglu, et al. Standards Track [Page 41]
2299
2300RFC 2622 RPSL June 1999
2301
2302
2303 # to set to router's own address: next-hop = self;
2304 operator=(union ipv4_address, enum[self])
2305rp-attribute: # cost of a static route
2306 cost
2307 operator=(integer[0, 65535])
2308protocol: BGP4
2309 # as number of the peer router
2310 MANDATORY asno(as_number)
2311 # enable flap damping
2312 OPTIONAL flap_damp()
2313 OPTIONAL flap_damp(integer[0,65535],
2314 # penalty per flap
2315 integer[0,65535],
2316 # penalty value for supression
2317 integer[0,65535],
2318 # penalty value for reuse
2319 integer[0,65535],
2320 # halflife in secs when up
2321 integer[0,65535],
2322 # halflife in secs when down
2323 integer[0,65535])
2324 # maximum penalty
2325protocol: OSPF
2326protocol: RIP
2327protocol: IGRP
2328protocol: IS-IS
2329protocol: STATIC
2330protocol: RIPng
2331protocol: DVMRP
2332protocol: PIM-DM
2333protocol: PIM-SM
2334protocol: CBT
2335protocol: MOSPF
2336
2337
2338 Figure 27: RPSL Dictionary
2339
2340 Figure 27 shows the initial RPSL dictionary. It has seven rp-
2341 attributes: pref to assign local preference to the routes accepted;
2342 med to assign a value to the MULTI_EXIT_DISCRIMINATOR BGP attribute;
2343 dpa to assign a value to the DPA BGP attribute; aspath to prepend a
2344 value to the AS_PATH BGP attribute; community to assign a value to or
2345 to check the value of the community BGP attribute; next-hop to assign
2346 next hop routers to static routes; and cost to assign a cost to
2347 static routes. The dictionary defines two types: community_elm and
2348 community_list. community_elm type is either a 4-byte unsigned
2349 integer, or one of the keywords internet, no_export or no_advertise
2350 (defined in [9]). An integer can be specified using two 2-byte
2351
2352
2353
2354Alaettinoglu, et al. Standards Track [Page 42]
2355
2356RFC 2622 RPSL June 1999
2357
2358
2359 integers seperated by ":" to partition the community number space so
2360 that a provider can use its AS number as the first two bytes, and
2361 assigns a semantics of its choice to the last two bytes.
2362
2363 The initial dictionary (Figure 27) defines only options for the
2364 Border Gateway Protocol: asno and flap_damp. The mandatory asno
2365 option is the AS number of the peer router. The optional flap_damp
2366 option instructs the router to damp route flaps [21] when importing
2367 routes from the peer router.
2368
2369 It can be specified with or without parameters. If parameters are
2370 missing, they default to:
2371
2372 flap_damp(1000, 2000, 750, 900, 900, 20000)
2373
2374 That is, a penalty of 1000 is assigned at each route flap, the route
2375 is suppressed when penalty reaches 2000. The penalty is reduced in
2376 half after 15 minutes (900 seconds) of stability regardless of
2377 whether the route is up or down. A supressed route is reused when
2378 the penalty falls below 750. The maximum penalty a route can be
2379 assigned is 20,000 (i.e. the maximum suppress time after a route
2380 becomes stable is about 75 minutes). These parameters are consistent
2381 with the default flap damping parameters in several routers.
2382
2383Policy Actions and Filters Using RP-Attributes
2384
2385 The syntax of a policy action or a filter using an rp-attribute x is
2386 as follows:
2387
2388 x.method(arguments)
2389 x "op" argument
2390
2391 where method is a method and "op" is an operator method of the rp-
2392 attribute x. If an operator method is used in specifying a composite
2393 policy filter, it evaluates earlier than the composite policy filter
2394 operators (i.e. AND, OR, NOT, and implicit or operator).
2395
2396 The pref rp-attribute can be assigned a positive integer as follows:
2397
2398 pref = 10;
2399
2400 The med rp-attribute can be assigned either a positive integer or the
2401 word "igp_cost" as follows:
2402
2403 med = 0;
2404 med = igp_cost;
2405
2406 The dpa rp-attribute can be assigned a positive integer as follows:
2407
2408
2409
2410Alaettinoglu, et al. Standards Track [Page 43]
2411
2412RFC 2622 RPSL June 1999
2413
2414
2415 dpa = 100;
2416
2417 The BGP community attribute is list-valued, that is it is a list of
2418 4-byte integers each representing a "community". The following
2419 examples demonstrate how to add communities to this rp-attribute:
2420
2421 community .= { 100 };
2422 community .= { NO_EXPORT };
2423 community .= { 3561:10 };
2424
2425 In the last case, a 4-byte integer is constructed where the more
2426 significant two bytes equal 3561 and the less significant two bytes
2427 equal 10. The following examples demonstrate how to delete
2428 communities from the community rp-attribute:
2429
2430 community.delete(100, NO_EXPORT, 3561:10);
2431
2432 Filters that use the community rp-attribute can be defined as
2433 demonstrated by the following examples:
2434
2435 community.contains(100, NO_EXPORT, 3561:10);
2436 community(100, NO_EXPORT, 3561:10); # shortcut
2437
2438 The community rp-attribute can be set to a list of communities as
2439 follows:
2440
2441 community = {100, NO_EXPORT, 3561:10, 200};
2442 community = {};
2443
2444 In this first case, the community rp-attribute contains the
2445 communities 100, NO_EXPORT, 3561:10, and 200. In the latter case,
2446 the community rp-attribute is cleared. The community rp-attribute
2447 can be compared against a list of communities as follows:
2448
2449 community == {100, NO_EXPORT, 3561:10, 200}; # exact match
2450
2451 To influence the route selection, the BGP as_path rp-attribute can be
2452 made longer by prepending AS numbers to it as follows:
2453
2454 aspath.prepend(AS1);
2455 aspath.prepend(AS1, AS1, AS1);
2456
2457 The following examples are invalid:
2458
2459 med = -50; # -50 is not in the range
2460 med = igp; # igp is not one of the enum values
2461 med.assign(10); # method assign is not defined
2462 community.append(AS3561:20); # the first argument should be 3561
2463
2464
2465
2466Alaettinoglu, et al. Standards Track [Page 44]
2467
2468RFC 2622 RPSL June 1999
2469
2470
2471 Figure 28 shows a more advanced example using the rp-attribute
2472 community. In this example, AS3561 bases its route selection
2473 preference on the community attribute. Other ASes may indirectly
2474 affect AS3561's route selection by including the appropriate
2475 communities in their route announcements.
2476
2477 aut-num: AS1
2478 export: to AS2 action community.={3561:90};
2479 to AS3 action community.={3561:80};
2480 announce AS1
2481
2482 as-set: AS3561:AS-PEERS
2483 members: AS2, AS3
2484
2485 aut-num: AS3561
2486 import: from AS3561:AS-PEERS
2487 action pref = 10;
2488 accept community(3561:90)
2489 import: from AS3561:AS-PEERS
2490 action pref = 20;
2491 accept community(3561:80)
2492 import: from AS3561:AS-PEERS
2493 action pref = 20;
2494 accept community(3561:70)
2495 import: from AS3561:AS-PEERS
2496 action pref = 0;
2497 accept ANY
2498
2499
2500 Figure 28: Policy example using the community rp-attribute.
2501
25028 Advanced route Class
2503
25048.1 Specifying Aggregate Routes
2505
2506 The components, aggr-bndry, aggr-mtd, export-comps, inject, and holes
2507 attributes are used for specifying aggregate routes [11]. A route
2508 object specifies an aggregate route if any of these attributes, with
2509 the exception of inject, is specified. The origin attribute for an
2510 aggregate route is the AS performing the aggregation, i.e. the
2511 aggregator AS. In this section, we used the term "aggregate" to refer
2512 to the route generated, the term "component" to refer to the routes
2513 used to generate the path attributes of the aggregate, and the term
2514 "more specifics" to refer to any route which is a more specific of
2515 the aggregate regardless of whether it was used to form the path
2516 attributes.
2517
2518
2519
2520
2521
2522Alaettinoglu, et al. Standards Track [Page 45]
2523
2524RFC 2622 RPSL June 1999
2525
2526
2527 The components attribute defines what component routes are used to
2528 form the aggregate. Its syntax is as follows:
2529
2530 components: [ATOMIC] [[<filter>] [protocol <protocol> <filter> ...]]
2531
2532 where <protocol> is a routing protocol name such as BGP4, OSPF or RIP
2533 (valid names are defined in the dictionary) and <filter> is a policy
2534 expression. The routes that match one of these filters and are
2535 learned from the corresponding protocol are used to form the
2536 aggregate. If <protocol> is omitted, it defaults to any protocol.
2537 <filter> implicitly contains an "AND" term with the more specifics of
2538 the aggregate so that only the component routes are selected. If the
2539 keyword ATOMIC is used, the aggregation is done atomically [11]. If
2540 a <filter> is not specified it defaults to more specifics. If the
2541 components attribute is missing, all more specifics without the
2542 ATOMIC keyword is used.
2543
2544 route: 128.8.0.0/15
2545 origin: AS1
2546 components: <^AS2>
2547
2548 route: 128.8.0.0/15
2549 origin: AS1
2550 components: protocol BGP4 {128.8.0.0/16^+}
2551 protocol OSPF {128.9.0.0/16^+}
2552
2553
2554 Figure 29: Two aggregate route objects.
2555
2556 Figure 29 shows two route objects. In the first example, more
2557 specifics of 128.8.0.0/15 with AS paths starting with AS2 are
2558 aggregated. In the second example, some routes learned from BGP and
2559 some routes learned form OSPF are aggregated.
2560
2561 The aggr-bndry attribute is an AS expression over AS numbers and sets
2562 (see Section 5.6). The result defines the set of ASes which form the
2563 aggregation boundary. If the aggr-bndry attribute is missing, the
2564 origin AS is the sole aggregation boundary. Outside the aggregation
2565 boundary, only the aggregate is exported and more specifics are
2566 suppressed. However, within the boundary, the more specifics are
2567 also exchanged.
2568
2569 The aggr-mtd attribute specifies how the aggregate is generated. Its
2570 syntax is as follows:
2571
2572 aggr-mtd: inbound
2573 | outbound [<as-expression>]
2574
2575
2576
2577
2578Alaettinoglu, et al. Standards Track [Page 46]
2579
2580RFC 2622 RPSL June 1999
2581
2582
2583 where <as-expression> is an expression over AS numbers and sets (see
2584 Section 5.6). If <as-expression> is missing, it defaults to AS-ANY.
2585 If outbound aggregation is specified, the more specifics of the
2586 aggregate will be present within the AS and the aggregate will be
2587 formed at all inter-AS boundaries with ASes in <as-expression> before
2588 export, except for ASes that are within the aggregating boundary
2589 (i.e. aggr-bndry is enforced regardless of <as-expression>). If
2590 inbound aggregation is specified, the aggregate is formed at all
2591 inter-AS boundaries prior to importing routes into the aggregator AS.
2592 Note that <as-expression> can not be specified with inbound
2593 aggregation. If aggr-mtd attribute is missing, it defaults to
2594 "outbound AS-ANY".
2595
2596 route: 128.8.0.0/15 route: 128.8.0.0/15
2597 origin: AS1 origin: AS2
2598 components: {128.8.0.0/15^-} components: {128.8.0.0/15^-}
2599 aggr-bndry: AS1 OR AS2 aggr-bndry: AS1 OR AS2
2600 aggr-mtd: outbound AS-ANY aggr-mtd: outbound AS-ANY
2601
2602
2603 Figure 30: Outbound multi-AS aggregation example.
2604
2605 Figure 30 shows an example of an outbound aggregation. In this
2606 example, AS1 and AS2 are coordinating aggregation and announcing only
2607 the less specific 128.8.0.0/15 to outside world, but exchanging more
2608 specifics between each other. This form of aggregation is useful
2609 when some of the components are within AS1 and some are within AS2.
2610
2611 When a set of routes are aggregated, the intent is to export only the
2612 aggregate route and suppress exporting of the more specifics outside
2613 the aggregation boundary. However, to satisfy certain policy and
2614 topology constraints (e.g. a multi-homed component), it is often
2615 required to export some of the components. The export-comps
2616 attribute equals an RPSL filter that matches the more specifics that
2617 need to be exported outside the aggregation boundary. If this
2618 attribute is missing, more specifics are not exported outside the
2619 aggregation boundary. Note that, the export-comps filter contains an
2620 implicit "AND" term with the more specifics of the aggregate.
2621
2622 Figure 31 shows an example of an outbound aggregation. In this
2623 example, the more specific 128.8.8.0/24 is exported outside AS1 in
2624 addition to the aggregate. This is useful, when 128.8.8.0/24 is
2625 multi-homed site to AS1 with some other AS.
2626
2627
2628
2629
2630
2631
2632
2633
2634Alaettinoglu, et al. Standards Track [Page 47]
2635
2636RFC 2622 RPSL June 1999
2637
2638
2639 route: 128.8.0.0/15
2640 origin: AS1
2641 components: {128.8.0.0/15^-}
2642 aggr-mtd: outbound AS-ANY
2643 export-comps: {128.8.8.0/24}
2644
2645
2646 Figure 31: Outbound aggregation with export exception.
2647
2648 The inject attribute specifies which routers perform the aggregation
2649 and when they perform it. Its syntax is as follow:
2650
2651 inject: [at <router-expression>] ...
2652 [action <action>]
2653 [upon <condition>]
2654
2655 where <action> is an action specification (see Section 6.1.1),
2656 <condition> is a boolean expression described below, and <router-
2657 expression> is as described in Section 5.6.
2658
2659 All routers in <router-expression> and in the aggregator AS perform
2660 the aggregation. If a <router-expression> is not specified, all
2661 routers inside the aggregator AS perform the aggregation. The
2662 <action> specification may set path attributes of the aggregate, such
2663 as assign a preferences to the aggregate.
2664
2665 The upon clause is a boolean condition. The aggregate is generated
2666 if and only if this condition is true. <condition> is a boolean
2667 expression using the logical operators AND and OR (i.e. operator NOT
2668 is not allowed) over:
2669
2670 HAVE-COMPONENTS { list of prefixes }
2671 EXCLUDE { list of prefixes }
2672 STATIC
2673
2674 The list of prefixes in HAVE-COMPONENTS can only be more specifics of
2675 the aggregate. It evaluates to true when all the prefixes listed are
2676 present in the routing table of the aggregating router. The list can
2677 also include prefix ranges (i.e. using operators ^-, ^+, ^n, and ^n-
2678 m). In this case, at least one prefix from each prefix range needs
2679 to be present in the routing table for the condition to be true. The
2680 list of prefixes in EXCLUDE can be arbitrary. It evaluates to true
2681 when none of the prefixes listed is present in the routing table.
2682 The list can also include prefix ranges, and no prefix in that range
2683 should be present in the routing table. The keyword static always
2684 evaluates to true. If no upon clause is specified the aggregate is
2685 generated if an only if there is a component in the routing table
2686 (i.e. a more specific that matches the filter in the components
2687
2688
2689
2690Alaettinoglu, et al. Standards Track [Page 48]
2691
2692RFC 2622 RPSL June 1999
2693
2694
2695 attribute).
2696
2697 route: 128.8.0.0/15
2698 origin: AS1
2699 components: {128.8.0.0/15^-}
2700 aggr-mtd: outbound AS-ANY
2701 inject: at 1.1.1.1 action dpa = 100;
2702 inject: at 1.1.1.2 action dpa = 110;
2703
2704 route: 128.8.0.0/15
2705 origin: AS1
2706 components: {128.8.0.0/15^-}
2707 aggr-mtd: outbound AS-ANY
2708 inject: upon HAVE-COMPONENTS {128.8.0.0/16, 128.9.0.0/16}
2709 holes: 128.8.8.0/24
2710
2711
2712 Figure 32: Examples of inject.
2713
2714 Figure 32 shows two examples. In the first case, the aggregate is
2715 injected at two routers each one setting the dpa path attribute
2716 differently. In the second case, the aggregate is generated only if
2717 both 128.8.0.0/16 and 128.9.0.0/16 are present in the routing table,
2718 as opposed to the first case where the presence of just one of them
2719 is sufficient for injection.
2720
2721 The holes attribute lists the component address prefixes which are
2722 not reachable through the aggregate route (perhaps that part of the
2723 address space is unallocated). The holes attribute is useful for
2724 diagnosis purposes. In Figure 32, the second example has a hole,
2725 namely 128.8.8.0/24. This may be due to a customer changing
2726 providers and taking this part of the address space with it.
2727
27288.1.1 Interaction with policies in aut-num class
2729
2730 An aggregate formed is announced to other ASes only if the export
2731 policies of the AS allows exporting the aggregate. When the
2732 aggregate is formed, the more specifics are suppressed from being
2733 exported except to the ASes in aggr-bndry and except the components
2734 in export-comps. For such exceptions to happen, the export policies
2735 of the AS should explicitly allow exporting of these exceptions.
2736
2737 If an aggregate is not formed (due to the upon clause), then the more
2738 specifics of the aggregate can be exported to other ASes, but only if
2739 the export policies of the AS allows it. In other words, before a
2740 route (aggregate or more specific) is exported it is filtered twice,
2741 once based on the route objects, and once based on the export
2742 policies of the AS.
2743
2744
2745
2746Alaettinoglu, et al. Standards Track [Page 49]
2747
2748RFC 2622 RPSL June 1999
2749
2750
2751 route: 128.8.0.0/16
2752 origin: AS1
2753
2754 route: 128.9.0.0/16
2755 origin: AS1
2756
2757 route: 128.8.0.0/15
2758 origin: AS1
2759 aggr-bndry: AS1 or AS2 or AS3
2760 aggr-mtd: outbound AS3 or AS4 or AS5
2761 components: {128.8.0.0/16, 128.9.0.0/16}
2762 inject: upon HAVE-COMPONENTS {128.9.0.0/16, 128.8.0.0/16}
2763
2764 aut-num: AS1
2765 export: to AS2 announce AS1
2766 export: to AS3 announce AS1 and not {128.9.0.0/16}
2767 export: to AS4 announce AS1
2768 export: to AS5 announce AS1
2769 export: to AS6 announce AS1
2770
2771
2772 Figure 33: Interaction with policies in aut-num class.
2773
2774 In Figure 33 shows an interaction example. By examining the route
2775 objects, the more specifics 128.8.0.0/16 and 128.9.0.0/16 should be
2776 exchanged between AS1, AS2 and AS3 (i.e. the aggregation boundary).
2777 Outbound aggregation is done to AS4 and AS5 and not to AS3, since AS3
2778 is in the aggregation boundary. The aut-num object allows exporting
2779 both components to AS2, but only the component 128.8.0.0/16 to AS3.
2780 The aggregate can only be formed if both components are available.
2781 In this case, only the aggregate is announced to AS4 and AS5.
2782 However, if one of the components is not available the aggregate will
2783 not be formed, and any available component or more specific will be
2784 exported to AS4 and AS5. Regardless of aggregation is performed or
2785 not, only the more specifics will be exported to AS6 (it is not
2786 listed in the aggr-mtd attribute).
2787
2788 When doing an inbound aggregation, configuration generators may
2789 eliminating the aggregation statements on routers where import policy
2790 of the AS prohibits importing of any more specifics.
2791
27928.1.2 Ambiguity resolution with overlapping aggregates
2793
2794 When several aggregate routes are specified and they overlap, i.e.
2795 one is less specific of the other, they must be evaluated more
2796 specific to less specific order. When an outbound aggregation is
2797 performed for a peer, the aggregate and the components listed in the
2798 export-comps attribute for that peer are available for generating the
2799
2800
2801
2802Alaettinoglu, et al. Standards Track [Page 50]
2803
2804RFC 2622 RPSL June 1999
2805
2806
2807 next less specific aggregate. The components that are not specified
2808 in the export-comps attribute are not available. A route is
2809 exportable to an AS if it is the least specific aggregate exportable
2810 to that AS or it is listed in the export-comps attribute of an
2811 exportable route. Note that this is a recursive definition.
2812
2813 route: 128.8.0.0/15
2814 origin: AS1
2815 aggr-bndry: AS1 or AS2
2816 aggr-mtd: outbound
2817 inject: upon HAVE-COMPONENTS {128.8.0.0/16, 128.9.0.0/16}
2818
2819 route: 128.10.0.0/15
2820 origin: AS1
2821 aggr-bndry: AS1 or AS3
2822 aggr-mtd: outbound
2823 inject: upon HAVE-COMPONENTS {128.10.0.0/16, 128.11.0.0/16}
2824 export-comps: {128.11.0.0/16}
2825
2826 route: 128.8.0.0/14
2827 origin: AS1
2828 aggr-bndry: AS1 or AS2 or AS3
2829 aggr-mtd: outbound
2830 inject: upon HAVE-COMPONENTS {128.8.0.0/15, 128.10.0.0/15}
2831 export-comps: {128.10.0.0/15}
2832
2833
2834 Figure 34: Overlapping aggregations.
2835
2836 In Figure 34, AS1 together with AS2 aggregates 128.8.0.0/16 and
2837 128.9.0.0/16 into 128.8.0.0/15. Together with AS3, AS1 aggregates
2838 128.10.0.0/16 and 128.11.0.0/16 into 128.10.0.0/15. But altogether
2839 they aggregate these four routes into 128.8.0.0/14. Assuming all
2840 four components are available, a router in AS1 for an outside AS, say
2841 AS4, will first generate 128.8.0.0/15 and 128.10.0.0/15. This will
2842 make 128.8.0.0/15, 128.10.0.0/15 and its exception 128.11.0.0/16
2843 available for generating 128.8.0.0/14. The router will then generate
2844 128.8.0.0/14 from these three routes. Hence for AS4, 128.8.0.0/14
2845 and its exception 128.10.0.0/15 and its exception 128.11.0.0/16 will
2846 be exportable.
2847
2848 For AS2, a router in AS1 will only generate 128.10.0.0/15. Hence,
2849 128.10.0.0/15 and its exception 128.11.0.0/16 will be exportable.
2850 Note that 128.8.0.0/16 and 128.9.0.0/16 are also exportable since
2851 they did not participate in an aggregate exportable to AS2.
2852
2853
2854
2855
2856
2857
2858Alaettinoglu, et al. Standards Track [Page 51]
2859
2860RFC 2622 RPSL June 1999
2861
2862
2863 Similarly, for AS3, a router in AS1 will only generate 128.8.0.0/15.
2864 In this case 128.8.0.0/15, 128.10.0.0/16, 128.11.0.0/16 are
2865 exportable.
2866
28678.2 Specifying Static Routes
2868
2869 The inject attribute can be used to specify static routes by using
2870 "upon static" as the condition:
2871
2872 inject: [at <router-expression>] ...
2873 [action <action>]
2874 upon static
2875
2876 In this case, the routers in <router-expression> executes the
2877 <action> and injects the route to the interAS routing system
2878 statically. <action> may set certain route attributes such as a
2879 next-hop router or a cost.
2880
2881 In the following example, the router 7.7.7.1 injects the route
2882 128.7.0.0/16. The next-hop routers (in this example, there are two
2883 next-hop routers) for this route are 7.7.7.2 and 7.7.7.3 and the
2884 route has a cost of 10 over 7.7.7.2 and 20 over 7.7.7.3.
2885
2886 route: 128.7.0.0/16
2887 origin: AS1
2888 inject: at 7.7.7.1 action next-hop = 7.7.7.2; cost = 10; upon static
2889 inject: at 7.7.7.1 action next-hop = 7.7.7.3; cost = 20; upon static
2890
28919 inet-rtr Class
2892
2893Routers are specified using the inet-rtr class. The attributes of the
2894inet-rtr class are shown in Figure 35. The inet-rtr attribute is a valid
2895DNS name of the router described. Each alias attribute, if present, is a
2896canonical DNS name for the router. The local-as attribute specifies the AS
2897number of the AS which owns/operates this router.
2898
2899 Attribute Value Type
2900 inet-rtr <dns-name> mandatory, single-valued, class key
2901 alias <dns-name> optional, multi-valued
2902 local-as <as-number> mandatory, single-valued
2903 ifaddr see description in text mandatory, multi-valued
2904 peer see description in text optional, multi-valued
2905 member-of list of <rtr-set-names> optional, multi-valued
2906
2907
2908 Figure 35: inet-rtr Class Attributes
2909
2910
2911
2912
2913
2914Alaettinoglu, et al. Standards Track [Page 52]
2915
2916RFC 2622 RPSL June 1999
2917
2918
2919 The value of an ifaddr attribute has the following syntax:
2920
2921 <ipv4-address> masklen <integer> [action <action>]
2922
2923 The IP address and the mask length are mandatory for each interface.
2924 Optionally an action can be specified to set other parameters of this
2925 interface.
2926
2927 Figure 36 presents an example inet-rtr object. The name of the
2928 router is "amsterdam.ripe.net". "amsterdam1.ripe.net" is a canonical
2929 name for the router. The router is connected to 4 networks. Its IP
2930 addresses and mask lengths in those networks are specified in the
2931 ifaddr attributes.
2932
2933 inet-rtr: Amsterdam.ripe.net
2934 alias: amsterdam1.ripe.net
2935 local-as: AS3333
2936 ifaddr: 192.87.45.190 masklen 24
2937 ifaddr: 192.87.4.28 masklen 24
2938 ifaddr: 193.0.0.222 masklen 27
2939 ifaddr: 193.0.0.158 masklen 27
2940 peer: BGP4 192.87.45.195 asno(AS3334), flap_damp()
2941
2942
2943 Figure 36: inet-rtr Objects
2944
2945 Each peer attribute, if present, specifies a protocol peering with
2946 another router. The value of a peer attribute has the following
2947 syntax:
2948
2949 <protocol> <ipv4-address> <options>
2950 | <protocol> <inet-rtr-name> <options>
2951 | <protocol> <rtr-set-name> <options>
2952 | <protocol> <peering-set-name> <options>
2953
2954 where <protocol> is a protocol name, <ipv4-address> is the IP address
2955 of the peer router, and <options> is a comma separated list of
2956 peering options for <protocol>. Instead of the peer's IP address,
2957 its inet-rtr-name can be used. Possible protocol names and
2958 attributes are defined in the dictionary (please see Section 7). In
2959 the above example, the router has a BGP peering with the router
2960 192.87.45.195 in AS3334 and turns the flap damping on when importing
2961 routes from this router.
2962
2963 Instead of a single peer, a group of peers can be specified by using
2964 the <rtr-set-name> and <peering-set-name> forms. If <peering-set-
2965 name> form is being used only the peerings in the corresponding
2966 peering set that are with this router are included. Figure 37 shows
2967
2968
2969
2970Alaettinoglu, et al. Standards Track [Page 53]
2971
2972RFC 2622 RPSL June 1999
2973
2974
2975 an example inet-rtr object with peering groups.
2976
2977 rtr-set: rtrs-ibgp-peers
2978 members: 1.1.1.1, 2.2.2.2, 3.3.3.3
2979
2980 peering-set: prng-ebgp-peers
2981 peering: AS3334 192.87.45.195
2982 peering: AS3335 192.87.45.196
2983
2984 inet-rtr: Amsterdam.ripe.net
2985 alias: amsterdam1.ripe.net
2986 local-as: AS3333
2987 ifaddr: 192.87.45.190 masklen 24
2988 ifaddr: 192.87.4.28 masklen 24
2989 ifaddr: 193.0.0.222 masklen 27
2990 ifaddr: 193.0.0.158 masklen 27
2991 peer: BGP4 rtrs-ibgp-peers asno(AS3333), flap_damp()
2992 peer: BGP4 prng-ebgp-peers asno(PeerAS), flap_damp()
2993
2994
2995 Figure 37: inet-rtr Object with peering groups
2996
299710 Extending RPSL
2998
2999 Our experience with earlier routing policy languages and data formats
3000 (PRDB [2], RIPE-81 [8], and RIPE-181 [7]) taught us that RPSL had to
3001 be extensible. As a result, extensibility was a primary design goal
3002 for RPSL. New routing protocols or new features to existing routing
3003 protocols can be easily handled using RPSL's dictionary class. New
3004 classes or new attributes to the existing classes can also be added.
3005
3006 This section provides guidelines for extending RPSL. These guidelines
3007 are designed with an eye toward maintaining backward compatibility
3008 with existing tools and databases. We next list the available
3009 options for extending RPSL from the most preferred to the least
3010 preferred order.
3011
301210.1 Extensions by changing the dictionary class
3013
3014 The dictionary class is the primary mechanism provided to extend
3015 RPSL. Dictionary objects define routing policy attributes, types,
3016 and routing protocols.
3017
3018 We recommend updating the RPSL dictionary to include appropriate rp-
3019 attribute and protocol definitions as new path attributes or router
3020 features are introduced. For example, in an earlier version of the
3021 RPSL document, it was only possible to specify that a router performs
3022 route flap damping on a peer, but it was not possible to specify the
3023
3024
3025
3026Alaettinoglu, et al. Standards Track [Page 54]
3027
3028RFC 2622 RPSL June 1999
3029
3030
3031 parameters of route flap damping. Later the parameters were added by
3032 changing the dictionary.
3033
3034 When changing the dictionary, full compatibility should be
3035 maintained. For example, in our flap damping case, we made the
3036 parameter specification optional in case this level of detail was not
3037 desired by some ISPs. This also achieved compatibility. Any object
3038 registered without the parameters will continue to be valid. Any
3039 tool based on RPSL is expected to do a default action on routing
3040 policy attributes that they do not understand (e.g. issue a warning
3041 and otherwise ignore). Hence, old tools upon encountering a flap
3042 damping specification with parameters will ignore the parameters.
3043
304410.2 Extensions by adding new attributes to existing classes
3045
3046 New attributes can be added to any class. To ensure full
3047 compatibility, new attributes should not contradict the semantics of
3048 the objects they are attached to. Any tool that uses the IRR should
3049 be designed so that it ignores attributes that it doesn't understand.
3050 Most existing tools adhere to this design principle.
3051
3052 We recommend adding new attributes to existing classes when a new
3053 aspect of a class is discovered. For example, RPSL route class
3054 extends its RIPE-181 predecessor by including several new attributes
3055 that enable aggregate and static route specification.
3056
305710.3 Extensions by adding new classes
3058
3059 New classes can be added to RPSL to store new types of policy data.
3060 Providing full compatibility is straight forward as long as existing
3061 classes are still understood. Since a tool should only query the IRR
3062 for the classes that it understand, full compatibility should not be
3063 a problem in this case.
3064
3065 Before adding a new class, one should question if the information
3066 contained in the objects of the new class could have better belonged
3067 to some other class. For example, if the geographic location of a
3068 router needs to be stored in IRR, it may be tempting to add a new
3069 class called, say router-location class. However, the information
3070 better belongs to the inet-rtr class, perhaps in a new attribute
3071 called location.
3072
307310.4 Extensions by changing the syntax of existing RPSL attributes
3074
3075 If all of the methods described above fail to provide the desired
3076 extension, it may be necessary to change the syntax of RPSL. Any
3077 change in RPSL syntax must provide backwards compatibility, and
3078 should be considered only as a last resort since full compatibility
3079
3080
3081
3082Alaettinoglu, et al. Standards Track [Page 55]
3083
3084RFC 2622 RPSL June 1999
3085
3086
3087 may not be achievable. However, we require that the old syntax to be
3088 still valid.
3089
309011 Security Considerations
3091
3092 This document describes RPSL, a language for expressing routing
3093 policies. The language defines a maintainer (mntner class) object
3094 which is the entity which controls or "maintains" the objects stored
3095 in a database expressed by RPSL. Requests from maintainers can be
3096 authenticated with various techniques as defined by the "auth"
3097 attribute of the maintainer object.
3098
3099 The exact protocols used by IRR's to communicate RPSL objects is
3100 beyond the scope of this document, but it is envisioned that several
3101 techniques may be used, ranging from interactive query/update
3102 protocols to store and forward protocols similar to or based on
3103 electronic mail (or even voice telephone calls). Regardless of which
3104 protocols are used in a given situation, it is expected that
3105 appropriate security techniques such as IPSEC, TLS or PGP/MIME will
3106 be utilized.
3107
310812 Acknowledgements
3109
3110 We would like to thank Jessica Yu, Randy Bush, Alan Barrett, Bill
3111 Manning, Sue Hares, Ramesh Govindan, Kannan Varadhan, Satish Kumar,
3112 Craig Labovitz, Rusty Eddy, David J. LeRoy, David Whipple, Jon
3113 Postel, Deborah Estrin, Elliot Schwartz, Joachim Schmitz, Mark Prior,
3114 Tony Przygienda, David Woodgate, Rob Coltun, Sanjay Wadhwa, Ardas
3115 Cilingiroglu, and the participants of the IETF RPS Working Group for
3116 various comments and suggestions.
3117
3118References
3119
3120 [1] Internet routing registry. procedures.
3121 http://www.ra.net/RADB.tools.docs/,
3122 http://www.ripe.net/db/doc.html.
3123
3124 [2] Nsfnet policy routing database (prdb). Maintained by MERIT
3125 Network Inc., Ann Arbor, Michigan. Contents available from
3126 nic.merit.edu.:/nsfnet/announced.networks/nets.tag.now by
3127 anonymous ftp.
3128
3129 [3] Alaettinouglu, C., Bates, T., Gerich, E., Karrenberg, D., Meyer,
3130 D., Terpstra, M. and C. Villamizer, "Routing Policy Specification
3131 Language (RPSL)", RFC 2280, January 1998.
3132
3133
3134
3135
3136
3137
3138Alaettinoglu, et al. Standards Track [Page 56]
3139
3140RFC 2622 RPSL June 1999
3141
3142
3143 [4] C. Alaettinouglu, D. Meyer, and J. Schmitz. Application of
3144 routing policy specification language (rpsl) on the internet.
3145 Work in Progress.
3146
3147 [5] T. Bates. Specifying an `internet router' in the routing
3148 registry. Technical Report RIPE-122, RIPE, RIPE NCC, Amsterdam,
3149 Netherlands, October 1994.
3150
3151 [6] T. Bates, E. Gerich, L. Joncheray, J-M. Jouanigot, D. Karrenberg,
3152 M. Terpstra, and J. Yu. Representation of ip routing policies in
3153 a routing registry. Technical Report ripe-181, RIPE, RIPE NCC,
3154 Amsterdam, Netherlands, October 1994.
3155
3156 [7] Bates, T., Gerich, E., Joncheray, L., Jouanigot, J-M.,
3157 Karrenberg, D., Terpstra, M. and J. Yu, " Representation of IP
3158 Routing Policies in a Routing Registry", RFC 1786, March 1995.
3159
3160 [8] T. Bates, J-M. Jouanigot, D. Karrenberg, P. Lothberg, and M.
3161 Terpstra. Representation of ip routing policies in the ripe
3162 database. Technical Report ripe-81, RIPE, RIPE NCC, Amsterdam,
3163 Netherlands, February 1993.
3164
3165 [9] Chandra, R., Traina, P. and T. Li, "BGP Communities Attribute",
3166 RFC 1997, August 1996.
3167
3168 [10] Crocker, D., "Standard for ARPA Internet Text Messages", STD 11,
3169 RFC 822, August 1982.
3170
3171 [11] Fuller, V., Li, T., Yu, J. and K. Varadhan, "Classless Inter-
3172 Domain Routing (CIDR): an Address Assignment and Aggregation
3173 Strategy", RFC 1519, September 1993.
3174
3175 [12] D. Karrenberg and T. Bates. Description of inter-as networks in
3176 the ripe routing registry. Technical Report RIPE-104, RIPE, RIPE
3177 NCC, Amsterdam, Netherlands, December 1993.
3178
3179 [13] D. Karrenberg and M. Terpstra. Authorisation and notification of
3180 changes in the ripe database. Technical Report ripe-120, RIPE,
3181 RIPE NCC, Amsterdam, Netherlands, October 1994.
3182
3183 [14] B. W. Kernighan and D. M. Ritchie. The C Programming Language.
3184 Prentice-Hall, 1978.
3185
3186 [15] A. Lord and M. Terpstra. Ripe database template for networks and
3187 persons. Technical Report ripe-119, RIPE, RIPE NCC, Amsterdam,
3188 Netherlands, October 1994.
3189
3190
3191
3192
3193
3194Alaettinoglu, et al. Standards Track [Page 57]
3195
3196RFC 2622 RPSL June 1999
3197
3198
3199 [16] A. M. R. Magee. Ripe ncc database documentation. Technical Report
3200 RIPE-157, RIPE, RIPE NCC, Amsterdam, Netherlands, May 1997.
3201
3202 [17] Mockapetris, P., "Domain names - concepts and facilities", STD
3203 13, RFC 1034, November 1987.
3204
3205 [18] Y. Rekhter. Inter-domain routing protocol (idrp). Journal of
3206 Internetworking Research and Experience, 4:61--80, 1993.
3207
3208 [19] Rekhter Y. and T. Li, "A Border Gateway Protocol 4 (BGP-4)", RFC
3209 1771, March 1995.
3210
3211 [20] C. Villamizar, C. Alaettinouglu, D. Meyer, S. Murphy, and C.
3212 Orange. Routing policy system security", Work in Progress.
3213
3214 [21] Villamizar, C., Chandra, R. and R. Govindan, "BGP Route Flap
3215 Damping", RFC 2439, November 1998.
3216
3217 [22] J. Zsako, "PGP authentication for ripe database updates", Work in
3218 Progress.
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250Alaettinoglu, et al. Standards Track [Page 58]
3251
3252RFC 2622 RPSL June 1999
3253
3254
3255A Routing Registry Sites
3256
3257 The set of routing registries as of November 1996 are RIPE, RADB,
3258 CANet, MCI and ANS. You may contact one of these registries to find
3259 out the current list of registries.
3260
3261B Grammar Rules
3262
3263 In this section we provide formal grammar rules for RPSL. Basic data
3264 types are defined in Section 2. We do not provide formal grammar
3265 rules for attributes whose values are of basic types or list of basic
3266 types. The rules are written using the input language of GNU Bison
3267 parser. Hence, they can be cut and pasted to that program.
3268
3269//**** Generic Attributes **********************************************
3270
3271changed_attribute: ATTR_CHANGED TKN_EMAIL TKN_INT
3272
3273//**** aut-num class ***************************************************
3274
3275//// as_expression /////////////////////////////////////////////////////
3276
3277opt_as_expression:
3278| as_expression
3279
3280as_expression: as_expression OP_OR as_expression_term
3281| as_expression_term
3282
3283as_expression_term: as_expression_term OP_AND as_expression_factor
3284| as_expression_term KEYW_EXCEPT as_expression_factor
3285| as_expression_factor
3286
3287as_expression_factor: '(' as_expression ')'
3288| as_expression_operand
3289
3290as_expression_operand: TKN_ASNO
3291| TKN_ASNAME
3292
3293//// router_expression /////////////////////////////////////////////////
3294
3295opt_router_expression:
3296| router_expression
3297
3298opt_router_expression_with_at:
3299| KEYW_AT router_expression
3300
3301router_expression: router_expression OP_OR router_expression_term
3302| router_expression_term
3303
3304
3305
3306Alaettinoglu, et al. Standards Track [Page 59]
3307
3308RFC 2622 RPSL June 1999
3309
3310
3311router_expression_term: router_expression_term OP_AND
3312 router_expression_factor
3313| router_expression_term KEYW_EXCEPT router_expression_factor
3314| router_expression_factor
3315
3316router_expression_factor: '(' router_expression ')'
3317| router_expression_operand
3318
3319router_expression_operand: TKN_IPV4
3320| TKN_DNS
3321| TKN_RTRSNAME
3322
3323//// peering ///////////////////////////////////////////////////////////
3324
3325peering: as_expression opt_router_expression opt_router_expression_with_at
3326| TKN_PRNGNAME
3327
3328//// action ////////////////////////////////////////////////////////////
3329
3330opt_action:
3331| KEYW_ACTION action
3332
3333action: single_action
3334| action single_action
3335single_action: TKN_RP_ATTR '.' TKN_WORD '(' generic_list ')' ';'
3336| TKN_RP_ATTR TKN_OPERATOR list_item ';'
3337| TKN_RP_ATTR '(' generic_list ')' ';'
3338| TKN_RP_ATTR '[' generic_list ']' ';'
3339| ';'
3340
3341//// filter ////////////////////////////////////////////////////////////
3342
3343filter: filter OP_OR filter_term
3344| filter filter_term %prec OP_OR
3345| filter_term
3346
3347filter_term : filter_term OP_AND filter_factor
3348| filter_factor
3349
3350filter_factor : OP_NOT filter_factor
3351| '(' filter ')'
3352| filter_operand
3353
3354filter_operand: KEYW_ANY
3355| '<' filter_aspath '>'
3356| filter_rp_attribute
3357| TKN_FLTRNAME
3358| filter_prefix
3359
3360
3361
3362Alaettinoglu, et al. Standards Track [Page 60]
3363
3364RFC 2622 RPSL June 1999
3365
3366
3367filter_prefix: filter_prefix_operand OP_MS
3368| filter_prefix_operand
3369
3370filter_prefix_operand: TKN_ASNO
3371| KEYW_PEERAS
3372| TKN_ASNAME
3373| TKN_RSNAME
3374| '{' opt_filter_prefix_list '}'
3375
3376opt_filter_prefix_list:
3377| filter_prefix_list
3378
3379filter_prefix_list: filter_prefix_list_prefix
3380| filter_prefix_list ',' filter_prefix_list_prefix
3381
3382filter_prefix_list_prefix: TKN_PRFXV4
3383| TKN_PRFXV4RNG
3384
3385filter_aspath: filter_aspath '|' filter_aspath_term
3386| filter_aspath_term
3387
3388filter_aspath_term: filter_aspath_term filter_aspath_closure
3389| filter_aspath_closure
3390
3391filter_aspath_closure: filter_aspath_closure '*'
3392| filter_aspath_closure '?'
3393| filter_aspath_closure '+'
3394| filter_aspath_factor
3395
3396filter_aspath_factor: '^'
3397| '$'
3398| '(' filter_aspath ')'
3399| filter_aspath_no
3400
3401filter_aspath_no: TKN_ASNO
3402| KEYW_PEERAS
3403| TKN_ASNAME
3404| '.'
3405| '[' filter_aspath_range ']'
3406| '[' '^' filter_aspath_range ']'
3407
3408filter_aspath_range:
3409| filter_aspath_range TKN_ASNO
3410| filter_aspath_range KEYW_PEERAS
3411| filter_aspath_range '.'
3412| filter_aspath_range TKN_ASNO '-' TKN_ASNO
3413| filter_aspath_range TKN_ASNAME
3414
3415
3416
3417
3418Alaettinoglu, et al. Standards Track [Page 61]
3419
3420RFC 2622 RPSL June 1999
3421
3422
3423filter_rp_attribute: TKN_RP_ATTR '.' TKN_WORD '(' generic_list ')'
3424| TKN_RP_ATTR TKN_OPERATOR list_item
3425| TKN_RP_ATTR '(' generic_list ')'
3426| TKN_RP_ATTR '[' generic_list ']'
3427
3428//// peering action pair ///////////////////////////////////////////////
3429
3430import_peering_action_list: KEYW_FROM peering opt_action
3431| import_peering_action_list KEYW_FROM peering opt_action
3432
3433export_peering_action_list: KEYW_TO peering opt_action
3434| export_peering_action_list KEYW_TO peering opt_action
3435
3436//// import/export factor //////////////////////////////////////////////
3437
3438import_factor: import_peering_action_list KEYW_ACCEPT filter
3439
3440import_factor_list: import_factor ';'
3441| import_factor_list import_factor ';'
3442
3443export_factor: export_peering_action_list KEYW_ANNOUNCE filter
3444
3445export_factor_list: export_factor ';'
3446| export_factor_list export_factor ';'
3447
3448//// import/export term ////////////////////////////////////////////////
3449
3450import_term: import_factor ';'
3451| '{' import_factor_list '}'
3452
3453export_term: export_factor ';'
3454| '{' export_factor_list '}'
3455
3456//// import/export expression //////////////////////////////////////////
3457
3458import_expression: import_term
3459| import_term KEYW_REFINE import_expression
3460| import_term KEYW_EXCEPT import_expression
3461
3462export_expression: export_term
3463| export_term KEYW_REFINE export_expression
3464| export_term KEYW_EXCEPT export_expression
3465
3466//// protocol ///////////////////////////////////////////////////////////
3467
3468opt_protocol_from:
3469| KEYW_PROTOCOL tkn_word
3470
3471
3472
3473
3474Alaettinoglu, et al. Standards Track [Page 62]
3475
3476RFC 2622 RPSL June 1999
3477
3478
3479opt_protocol_into:
3480| KEYW_INTO tkn_word
3481
3482//**** import/export attributes ****************************************
3483
3484import_attribute: ATTR_IMPORT
3485| ATTR_IMPORT opt_protocol_from opt_protocol_into import_factor
3486
3487export_attribute: ATTR_EXPORT
3488| ATTR_EXPORT opt_protocol_from opt_protocol_into export_factor
3489
3490opt_default_filter:
3491| KEYW_NETWORKS filter
3492
3493default_attribute: ATTR_DEFAULT KEYW_TO peering
3494
3495filter_attribute: ATTR_FILTER filter
3496
3497peering_attribute: ATTR_PEERING peering
3498
3499//**** inet-rtr class **************************************************
3500
3501ifaddr_attribute: ATTR_IFADDR TKN_IPV4 KEYW_MASKLEN TKN_INT opt_action
3502
3503//// peer attribute ////////////////////////////////////////////////////
3504
3505opt_peer_options:
3506| peer_options
3507
3508peer_options: peer_option
3509| peer_options ',' peer_option
3510
3511peer_option: tkn_word '(' generic_list ')'
3512
3513peer_id: TKN_IPV4
3514| TKN_DNS
3515| TKN_RTRSNAME
3516| TKN_PRNGNAME
3517
3518peer_attribute: ATTR_PEER tkn_word peer_id opt_peer_options
3519
3520//**** route class *****************************************************
3521
3522aggr_bndry_attribute: ATTR_AGGR_BNDRY as_expression
3523
3524aggr_mtd_attribute: ATTR_AGGR_MTD KEYW_INBOUND
3525| ATTR_AGGR_MTD KEYW_OUTBOUND opt_as_expression
3526
3527
3528
3529
3530Alaettinoglu, et al. Standards Track [Page 63]
3531
3532RFC 2622 RPSL June 1999
3533
3534
3535//// inject attribute //////////////////////////////////////////////////
3536
3537opt_inject_expression:
3538| KEYW_UPON inject_expression
3539
3540inject_expression: inject_expression OP_OR inject_expression_term
3541| inject_expression_term
3542
3543inject_expression_term: inject_expression_term OP_AND
3544 inject_expression_factor
3545| inject_expression_factor
3546
3547inject_expression_factor: '(' inject_expression ')'
3548| inject_expression_operand
3549
3550inject_expression_operand: KEYW_STATIC
3551| KEYW_HAVE_COMPONENTS '{' opt_filter_prefix_list '}'
3552| KEYW_EXCLUDE '{' opt_filter_prefix_list '}'
3553
3554inject_attribute: ATTR_INJECT opt_router_expression_with_at opt_action
3555 opt_inject_expression
3556
3557//// components attribute //////////////////////////////////////////////
3558
3559opt_atomic:
3560| KEYW_ATOMIC
3561
3562components_list:
3563| filter
3564| components_list KEYW_PROTOCOL tkn_word filter
3565
3566components_attribute: ATTR_COMPONENTS opt_atomic components_list
3567
3568//**** route-set *******************************************************
3569
3570opt_rs_members_list: /* empty list */
3571| rs_members_list
3572
3573rs_members_list: rs_member
3574| rs_members_list ',' rs_member
3575
3576rs_member: TKN_ASNO
3577| TKN_ASNO OP_MS
3578| TKN_ASNAME
3579| TKN_ASNAME OP_MS
3580| TKN_RSNAME
3581| TKN_RSNAME OP_MS
3582| TKN_PRFXV4
3583
3584
3585
3586Alaettinoglu, et al. Standards Track [Page 64]
3587
3588RFC 2622 RPSL June 1999
3589
3590
3591| TKN_PRFXV4RNG
3592
3593rs_members_attribute: ATTR_RS_MEMBERS opt_rs_members_list
3594
3595//**** dictionary ******************************************************
3596
3597rpattr_attribute: ATTR_RP_ATTR TKN_WORD methods
3598| ATTR_RP_ATTR TKN_RP_ATTR methods
3599
3600methods: method
3601| methods method
3602
3603method: TKN_WORD '(' ')'
3604| TKN_WORD '(' typedef_type_list ')'
3605| TKN_WORD '(' typedef_type_list ',' TKN_3DOTS ')'
3606| KEYW_OPERATOR TKN_OPERATOR '(' typedef_type_list ')'
3607| KEYW_OPERATOR TKN_OPERATOR '(' typedef_type_list ',' TKN_3DOTS ')'
3608
3609//// typedef attribute ////////////////////////////////////////////////
3610
3611typedef_attribute: ATTR_TYPEDEF TKN_WORD typedef_type
3612
3613typedef_type_list: typedef_type
3614| typedef_type_list ',' typedef_type
3615
3616typedef_type: KEYW_UNION typedef_type_list
3617| KEYW_RANGE KEYW_OF typedef_type
3618| TKN_WORD
3619| TKN_WORD '[' TKN_INT ',' TKN_INT ']'
3620| TKN_WORD '[' TKN_REAL ',' TKN_REAL ']'
3621| TKN_WORD '[' enum_list ']'
3622| KEYW_LIST '[' TKN_INT ':' TKN_INT ']' KEYW_OF typedef_type
3623| KEYW_LIST KEYW_OF typedef_type
3624
3625enum_list: tkn_word
3626| enum_list ',' tkn_word
3627
3628//// protocol attribute ////////////////////////////////////////////////
3629
3630protocol_attribute: ATTR_PROTOCOL tkn_word protocol_options
3631
3632protocol_options:
3633| protocol_options protocol_option
3634
3635protocol_option: KEYW_MANDATORY method
3636| KEYW_OPTIONAL method
3637
3638//**** Token Definitions ***********************************************
3639
3640
3641
3642Alaettinoglu, et al. Standards Track [Page 65]
3643
3644RFC 2622 RPSL June 1999
3645
3646
3647//// flex macros used in token definitions /////////////////////////////
3648INT [[:digit:]]+
3649SINT [+-]?{INT}
3650REAL [+-]?{INT}?\.{INT}({WS}*E{WS}*[+-]?{INT})?
3651NAME [[:alpha:]]([[:alnum:]_-]*[[:alnum:]])?
3652ASNO AS{INT}
3653ASNAME AS-[[:alnum:]_-]*[[:alnum:]]
3654RSNAME RS-[[:alnum:]_-]*[[:alnum:]]
3655RTRSNAME RTRS-[[:alnum:]_-]*[[:alnum:]]
3656PRNGNAME PRNG-[[:alnum:]_-]*[[:alnum:]]
3657FLTRNAME FLTR-[[:alnum:]_-]*[[:alnum:]]
3658IPV4 [0-9]+(\.[0-9]+){3,3}
3659PRFXV4 {IPV4}\/[0-9]+
3660PRFXV4RNG {PRFXV4}("^+"|"^-"|"^"{INT}|"^"{INT}-{INT})
3661ENAMECHAR [^()<>,;:\\\"\.[\] \t\r]
3662ENAME ({ENAMECHAR}+(\.{ENAMECHAR}+)*\.?)|(\"[^\"@\\\r\n]+\")
3663DNAME [[:alnum:]_-]+
3664//// Token Definitions ////////////////////////////////////////////////
3665TKN_INT {SINT}
3666TKN_INT {INT}:{INT} if each {INT} is two octets
3667TKN_INT {INT}.{INT}.{INT}.{INT} if each {INT} is one octet
3668TKN_REAL {REAL}
3669TKN_STRING Same as in programming language C
3670TKN_IPV4 {IPV4}
3671TKN_PRFXV4 {PRFXV4}
3672TKN_PRFXV4RNG {PRFXV4RNG}
3673TKN_ASNO {ASNO}
3674TKN_ASNAME (({ASNO}|peeras|{ASNAME}):)*{ASNAME}\
3675 (:({ASNO}|peeras|{ASNAME}))*
3676TKN_RSNAME (({ASNO}|peeras|{RSNAME}):)*{RSNAME}\
3677 (:({ASNO}|peeras|{RSNAME}))*
3678TKN_RTRSNAME (({ASNO}|peeras|{RTRSNAME}):)*{RTRSNAME}\
3679 (:({ASNO}|peeras|{RTRSNAME}))*
3680TKN_PRNGNAME (({ASNO}|peeras|{PRNGNAME}):)*{PRNGNAME}\
3681 (:({ASNO}|peeras|{PRNGNAME}))*
3682TKN_FLTRNAME (({ASNO}|peeras|{FLTRNAME}):)*{FLTRNAME}\
3683 (:({ASNO}|peeras|{FLTRNAME}))*
3684TKN_BOOLEAN true|false
3685TKN_RP_ATTR {NAME} if defined in dictionary
3686TKN_WORD {NAME}
3687TKN_DNS {DNAME}("."{DNAME})+
3688TKN_EMAIL {ENAME}@({DNAME}("."{DNAME})+|{IPV4})
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698Alaettinoglu, et al. Standards Track [Page 66]
3699
3700RFC 2622 RPSL June 1999
3701
3702
3703C Changes from RFC 2280
3704
3705 RFC 2280 [3] contains an earlier version of RPSL. This section
3706 summarizes the changes since then. They are as follows:
3707
3708 o It is now possible to write integers as sequence of four 1-octet
3709 integers (e.g. 1.1.1.1) or as sequence of two 2-octet integers
3710 (e.g. 3561:70). Please see Section 2.
3711
3712 o The definition of address prefix range is extended so that an
3713 address prefix is also an address prefix range. Please see Section
3714 2.
3715
3716 o The semantics for a range operator applied to a set containing
3717 address prefix ranges is defined (e.g. {30.0.0.0/8^24-28}^27-30).
3718 Please see Section 2.
3719
3720 o All dates are now in UTC. Please see Section 2.
3721
3722 o Plus ('+') character is added to space and tab characters to split
3723 an attribute's value to multiple lines (i.e. by starting the
3724 following lines with a space, a tab or a plus ('+') character).
3725 Please see Section 2.
3726
3727 o The withdrawn attribute of route class is removed from the
3728 language.
3729
3730 o filter-set class is introduced. Please see Section 5.4.
3731
3732 o rtr-set class is introduced. Please see Section 5.5.
3733
3734 o peering-set class is introduced. Please see Section 5.6.
3735
3736 o Filters can now refer to filter-set names. Please see Section 5.4.
3737
3738 o Peerings can now refer to peering-set, rtr-set names. Both local
3739 and peer routers can be specified using router expressions. Please
3740 see Section 5.6.
3741
3742 o The peer attribute of the inet-rtr class can refer to peering-set,
3743 rtr-set names. Please see Section 9.
3744
3745 o The syntax and semantics of union, and list types and typedef
3746 attribute have changed. Please see Section 7.
3747
3748 o In the initial dictionary, the typedef attribute defining the
3749 community_elm, rp-attribute defining the community attribute has
3750 changed. Please see Section 7.
3751
3752
3753
3754Alaettinoglu, et al. Standards Track [Page 67]
3755
3756RFC 2622 RPSL June 1999
3757
3758
3759 o Guideliness for extending RPSL is added. Please see Section 10.
3760
3761 o Formal grammar rules are added. Please see Appendix B.
3762
3763D Authors' Addresses
3764
3765 Cengiz Alaettinoglu
3766 USC/Information Sciences Institute
3767
3768 EMail: cengiz@isi.edu
3769
3770 Curtis Villamizar
3771 Avici Systems
3772
3773 EMail: curtis@avici.com
3774
3775 Elise Gerich
3776 At Home Network
3777
3778 EMail: epg@home.net
3779
3780 David Kessens
3781 Qwest Communications
3782
3783 EMail: David.Kessens@qwest.net
3784
3785 David Meyer
3786 University of Oregon
3787
3788 EMail: meyer@antc.uoregon.edu
3789
3790 Tony Bates
3791 Cisco Systems, Inc.
3792
3793 EMail: tbates@cisco.com
3794
3795 Daniel Karrenberg
3796 RIPE NCC
3797
3798 EMail: dfk@ripe.net
3799
3800 Marten Terpstra
3801 c/o Bay Networks, Inc.
3802
3803 EMail: marten@BayNetworks.com
3804
3805
3806
3807
3808
3809
3810Alaettinoglu, et al. Standards Track [Page 68]
3811
3812RFC 2622 RPSL June 1999
3813
3814
3815Full Copyright Statement
3816
3817 Copyright (C) The Internet Society (1999). All Rights Reserved.
3818
3819 This document and translations of it may be copied and furnished to
3820 others, and derivative works that comment on or otherwise explain it
3821 or assist in its implmentation may be prepared, copied, published and
3822 distributed, in whole or in part, without restriction of any kind,
3823 provided that the above copyright notice and this paragraph are
3824 included on all such copies and derivative works. However, this
3825 document itself may not be modified in any way, such as by removing
3826 the copyright notice or references to the Internet Society or other
3827 Internet organizations, except as needed for the purpose of developing
3828 Internet standards in which case the procedures for copyrights defined
3829 in the Internet Standards process must be followed, or as required to
3830 translate it into languages other than English.
3831
3832 The limited permissions granted above are perpetual and will not be
3833 revoked by the Internet Society or its successors or assigns.
3834
3835 This document and the information contained herein is provided on an
3836 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
3837 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
3838 NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN
3839 WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
3840 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
3841
3842Acknowledgement
3843
3844 Funding for the RFC Editor function is currently provided by the
3845 Internet Society.
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866Alaettinoglu, et al. Standards Track [Page 69]