home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_q_t / draft-ietf-rps-rpsl-02.txt < prev    next >
Text File  |  1997-04-23  |  102KB  |  2,731 lines

  1.  
  2.  
  3.  
  4. Internet Draft                                           Cengiz Alaettinoglu
  5. Expires  October 23, 1997                                            USC/ISI
  6. draft-ietf-rps-rpsl-02.txt                                        Tony Bates
  7.                                                                Cisco Systems
  8.                                                                 Elise Gerich
  9.                                                              At Home Network
  10.                                                            Daniel Karrenberg
  11.                                                                         RIPE
  12.                                                                  David Meyer
  13.                                                         University of Oregon
  14.                                                              Marten Terpstra
  15.                                                                 Bay Networks
  16.                                                            Curtis Villamizer
  17.                                                                          ANS
  18.                                                               April 23, 1997
  19.  
  20.  
  21.  
  22.                 Routing Policy Specification Language (RPSL)
  23.  
  24.  
  25.  
  26.  
  27. Status of this Memo
  28.  
  29.  
  30. This Internet  Draft  is  the  reference document  for  the  Routing  Policy
  31. Specification Language (RPSL). RPSL allows a network operator to be able  to
  32. specify routing policies at  various levels in  the Internet hierarchy;  for
  33. example at the Autonomous  System (AS) level.   At  the same time,  policies
  34. can be specified  with sufficient detail  in RPSL so  that low level  router
  35. configurations can be generated from them.  RPSL is extensible; new  routing
  36. protocols and new protocol features can be introduced at any time.
  37.  
  38. This document is an Internet Draft, and can be found as draft-ietf-rps-rpsl-
  39. 02.txt in any  standard internet  drafts repository.    Internet Drafts  are
  40. working documents of the Internet Engineering Task Force (IETF), its  Areas,
  41. and its Working Groups.  Note that other groups may also distribute  working
  42. documents as Internet Drafts.
  43.  
  44. Internet Drafts  are draft  documents valid  for a  maximum of  six  months.
  45. Internet Drafts may be  updated, replaced, or  obsoleted by other  documents
  46. at any time.   It  is not appropriate  to use Internet  Drafts as  reference
  47. material, or to cite  them other than  as a ``working  draft'' or ``work  in
  48. progress.''
  49.  
  50. Please check  the I-D  abstract  listing contained  in each  Internet  Draft
  51. directory to learn the current status of this or any other Internet Draft.
  52. Internet Draft                      RPSL                      April 23, 1997
  53.  
  54. Contents
  55.  
  56.  
  57. 1 Introduction                                                             3
  58.  
  59. 2 RPSL Names, Reserved Words, and Representation                           4
  60.  
  61.  
  62. 3 mntner Class                                                             6
  63.  
  64. 4 person Class                                                             7
  65.  
  66.  
  67. 5 route Class                                                              8
  68.  
  69. 6 Set Classes                                                              9
  70.  
  71.   6.1 route-set Class . . . . . . . . . . . . . . . . . . . . . . . . . . 9
  72.  
  73.   6.2 as-set Class  . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
  74.  
  75.   6.3 Predefined Set Objects  . . . . . . . . . . . . . . . . . . . . . . 12
  76.  
  77.   6.4 Hierarchical Set Names  . . . . . . . . . . . . . . . . . . . . . . 12
  78.  
  79.  
  80. 7 aut-num Class                                                           13
  81.  
  82.   7.1 import Attribute:  Import Policy Specification  . . . . . . . . . . 13
  83.  
  84.     7.1.1Peering Specification  . . . . . . . . . . . . . . . . . . . . . 14
  85.  
  86.     7.1.2Action Specification . . . . . . . . . . . . . . . . . . . . . . 16
  87.  
  88.     7.1.3Filter Specification . . . . . . . . . . . . . . . . . . . . . . 16
  89.  
  90.     7.1.4Example Policy Expressions . . . . . . . . . . . . . . . . . . . 21
  91.  
  92.   7.2 export Attribute:  Export Policy Specification  . . . . . . . . . . 21
  93.  
  94.    7.3 Other  Routing  Protocols, Multi-Protocol  Routing Protocols,  and
  95.     Injecting Routes Between Protocols . . . . . . . . . . . . . . . . .  22
  96.  
  97.   7.4 Ambiguity Resolution  . . . . . . . . . . . . . . . . . . . . . . . 23
  98.  
  99.   7.5 default Attribute:  Default Policy Specification  . . . . . . . . . 25
  100.  
  101.   7.6 Structured Policy Specification . . . . . . . . . . . . . . . . . . 26
  102.  
  103. 8 dictionary Class                                                        30
  104.  
  105.  
  106.  
  107. Alaettinoglu et.  al.           Expires  October 23, 1997           [Page 2]
  108. Internet Draft                      RPSL                      April 23, 1997
  109.  
  110.   8.1 Initial RPSL Dictionary and Example Policy Actions and Filters  . . 33
  111.  
  112. 9 Advanced route Class                                                    38
  113.  
  114.   9.1 Specifying Static Routes  . . . . . . . . . . . . . . . . . . . . . 38
  115.  
  116.   9.2 Specifying Aggregate Routes . . . . . . . . . . . . . . . . . . . . 39
  117.  
  118.  
  119. 10inet-rtr Class                                                          41
  120.  
  121. 11inet-tunnel Class and Specifying Tunnels                                42
  122.  
  123.  
  124. 12Security Consideration                                                  45
  125.  
  126. 13Acknowledgements                                                        45
  127.  
  128.  
  129. A Routing Registry Sites                                                  47
  130.  
  131. B Authors' Addresses                                                      47
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163. Alaettinoglu et.  al.           Expires  October 23, 1997           [Page 3]
  164. Internet Draft                      RPSL                      April 23, 1997
  165.  
  166. 1 Introduction
  167.  
  168.  
  169. This Internet  Draft  is  the  reference document  for  the  Routing  Policy
  170. Specification Language (RPSL). RPSL allows a network operator to be able  to
  171. specify routing policies at  various levels in  the Internet hierarchy;  for
  172. example at the Autonomous  System (AS) level.   At  the same time,  policies
  173. can be specified  with sufficient detail  in RPSL so  that low level  router
  174. configurations can be generated from them.  RPSL is extensible; new  routing
  175. protocols and new protocol features can be introduced at any time.
  176.  
  177. RPSL is a  replacement for  the current Internet  de-facto standard  routing
  178. policy specification  language  known  as  RIPE-181  [6]  or  RFC-1786  [7].
  179. RIPE-81 [8] was the first language  deployed in the Internet for  specifying
  180. routing policies.  It was later replaced by RIPE-181 [6].
  181.  
  182. Through operational  use of  RIPE-181 it  has become  apparent that  certain
  183. policies cannot be specified and a need for an enhanced and more generalized
  184. language is needed.  RPSL addresses RIPE-181's limitations.  RPSL is  object
  185. oriented; that  is,  objects contain  pieces  of policy  and  administrative
  186. information.  These objects are registered in the Internet Routing  Registry
  187. (IRR) by the authorized organizations.   The registration process is  beyond
  188. the scope of this document.  Please refer to [2] and [4] for more details on
  189. the IRR.
  190.  
  191. In the following sections,  we present the classes  that are used to  define
  192. various policy  and administrative  objects.    The "mntner"  class  defines
  193. entities authorized  to add,  delete  and modify  a  set of  objects.    The
  194. "person" class  describes technical  and administrative  contact  personnel.
  195. Autonomous systems (ASes) are specified using  the "aut-num" class.   Routes
  196. are specified using  the "route"  class.   Sets of  ASes and  routes can  be
  197. defined using  the  "as-set" and  "route-set"  classes.    The  "dictionary"
  198. class provides the  extensibility to  the language.    The "inet-rtr"  class
  199. is used  to specify  routers.   Tunnels  are specified  using  "inet-tunnel"
  200. class.  Many of these  classes were originally defined in earlier  documents
  201. [6, 18, 20, 17, 5] and have all been enhanced.
  202.  
  203. This document is self-contained.  However, the reader is encouraged to  read
  204. RIPE-181 [7] and the  associated documents [18, 20,  17, 5] as they  provide
  205. significant background as to the motivation and underlying principles behind
  206. RIPE-181 and consequently, RPSL. They further cover the basic concept of the
  207. Internet Routing Registry  (IRR) [2,  4],  the data  repository for  storing
  208. global RPSL  based  routing policies  and  a fundamental  component  in  the
  209. application of RPSL. For a tutorial on RPSL, the reader should read the RPSL
  210. applications document [4].
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219. Alaettinoglu et.  al.           Expires  October 23, 1997           [Page 4]
  220. Internet Draft                      RPSL                      April 23, 1997
  221.  
  222. 2 RPSL Names, Reserved Words, and Representation
  223.  
  224.  
  225. Each class has a set of attributes which store a piece of information  about
  226. the objects of  the class.    Attributes can be  mandatory or  optional:   A
  227. mandatory attribute has to be defined for all objects of the class; optional
  228. attributes can  be skipped.    Attributes  can also  be single  or  multiple
  229. valued.  Each object is uniquely identified by a set of attributes, referred
  230. to as the class ``key''.
  231.  
  232. The value of an attribute has a type.   The following types are most  widely
  233. used.  Note that RPSL is case insensitive.
  234.  
  235.  
  236. <object-name>Many  objects in RPSL  have a name.   An  <object-name> is made
  237.     up of letters, digits, the character underscore ``_'', and  the character
  238.     hyphen ``-''; the first  character of a name must  be a letter, and  the
  239.     last character of a  name must be a  letter or a  digit.  The  following
  240.     words are reserved by RPSL, and they can not be used as names:
  241.  
  242.  
  243.           any as-any rs-any peeras
  244.           and or not
  245.           atomic from to at action accept announce except refine
  246.           networks into
  247.  
  248.  
  249.     Names starting with  certain prefixes  are reserved  for certain  object
  250.     types.   Names  starting with  ``as-'' are  reserved for  as set  names.
  251.     Names starting with ``rs-'' are reserved for route set names.
  252.  
  253. <as-number>An  AS number x is represented as  the string ``ASx''.  That  is,
  254.     the AS 226 is represented as AS226.
  255.  
  256. <ipv4-address>An IPv4 address is represented as a  sequence of four integers
  257.     in the range from 0  to 255 separated by the  character dot ``.''.   For
  258.     example, 128.9.128.5 represents a  valid IPv4 address.   In the rest  of
  259.     this document, we may refer to IPv4 addresses as IP addresses.
  260.  
  261. <address-prefix>An  address  prefix  is  represented   as  an  IPv4  address
  262.     followed by the  character slash  ``/'' followed  by an  integer in  the
  263.     range from  0  to  32.    The  following  are  valid  address  prefixes:
  264.     128.9.128.5/32,  128.9.0.0/16,  0.0.0.0/0;  and  the  following  address
  265.     prefixes are invalid:   0/0, 128.9/16 since 0  or 128.9 are not  strings
  266.     containing four integers.
  267.  
  268. <date>A date  is represented as an eight digit integer of the form  YYYYMMDD
  269.     where YYYY represents the year, MM represents the month of the year  (01
  270.     through 12), and  DD represents the  day of the  month (01 through  31).
  271.     For example, June 24, 1996 is represented as 19960624.
  272.  
  273.  
  274.  
  275. Alaettinoglu et.  al.           Expires  October 23, 1997           [Page 5]
  276. Internet Draft                      RPSL                      April 23, 1997
  277.  
  278. <email-address>is as described in RFC-822[11].
  279.  
  280. <dns-name>is as described in RFC-1034[22].
  281.  
  282. <person>is  either  a  full  name  of  a   person  or  a  uniquely  assigned
  283.     NIC-handle.  Its syntax has the following form:
  284.  
  285.  
  286.           <firstname> [<initials>] <lastname>
  287.         | <nic-handle>
  288.  
  289.            E.g.
  290.               John E Doe
  291.               JED31
  292.  
  293.  
  294.     A NIC handle is an identifier  used by routing, address allocation,  and
  295.     other registries to unambiguously refer to people.
  296.  
  297. <free-form>is a sequence of ASCII characters.
  298.  
  299. <X-object-name>is  a name of  an object of  type X. That  is <mntner-object-
  300.     name> is a name of an mntner object.
  301.  
  302. <registry-name>is  a name of an  IRR registry.   The routing registries  are
  303.     listed in Appendix A.
  304.  
  305.  
  306. A value of an attribute may also be a  lists of one of these types.  A  list
  307. is represented by separating the list members by commas ``,''.  For example,
  308. ``AS1, AS2, AS3, AS4'' is a list of AS numbers.  Note that being list valued
  309. and being multiple valued are orthogonal.   A multiple valued attribute  has
  310. more than one  value each of  which may or  may not be  a list depending  on
  311. the attribute.  On the other hand a single valued attribute may have  a list
  312. value.
  313.  
  314. An RPSL object is textually represented as a list of attribute-value  pairs.
  315. Each attribute-value pair is written on a separate line.  The attribute name
  316. starts at column 0, followed by character  ``:''  and followed by the  value
  317. of the attribute.   The object's  representation ends when  a blank line  is
  318. encountered.   An attribute's  value can be  split over  multiple lines,  by
  319. starting the continuation lines with a white-space (`` '' or tab) character.
  320. The order of attribute-value pairs is significant.
  321.  
  322. An object's description may contain comments.  A comment can be anywhere  in
  323. an object's definition, it starts at the first ``#'' character on a line and
  324. ends at the first end-of-line character.  White space characters can be used
  325. to improve readability.
  326.  
  327.  
  328.  
  329.  
  330.  
  331. Alaettinoglu et.  al.           Expires  October 23, 1997           [Page 6]
  332. Internet Draft                      RPSL                      April 23, 1997
  333.  
  334. 3 mntner Class
  335.  
  336.  
  337. The mntner class defines  entities that can create,  delete and update  RPSL
  338. objects.  A provider, before he/she can create any RPSL object, first  needs
  339. to create a mntner object.  The attributes of the mntner class are  shown in
  340. Figure 1.  A more complete description of mntner class can be found in [18].
  341. Here, we summarize the mntner class for completeness.
  342.  
  343.  
  344.   Attribute  Value                    Type
  345.   mntner     <object-name>            mandatory, single-valued, class key
  346.   descr      <free-form>              mandatory, single-valued
  347.   auth       see description in text  mandatory, multi-valued
  348.   upd-to     <email-address>          mandatory, multi-valued
  349.   mnt-nfy    <email-address>          optional, multi-valued
  350.   tech-c     <person>                 mandatory, multi-valued
  351.   admin-c    <person>                 mandatory, multi-valued
  352.   remarks    <free-form>              optional, multi-valued
  353.   notify     <email-address>          optional, multi-valued
  354.   mnt-by     <mntner-object-name>     mandatory, multi-valued
  355.   changed    <email-address> <date>   mandatory, multi-valued
  356.   source     <registry-name>          mandatory, single-valued
  357.  
  358.  
  359.                      Figure 1:  mntner Class Attributes
  360.  
  361.  
  362. The mntner attribute is mandatory and is the class key attribute.  Its value
  363. is an RPSL name.  The auth attribute specifies the scheme that will  be used
  364. to identify and authenticate update requests  from this maintainer.  It  has
  365. the following syntax:
  366.  
  367.  
  368.    auth: <scheme-id> <auth-info>
  369.  
  370.    E.g.
  371.           auth: NONE
  372.           auth: CRYPT-PW dhjsdfhruewf
  373.           auth: MAIL-FROM .*@ripe\.net
  374.  
  375.  
  376. The <scheme-id>'s currently defined are:  NONE, MAIL-FROM, PGP and CRYPT-PW.
  377. The <auth-info> is additional information  required by a particular  scheme:
  378. in the case of  MAIL-FROM, it is a  regular expression matching valid  email
  379. addresses; in the case of CRYPT-PW, it  is a password in UNIX crypt  format;
  380. and in the case of PGP, it is a PGP public key.  If multiple auth attributes
  381. are specified, an update request satisfying any one of them is authenticated
  382. to be from the maintainer.
  383.  
  384. The upd-to  attribute  is an  email  address.    On an  unauthorized  update
  385.  
  386.  
  387. Alaettinoglu et.  al.           Expires  October 23, 1997           [Page 7]
  388. Internet Draft                      RPSL                      April 23, 1997
  389.  
  390. attempt of an object  maintained by this maintainer,  an email message  will
  391. be sent to this  address.   The mnt-nfy attribute  is an email  address.   A
  392. notification message will  be forwarded  to this email  address whenever  an
  393. object maintained by this maintainer is added, changed or deleted.
  394.  
  395. The descr attribute is a short, free-form textual description of the object.
  396. The tech-c attribute  is a technical  contact person.   This  is someone  to
  397. be contacted for technical problems such  as misconfiguration.  The  admin-c
  398. attribute is an administrative contact person.   The remarks attribute is  a
  399. free text explanation or  clarification.  The  notify attribute is an  email
  400. address to which  notifications of changes  to this object  should be  sent.
  401. The mnt-by attribute is a mntner object name.  The authorization for changes
  402. to this object is governed by that maintainer object.  The changed attribute
  403. documents who last changed this object, and when this change was made.   Its
  404. syntax has the following form:
  405.  
  406.  
  407.    changed: <email-address> <YYYYMMDD>
  408.  
  409.    E.g.
  410.    changed: johndoe@terabit-labs.nn 19900401
  411.  
  412.  
  413. The  <email-address>  identifies  the  person  who  made  the  last  change.
  414. <YYYYMMDD> is the date of  the change.   The source attribute specifies  the
  415. registry where the object is registered.
  416.  
  417. The descr,  tech-c, admin-c,  remarks, notify,  mnt-by,  changed and  source
  418. attributes are attributes of all RPSL classes.  Their syntax, semantics, and
  419. mandatory, optional, multi-valued, or single-valued status are the same  for
  420. for all classes.  We do not further discuss them in other sections.
  421.  
  422.  
  423. 4 person Class
  424.  
  425.  
  426. A person class is used to describe information about people.  Even though it
  427. does not describe routing  policy, we still describe  it here briefly  since
  428. many policy objects make reference  to person objects.   The details of  the
  429. person class can be found in Reference [20].
  430.  
  431. The attributes  of the  person class  are shown  in Figure  2.   The  person
  432. attribute is  the full  name  of the  person.    The  phone and  the  fax-no
  433. attributes have the following syntax:
  434.  
  435.  
  436.       phone: +<country-code> <city> <subscriber> [ext. <extension>]
  437.  
  438.    E.g.:
  439.       phone: +31 20 12334676
  440.  
  441.  
  442.  
  443. Alaettinoglu et. al.           Expires  October 23, 1997            [Page 8]
  444. Internet Draft                      RPSL                      April 23, 1997
  445.  
  446.       phone: +44 123 987654 ext. 4711
  447.  
  448.  
  449.  
  450.   Attribute  Value                    Type
  451.   person     <person>                 mandatory, single-valued, class key
  452.   address    <free-form>              mandatory, multi-valued
  453.   phone      see description in text  mandatory, multi-valued
  454.   fax-no     same as phone            optional, multi-valued
  455.   e-mail     <email-address>          mandatory, multi-valued
  456.   nic-hdl    see description in text  optional, single-valued
  457.  
  458.  
  459.                      Figure 2:  person Class Attributes
  460.  
  461.  
  462.  
  463. 5 route Class
  464.  
  465.  
  466. Each interAS route originated  by an AS is  specified using a route  object.
  467. The attributes  of the  route  class are  shown  in Figure  3.    The  route
  468. attribute is the  address prefix of  the route and  the origin attribute  is
  469. the AS number of the AS that  originates the route into the interAS  routing
  470. system.  The route and origin attribute pair is the class key.
  471.  
  472.  
  473.  Attribute     Value                   Type
  474.  route         <address-prefix>        mandatory, single-valued, class key
  475.  origin        <as-number>             mandatory, single-valued, class key
  476.  withdrawn     <date>                  optional, single-valued
  477.  member-of     <route-set-object-name> optional, single-valued
  478.                see Section 6
  479.  inject-at     see Section 9           optional, multi-valued
  480.  aggr-by       see Section 9           optional, single-valued
  481.  export-comps  see Section 9           optional, single-valued
  482.  holes         see Section 9           optional, single-valued
  483.  
  484.  
  485.                      Figure 3:  route Class Attributes
  486.  
  487.  
  488. The Figure 4 shows examples of four route  objects.  Note that the last  two
  489. route objects have the same address  prefix, namely 128.8.0.0/16.   However,
  490. they are different route objects since they are originated by different ASes
  491. (i.e. they have different keys).
  492.  
  493. The withdrawn attribute,  if present,  signifies that the  originator AS  no
  494. longer originates this address prefix in the Internet.  Its value is a  date
  495. indicating the date of withdrawal.   In Figure 4,  the last route object  is
  496. withdrawn (i.e. no longer originated by AS2) on June 24, 1996.
  497.  
  498.  
  499. Alaettinoglu et.  al.           Expires  October 23, 1997           [Page 9]
  500. Internet Draft                      RPSL                      April 23, 1997
  501.  
  502.  
  503.    route: 128.9.0.0/16
  504.    origin: AS226
  505.  
  506.    route: 128.99.0.0/16
  507.    origin: AS226
  508.  
  509.    route: 128.8.0.0/16
  510.    origin: AS1
  511.  
  512.    route: 128.8.0.0/16
  513.    origin: AS2
  514.    withdrawn: 19960624
  515.  
  516.  
  517.                           Figure 4:  Route Objects
  518.  
  519. 6 Set Classes
  520.  
  521.  
  522. To specify policies,  it is often  useful to define  sets of  objects.   For
  523. this purpose we define two  classes:  route-set and  as-set.  These  classes
  524. define a named set.   The members of these  sets can be specified by  either
  525. explicitly listing them  in the set  object's definition,  or implicitly  by
  526. having route and aut-num objects refer to the set name in their definitions,
  527. or a combination of both methods.
  528.  
  529.  
  530.  
  531. 6.1 route-set Class
  532.  
  533.  
  534. The attributes of the route-set class are shown in Figure 5.  The  route-set
  535. attribute defines the name of the set.  It is an RPSL name that  starts with
  536. ``rs-''.  The members attribute lists the  members of the set.  The  members
  537. attribute is a list of address prefixes or other route-set names.
  538.  
  539.  
  540. Attribute            Value                          Type
  541. route-set            <object-name>                  mandatory, single-valued,
  542.                                                     class key
  543. members              list of <address-prefixes> or  optional, single-valued
  544.                      <route-set-object-names>
  545. members-by-referral  list of <mntner-object-names>  optional, single-valued
  546.  
  547.  
  548.                    Figure 5:  route-set Class Attributes
  549.  
  550.  
  551. Figure 6 presents some example route-set  objects.  The set rs-foo  contains
  552. two address prefixes, namely 128.9.0.0/16 and 128.9.0.0/16.  The set  rs-bar
  553.  
  554.  
  555. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 10]
  556. Internet Draft                      RPSL                      April 23, 1997
  557.  
  558. contains the members of the set rs-foo and the address prefix  128.7.0.0/16.
  559. The set rs-empty contains no members.
  560.  
  561.  
  562.    route-set: rs-foo
  563.    members: 128.9.0.0/16, 128.9.0.0/24
  564.  
  565.    route-set: rs-bar
  566.    members: 128.7.0.0/16, rs-foo
  567.  
  568.    route-set: rs-empty
  569.  
  570.  
  571.                         Figure 6:  route-set Objects
  572.  
  573. The members-by-referral  attribute is  a  list of  maintainer names  or  the
  574. keyword ANY. If this attribute is used, the route set also includes  address
  575. prefixes whose route objects are registered by one of these maintainers  and
  576. whose member-of attribute  refers to the  name of this  route set.   If  the
  577. value of a members-by-referral attribute is ANY, any route object  referring
  578. to the route set  name is a  member.   If the members-by-referral  attribute
  579. is missing, only the  address prefixes listed in  the members attribute  are
  580. members of the set.
  581.  
  582.    route-set: rs-foo
  583.    members-by-referral: MNTR-ME, MNTR-YOU
  584.  
  585.    route-set: rs-bar
  586.    members: 128.7.0.0/16
  587.    members-by-referral: MNTR-YOU
  588.  
  589.    route: 128.9.0.0/16
  590.    origin: AS1
  591.    member-of: rs-foo
  592.    mnt-by: MNTR-ME
  593.  
  594.    route: 128.8.0.0/16
  595.    origin: AS2
  596.    member-of: rs-foo, rs-bar
  597.    mnt-by: MNTR-YOU
  598.  
  599.  
  600.                        Figure 7:  route-set objects.
  601.  
  602.  
  603. Figure 7 presents example route-set objects that use the members-by-referral
  604. attribute.     The  set  rs-foo   contains  two  address  prefixes,   namely
  605. 128.8.0.0/16 and 128.9.0.0/16 since the  route objects for 128.8.0.0/16  and
  606. 128.9.0.0/16 refer to the set name rs-foo in their member-of attribute.  The
  607. set rs-bar contains the address prefixes 128.7.0.0/16 and 128.8.0.0/16.  The
  608. route 128.7.0.0/16 is explicitly listed in the members attribute of  rs-bar,
  609.  
  610.  
  611. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 11]
  612. Internet Draft                      RPSL                      April 23, 1997
  613.  
  614. and the route object for  128.8.0.0/16 refer to the  set name rs-bar in  its
  615. member-of attribute.
  616.  
  617. Note that, if an address prefix is listed in a members attribute of a  route
  618. set, it is a member  of that route set.   The route object corresponding  to
  619. this address prefix does not need to contain a member-of attribute referring
  620. to this  set name.    The  member-of  attribute of  the  route class  is  an
  621. additional mechanism for specifying the members indirectly.
  622.  
  623.  
  624. 6.2 as-set Class
  625.  
  626.  
  627. The attributes  of the  as-set class  are shown  in Figure  8.   The  as-set
  628. attribute defines the name of the set.  It is an RPSL name that  starts with
  629. ``as-''.  The members attribute lists the  members of the set.  The  members
  630. attribute is a list of AS numbers, or other as-set names.
  631.  
  632.  
  633. Attribute            Value                          Type
  634. as-set               <object-name>                  mandatory, single-valued,
  635.                                                     class key
  636. members              list of <as-numbers> or        optional, single-valued
  637.                      <as-set-object-names>
  638. members-by-referral  list of <mntner-object-names>  optional, single-valued
  639.  
  640.  
  641.                      Figure 8:  as-set Class Attributes
  642.  
  643.  
  644. Figure 9 presents two  as-set objects.   The set  as-foo contains two  ASes,
  645. namely AS1 and AS2.  The set  as-bar contains the members of the set  as-foo
  646. and AS3, that is it contains AS1, AS2, AS3.
  647.  
  648.  
  649.  as-set: as-foo                      as-set: as-bar
  650.  members: AS1, AS2                   members: AS3, as-foo
  651.  
  652.  
  653.                          Figure 9:  as-set objects.
  654.  
  655. The members-by-referral  attribute is  a  list of  maintainer names  or  the
  656. keyword ANY.  If this  attribute is  used,  the AS  set also  includes  ASes
  657. whose aut-num objects are registered by  one of these maintainers and  whose
  658. member-of attribute refers to the name  of this AS set.   If the value of  a
  659. members-by-referral attribute is ANY, any AS object referring to the AS  set
  660. is a member of the  set.  If  the members-by-referral attribute is  missing,
  661. only the ASes listed in the members attribute are members of the set.
  662.  
  663. Figure 10  presents  an example  as-set  object that  uses  the  members-by-
  664. referral attribute.  The set as-foo contains AS1, AS2 and AS3.  AS4 is not a
  665.  
  666.  
  667. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 12]
  668. Internet Draft                      RPSL                      April 23, 1997
  669.  
  670.  
  671.  as-set: as-foo
  672.  members: AS1, AS2
  673.  members-by-referral: MNTR-ME
  674.  
  675.  aut-num: AS3                          aut-num: AS4
  676.  member-of: as-foo                     member-of: as-foo
  677.  mnt-by: MNTR-ME                       mnt-by: MNTR-OTHER
  678.  
  679.  
  680.                         Figure 10:  as-set objects.
  681.  
  682. member of the set as-foo even  though the aut-num object references  as-foo.
  683. This is because MNTR-OTHER is not listed in the as-foo's members-by-referral
  684. attribute.
  685.  
  686.  
  687.  
  688. 6.3 Predefined Set Objects
  689.  
  690.  
  691. In a  context that  expects a  route set  (e.g.   members  attribute of  the
  692. route-set class),  an AS  number  ASx defines  the set  of routes  that  are
  693. originated by ASx;  and an as-set AS-X  defines the set  of routes that  are
  694. originated by the ASes in AS-X. A route p is said to be originated by ASx if
  695. there is a route object for p with ASx as the value of the origin attribute.
  696. For example, in Figure 11,  the route set rs-special contains  128.9.0.0/16,
  697. routes of AS1 and AS2, and routes of the ASes in AS set AS-FOO.
  698.  
  699.    route-set: rs-special
  700.    members: 128.9.0.0/16, AS1, AS2, AS-FOO
  701.  
  702.  
  703.           Figure 11:  Use of AS numbers and AS sets in route sets.
  704.  
  705.  
  706. The keyword rs-any  defines the  set of all  routes registered  in IRR.  The
  707. keyword as-any defines the set of all ASes registered in IRR.
  708.  
  709.  
  710. 6.4 Hierarchical Set Names
  711.  
  712.  
  713. Set names can be hierarchical.  A hierarchical set name is a sequence of set
  714. names and AS numbers separated by colons ``:''.  For example, the  following
  715. names are  valid:   AS1:AS-CUSTOMERS, AS1:RS-EXCEPTIONS,  AS1:RS-EXPORT:AS2,
  716. RS-EXCEPTIONS:RS-BOGUS. All set names in an hierarchical as-set name  should
  717. start with ``as-'';  and all  set names  in an  hierarchical route-set  name
  718. should start with ``rs-''.
  719.  
  720. A set object with name X1:...:Xn-1:Xn can only be created by the  maintainer
  721.  
  722.  
  723. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 13]
  724. Internet Draft                      RPSL                      April 23, 1997
  725.  
  726. of the object with name  X1:...:Xn-1.  That is,  only the maintainer of  AS1
  727. can create a set with name AS1:AS-FOO; and only the maintainer of AS1:AS-FOO
  728. can create a set with name AS1:AS-FOO:AS-BAR.
  729.  
  730.  
  731. 7 aut-num Class
  732.  
  733.  
  734. ASes are specified using the aut-num class.   The attributes of the  aut-num
  735. class are shown in  Figure 12.   The value of the  aut-num attribute is  the
  736. AS number of  the AS described  by this object.   The  as-name attribute  is
  737. a symbolic name  (in RPSL name  syntax) of  the AS. The  import, export  and
  738. default routing policies of  the AS are specified  using import, export  and
  739. default attributes respectively.
  740.  
  741.  
  742.     Attribute  Value                Type
  743.     aut-num    <as-number>          mandatory, single-valued, class key
  744.     as-name    <object-name>        mandatory, single-valued
  745.     member-of  <as-set-object-name> optional, single-valued
  746.     import     see Section 7.1      optional, multi valued
  747.     export     see Section 7.2      optional, multi valued
  748.     default    see Section 7.5      optional, multi valued
  749.  
  750.                     Figure 12:  aut-num Class Attributes
  751.  
  752.  
  753.  
  754. 7.1 import Attribute:  Import Policy Specification
  755.  
  756.  
  757. A typical interconnection of ASes  is shown in Figure 13.   In this  example
  758. topology, there are  three ASes,  AS1, AS2,  and AS3;  two exchange  points,
  759. EX1 and  EX2; and  six routers.    Routers connected  to  the same  exchange
  760. point peer with each  other, i.e. open a  connection for exchanging  routing
  761. information.  Each router would export a subset of the routes it has  to its
  762. peer routers.  Peer routers would import a subset of these routes.  A router
  763. while importing routes would  set some route attributes.   For example,  AS1
  764. can assign higher  preference values to  the routes it  imports from AS2  so
  765. that it prefers AS2  over AS3.   While exporting routes,  a router may  also
  766. set some route attributes in order  to affect route selection by its  peers.
  767. For example, AS2 may set the MULTI-EXIT-DISCRIMINATOR BGP attribute so  that
  768. AS1 prefers to use the router 9.9.9.2.  Most interAS policies are  specified
  769. by specifying what route  subsets can be imported  or exported, and how  the
  770. various route attributes are set and used.
  771.  
  772. In RPSL, an import policy is divided  into import policy expressions.   Each
  773. import policy expression is specified using an import attribute.  The import
  774. attribute has the  following syntax  (we will  extend this  syntax later  in
  775. Sections 7.3 and 7.6):
  776.  
  777.  
  778.  
  779. Alaettinoglu et. al.           Expires  October 23, 1997           [Page 14]
  780. Internet Draft                      RPSL                      April 23, 1997
  781.  
  782.  
  783.      ----------------------                   ----------------------
  784.      |            7.7.7.1 |-------|   |-------| 7.7.7.2            |
  785.      |                    |     ========      |                    |
  786.      |   AS1              |      EX1  |-------| 7.7.7.3     AS2    |
  787.      |                    |                   |                    |
  788.      |            9.9.9.1 |------       ------| 9.9.9.2            |
  789.      ----------------------     |       |     ----------------------
  790.                                ===========
  791.                                    |    EX2
  792.      ----------------------        |
  793.      |            9.9.9.3 |---------
  794.      |                    |
  795.      |   AS3              |
  796.      ----------------------
  797.  
  798.  
  799. Figure 13:  Example topology  consisting of three ASes,  AS1, AS2, and  AS3;
  800. two exchange points, EX1 and EX2; and six routers.
  801.  
  802.  
  803.  
  804.     import: from <peering-1> [action <action-1>]
  805.             . . .
  806.             from <peering-N> [action <action-N>]
  807.             accept <filter>
  808.  
  809.  
  810. The action specification is optional.  The semantics of an import  attribute
  811. is as follows:  the set of routes that are matched by <filter> are  imported
  812. from all  the  peers specified  in  <peerings>;  while importing  routes  at
  813. <peering-M>, <action-M> is executed.
  814.  
  815.  
  816.   E.g.
  817.     aut-num: AS1
  818.     import: from AS2 action pref = 1; accept { 128.9.0.0/16 }
  819.  
  820.  
  821. This example states that  the route 128.9.0.0/16 is  accepted from AS2  with
  822. preference 1.  In the next  few subsections, we will describe how  peerings,
  823. actions and filters are specified.
  824.  
  825.  
  826. 7.1.1 Peering Specification
  827.  
  828.  
  829. Our example above  used an  AS number  to specify  peerings.   The  peerings
  830. can be  specified at  different granularities.    The  syntax of  a  peering
  831. specification is as follows:
  832.  
  833.  
  834.  
  835. Alaettinoglu et. al.           Expires  October 23, 1997           [Page 15]
  836. Internet Draft                      RPSL                      April 23, 1997
  837.  
  838.      <peer-as> [<peer-router>] [at <local-router>]
  839.    | <as-set> [at <local-router>]
  840.  
  841.  
  842. where  <local-router>  and  <peer-router>  are  IP  addresses  of   routers,
  843. <peer-as> is an AS number, and <as-set> is  an AS set name.  <peer-as>  must
  844. be the AS number  of <peer-router>.   Both <local-router> and  <peer-router>
  845. are optional.    We  first  describe the  semantics  using the  first  form.
  846. If both  <local-router>  and  <peer-router>  are  specified,   this  peering
  847. specification identifies only  the peering between  these two routers.    If
  848. only <local-router>  is  specified, this  peering  specification  identifies
  849. all the  peerings between  <local-router> and  any of  its peer  routers  in
  850. <peer-as>.  If only  <peer-router> is specified, this peering  specification
  851. identifies all  the  peerings  between  any  router  in  the  local  AS  and
  852. <peer-router>.   If neither <local-router>  nor <peer-router> is  specified,
  853. this peering specification identifies all the peerings between any router in
  854. the local AS and any router in <peer-as>.  If the <as-set> form is used, the
  855. peering specification identifies all the peerings between <local-router> and
  856. any of its peer routers in one of  the ASes in <as-set>.  If  <local-router>
  857. is not  specified, the  peering specification  identifies all  the  peerings
  858. between any router in the local AS and any of its peer routers in one of the
  859. ASes in <as-set>.
  860.  
  861. We next give examples.   Consider  the topology of Figure  13 where AS1  has
  862. two routers 7.7.7.1 and 9.9.9.1; AS2 has three routers 7.7.7.2, 7.7.7.3  and
  863. 9.9.9.2; AS3 has one router 9.9.9.3.  7.7.7.1, 7.7.7.2 and 7.7.7.3 peer with
  864. each other; 9.9.9.1, 9.9.9.2 and 9.9.9.3  peer with each other.  In  example
  865. (1) below 7.7.7.1 imports 128.9.0.0/16 from 7.7.7.2.
  866.  
  867.  
  868.  (1) aut-num: AS1
  869.      import: from AS2 7.7.7.2 at 7.7.7.1 accept { 128.9.0.0/16 }
  870.  
  871.  (2) aut-num: AS1
  872.      import: from AS2         at 7.7.7.1 accept { 128.9.0.0/16 }
  873.  
  874.  (3) aut-num: AS1
  875.      import: from AS2                    accept { 128.9.0.0/16 }
  876.  
  877.  (4) as-set: AS-FOO
  878.      members: AS2, AS3
  879.  
  880.      aut-num: AS1
  881.      import: from AS-FOO      at 9.9.9.1 accept { 128.9.0.0/16 }
  882.  
  883.  (5) aut-num: AS1
  884.      import: from AS-FOO                 accept { 128.9.0.0/16 }
  885.  
  886.  (6) aut-num: AS1
  887.      import: from AS2         at 9.9.9.1 accept { 128.9.0.0/16 }
  888.      import: from AS3         at 9.9.9.1 accept { 128.9.0.0/16 }
  889.  
  890.  
  891. Alaettinoglu et. al.           Expires  October 23, 1997           [Page 16]
  892. Internet Draft                      RPSL                      April 23, 1997
  893.  
  894.  
  895.  (7) aut-num: AS1
  896.      import: from AS2                    accept { 128.9.0.0/16 }
  897.      import: from AS3                    accept { 128.9.0.0/16 }
  898.  
  899.  
  900. In example (2), 7.7.7.1 imports 128.9.0.0/16  from 7.7.7.2 and 7.7.7.3.   In
  901. example (3),  7.7.7.1 imports  128.9.0.0/16 from  7.7.7.2 and  7.7.7.3,  and
  902. 9.9.9.1 imports 128.9.0.0/16 from 9.9.9.2.  In example (4), 9.9.9.1  imports
  903. 128.9.0.0/16 from 9.9.9.2  and 9.9.9.3.    In example  (5), 9.9.9.1  imports
  904. 128.9.0.0/16 from 9.9.9.2 and 9.9.9.3, and 7.7.7.1 imports 128.9.0.0/16 from
  905. 7.7.7.2 and 7.7.7.3.  The example (4) and (5) are equivalent to examples (6)
  906. and (7) respectively.
  907.  
  908.  
  909. 7.1.2 Action Specification
  910.  
  911.  
  912. Policy actions in RPSL set or  modify route attributes, such as assigning  a
  913. preference to a  route, adding a  community to the  community attribute,  or
  914. setting the MULTI-EXIT-DISCRIMINATOR  attribute.   Policy  actions can  also
  915. instruct routers to perform special operations, such as route flap damping.
  916.  
  917. The routing policy attributes whose values can be modified in policy actions
  918. are specified in the RPSL dictionary.  Please refer to Section 8 for  a list
  919. of these attributes.   Each action  in RPSL is  terminated by the  character
  920. ';'.  It is  possible to form composite policy  actions by listing them  one
  921. after the other.   In a  composite policy action,  the actions are  executed
  922. left to right.  For example,
  923.  
  924.  
  925.  aut-num: AS1
  926.  import: from AS2
  927.          action pref = 10; med = 0; community.append(10250, {3561,10});
  928.          accept { 128.9.0.0/16 }
  929.  
  930.  
  931. sets pref to 10, and then med to 0.
  932.  
  933.  
  934. 7.1.3 Filter Specification
  935.  
  936.  
  937. A policy filter  is a  logical expression  which when  applied to  a set  of
  938. routes returns a  subset of these  routes.   We say that  the policy  filter
  939. matches the subset returned.  The  policy filter can match routes using  any
  940. route attribute, such as the destination address prefix (or NLRI),  AS-path,
  941. or community attributes.
  942.  
  943. The following policy filters can be used to select a subset of routes:
  944.  
  945.  
  946.  
  947. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 17]
  948. Internet Draft                      RPSL                      April 23, 1997
  949.  
  950. ANY
  951.     The filter-keyword ANY matches all routes.
  952.  
  953. Address-Prefix Set
  954.     This is an explicit list of address prefixes enclosed in  braces '{' and
  955.     '}'.   The policy  filter matches  the set of  routes whose  destination
  956.     address-prefix is in the set.  For example:
  957.  
  958.  
  959.             { 0.0.0.0/0 }
  960.             { 128.9.0.0/16, 128.8.0.0/16, 128.7.128.0/17, 5.0.0.0/8 }
  961.             { }
  962.  
  963.  
  964.     An address prefix can be optionally followed by an operator '^-',  '^+',
  965.     '^n', or  '^n-m'  where n  and  m are  integers.    ^- operator  is  the
  966.     exclusive more specifics operator; it  stands for the more specifics  of
  967.     the address prefix excluding the address prefix itself.  ^+ operator  is
  968.     the inclusive more specifics operator; it stands for the more  specifics
  969.     of the address prefix including the address prefix itself.  ^n operator,
  970.     stands for all  the length  n specifics  of the  address prefix.    ^n-m
  971.     operator, stands  for all  the length  n to  length m  specifics of  the
  972.     address prefix.  For example, the set
  973.  
  974.  
  975.         { 5.0.0.0/8^+, 128.9.0.0/16^-, 30.0.0.0/8^16,  30.0.0.0/8^24-32 }
  976.  
  977.  
  978.     contains all the  more specifics of  5.0.0.0/8 including 5.0.0.0/8,  all
  979.     the more specifics of 128.9.0.0/16 excluding 128.9.0.0/16, all the  more
  980.     specifics of 30.0.0.0/8 which are of length 16 such as 30.9.0.0/16,  and
  981.     all the more specifics of 30.0.0.0/8 which  are of length 24 to 32  such
  982.     as 30.9.9.96/28.
  983.  
  984. Route Set Name
  985.     A route set name matches the set of routes that are members of  the set.
  986.     A route set name may be a name of a route-set object, an AS number, or a
  987.     name of an as-set object (AS numbers and as-set names implicitly  define
  988.     route sets; please see Section 6.3).  For example:
  989.  
  990.  
  991.           aut-num: AS1
  992.           import: from AS2 action pref = 1; accept AS2
  993.           import: from AS2 action pref = 1; accept AS-FOO
  994.           import: from AS2 action pref = 1; accept RS-FOO
  995.  
  996.  
  997.     The keyword PeerAS can be used instead of the AS number of the  peer AS.
  998.     PeerAS is particularly useful when the peering is specified using an  AS
  999.     set.  For example:
  1000.  
  1001.  
  1002. Alaettinoglu et. al.           Expires  October 23, 1997           [Page 18]
  1003. Internet Draft                      RPSL                      April 23, 1997
  1004.  
  1005.           as-set: AS-FOO
  1006.           members: AS2 AS3
  1007.  
  1008.           aut-num: AS1
  1009.           import: from AS-FOO action pref = 1; accept PeerAS
  1010.  
  1011.  
  1012.     is same as:
  1013.  
  1014.  
  1015.           aut-num: AS1
  1016.           import: from AS2 action pref = 1; accept AS2
  1017.           import: from AS3 action pref = 1; accept AS3
  1018.  
  1019.  
  1020.     A route set  name can also  be followed  by one of  the operators  '^-',
  1021.     '^+', '^n' or '^n-m'.   These operators are distributive over the  route
  1022.     sets.   For example,  { 5.0.0.0/8,  6.0.0.0/8 }^+ equals  { 5.0.0.0/8^+,
  1023.     6.0.0.0/8^+ },  and AS1^-  equals all  the exclusive  more specifics  of
  1024.     routes originated by AS1.
  1025.  
  1026. AS Path Regular Expressions
  1027.     An AS-path  regular  expression  can  be used  as  a  policy  filter  by
  1028.     enclosing the  expression in  `<' and  `>'.   An  AS-path policy  filter
  1029.     matches the set  of routes which  traverses a sequence  of ASes  matched
  1030.     by the AS-path regular expression.   A router  can check this using  the
  1031.     AS_PATH attribute  in the  Border Gateway Protocol  [27], or  the RD_PATH
  1032.     attribute in the Inter-Domain Routing Protocol[25].
  1033.  
  1034.     AS-path Regular Expressions are POSIX compliant regular expressions over
  1035.     the alphabet of AS  numbers.  The  regular expression constructs are  as
  1036.     follows:
  1037.  
  1038.  
  1039.     ASN      where ASN is  an AS number.   ASN matches  the AS-path that  is
  1040.                  of length 1 and contains the corresponding AS number  (e.g.
  1041.                  AS-path regular expression AS1 matches the AS-path ``1'').
  1042.  
  1043.                  The keyword PeerAS can be used instead of the AS  number of
  1044.                  the peer AS.
  1045.  
  1046.     AS-set   where AS-set is an  AS set name.   AS-set matches the  AS-paths
  1047.                  that is matched by one of the ASes in the AS-set.
  1048.  
  1049.     .        matches the AS-paths matched by any AS number.
  1050.  
  1051.     [...]    is an AS number  set.  It matches  the AS-paths matched by  the
  1052.                  AS numbers listed between the brackets.  The AS  numbers in
  1053.                  the set are separated by white space characters.  If  a `-'
  1054.                  is used between two AS numbers in this set, all  AS numbers
  1055.                  between the two  AS numbers are  included in the  set.   If
  1056.  
  1057.  
  1058. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 19]
  1059. Internet Draft                      RPSL                      April 23, 1997
  1060.  
  1061.                  an as-set name is listed, all AS numbers in the  as-set are
  1062.                  included.
  1063.  
  1064.     [^...]   is a complemented AS number set.  It matches any  AS-path which
  1065.                  is not matched by the AS numbers in the set.
  1066.  
  1067.     ^        Matches the empty string at the beginning of an AS-path.
  1068.  
  1069.     $        Matches the empty string at the end of an AS-path.
  1070.  
  1071.  
  1072.     We next list the regular expression operators in the decreasing order of
  1073.     evaluation.  These operators  are left associative, i.e. performed  left
  1074.     to right.
  1075.  
  1076.  
  1077.     Unary postfix operators * + ?
  1078.                  For  a  regular expression  A,  A*  matches  zero  or  more
  1079.                  occurrences of A; A+ matches one or more occurrences of  A;
  1080.                  A? matches zero or one occurrence of A.
  1081.  
  1082.     Binary catenation operator
  1083.                  This  is  an  implicit  operator  and  exists  between  two
  1084.                  regular  expressions  A  and  B  when  no  other   explicit
  1085.                  operator  is specified.     The resulting  expression  A  B
  1086.                  matches an AS-path if A matches some prefix of the  AS-path
  1087.                  and B matches the rest of the AS-path.
  1088.  
  1089.     Binary alternative (or) operator |
  1090.                  For a  regular  expressions A  and  B, A  | B  matches  any
  1091.                  AS-path that is matched by A or B.
  1092.  
  1093.  
  1094.     Parenthesis can be  used to  override the default  order of  evaluation.
  1095.     White spaces can be used to increase readability.
  1096.  
  1097.     The following are examples of AS-path filters:
  1098.  
  1099.  
  1100.        <AS3>
  1101.        <^AS1>
  1102.        <AS2$>
  1103.        <^AS1 AS2 AS3$>
  1104.        <^AS1 .* AS2$>.
  1105.  
  1106.  
  1107.     The first  example matches  any route whose  AS-path contains  AS3,  the
  1108.     second matches routes whose AS-path  starts with AS1, the third  matches
  1109.     routes whose  AS-path ends  with AS2,  the fourth  matches routes  whose
  1110.     AS-path is exactly ``1 2 3'', and the fifth matches routes whose AS-path
  1111.     starts with  AS1 and  ends  in AS2  with any  number  of AS  numbers  in
  1112.  
  1113.  
  1114. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 20]
  1115. Internet Draft                      RPSL                      April 23, 1997
  1116.  
  1117.     between.
  1118.  
  1119.  
  1120. Composite Policy Filters
  1121.  
  1122.  
  1123. The following operators (in decreasing order  of evaluation) can be used  to
  1124. form composite policy filters:
  1125.  
  1126.  
  1127. NOT Given a policy  filter x, NOT x matches  the set of routes that are  not
  1128.     matched by x.  That is it is the negation of policy filter x.
  1129.  
  1130. AND Given two policy  filters x and y, x  AND y matches the intersection  of
  1131.     the routes that are matched by x and that are matched by y.
  1132.  
  1133. OR Given two policy filters x and y, x OR y matches the union  of the routes
  1134.     that are matched by x and that are matched by y.
  1135.  
  1136.  
  1137. Note that an OR operator can be implicit, that is `x y' is equivalent  to `x
  1138. OR y'.
  1139.  
  1140.  
  1141.   E.g.
  1142.     NOT {128.9.0.0/16, 128.8.0.0/16}
  1143.     AS226 AS227 OR AS228
  1144.     AS226 AND NOT {128.9.0.0/16}
  1145.     AS226 AND {0.0.0.0/0^0-18}
  1146.  
  1147.  
  1148. The first example  matches any route  except 128.9.0.0/16 and  128.8.0.0/16.
  1149. The second example matches the routes of AS226, AS227 and AS228.  The  third
  1150. example matches the routes of AS226 except 128.9.0.0/16.  The fourth example
  1151. matches the routes of AS226 whose length are shorter than 19.
  1152.  
  1153. Policy filters can also use the  values of other attributes for  comparison.
  1154. The attributes whose values can be  used in policy filters are specified  in
  1155. the RPSL dictionary.   Please refer to  Section 8 for details.   An  example
  1156. using the the BGP community attribute is shown below:
  1157.  
  1158.  
  1159.     aut-num: AS1
  1160.     export: to AS2 announce AS1 AND NOT community.contains(NO_EXPORT)
  1161.  
  1162.  
  1163. Filters using the routing  policy attributes defined  in the dictionary  are
  1164. evaluated before evaluating the operators AND, OR and NOT.
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170. Alaettinoglu et. al.           Expires  October 23, 1997           [Page 21]
  1171. Internet Draft                      RPSL                      April 23, 1997
  1172.  
  1173. 7.1.4 Example Policy Expressions
  1174.  
  1175.  
  1176.  aut-num: AS1
  1177.  import: from AS2 action pref = 1;
  1178.          from AS3 action pref = 2;
  1179.          accept AS4
  1180.  
  1181.  
  1182. The above  example states  that  AS4's routes  are  accepted from  AS2  with
  1183. preference 1,  and from AS3  with preference  2 (routes  with lower  integer
  1184. preference values are preferred over  routes with higher integer  preference
  1185. values).
  1186.  
  1187.  
  1188.  aut-num: AS1
  1189.  import: from AS2 7.7.7.2 at 7.7.7.1 action pref = 1;
  1190.          from AS2                    action pref = 2;
  1191.          accept AS4
  1192.  
  1193.  
  1194. The above example states that AS4's routes are accepted from AS2 on  peering
  1195. 7.7.7.1-7.7.7.2 with preference 1,  and on any other  peering with AS2  with
  1196. preference 2.
  1197.  
  1198.  
  1199. 7.2 export Attribute:  Export Policy Specification
  1200.  
  1201.  
  1202. Similarly,  an  export  policy  expression  is  specified  using  an  export
  1203. attribute.  The export attribute has the following syntax:
  1204.  
  1205.  
  1206.     export: to <peering-1> [action <action-1>]
  1207.             . . .
  1208.             to <peering-N> [action <action-N>]
  1209.             announce <filter>
  1210.  
  1211.  
  1212. The action specification is optional.  The semantics of an export  attribute
  1213. is as  follows:    the set  of  routes  that are  matched  by  <filter>  are
  1214. exported to all the peers specified in <peerings>; while exporting routes at
  1215. <peering-M>, <action-M> is executed.
  1216.  
  1217.  
  1218.  
  1219.   E.g.
  1220.     aut-num: AS1
  1221.     export: to AS2 action med = 5; community .= 70;
  1222.             announce AS4
  1223.  
  1224.  
  1225.  
  1226. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 22]
  1227. Internet Draft                      RPSL                      April 23, 1997
  1228.  
  1229. In this example, AS4's routes are announced to AS2 with the med  attribute's
  1230. value set to 5 and community 70 added to the community list.
  1231.  
  1232. Example:
  1233.  
  1234.  
  1235.     aut-num: AS1
  1236.     export: to AS-FOO announce ANY
  1237.  
  1238.  
  1239. In this example,  AS1 announces all  of its routes  to the  ASes in the  set
  1240. AS-FOO.
  1241.  
  1242.  
  1243. 7.3 Other Routing Protocols, Multi-Protocol Routing Protocols, and Injecting
  1244.     Routes Between Protocols
  1245.  
  1246.  
  1247. The syntax of the import and export attributes are indeed the following:
  1248.  
  1249.  
  1250.     import: [protocol <protocol-1>] [into <protocol-2>]
  1251.             from <peering-1> [action <action-1>]
  1252.             . . .
  1253.             from <peering-N> [action <action-N>]
  1254.             accept <filter>
  1255.     export: [protocol <protocol-1>] [into <protocol-2>]
  1256.             to <peering-1> [action <action-1>]
  1257.             . . .
  1258.             to <peering-N> [action <action-N>]
  1259.             announce <filter>
  1260.  
  1261.  
  1262. Where the  optional  protocol  specifications can  be  used  for  specifying
  1263. policies for  other  routing  protocols,  or for  injecting  routes  of  one
  1264. protocol into another protocol, or for multi-protocol routing policies.  The
  1265. valid protocol  names are  defined  in the  dictionary.    The  <protocol-1>
  1266. is the  name  of  the protocol  whose  routes  are being  exchanged.     The
  1267. <protocol-2> is the name  of the protocol which  is receiving these  routes.
  1268. Both <protocol-1> and <protocol-2> default to the Internet Exterior  Gateway
  1269. Protocol, currently BGP.
  1270.  
  1271. In the following example, all interAS routes are injected into RIP.
  1272.  
  1273.  
  1274.  aut-num: AS1
  1275.  import: from AS2 accept AS2
  1276.  export: protocol BGP into RIP
  1277.          to AS1 announce ANY
  1278.  
  1279.  
  1280.  
  1281.  
  1282. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 23]
  1283. Internet Draft                      RPSL                      April 23, 1997
  1284.  
  1285. In the  following  example, AS1  accepts  AS2's  routes including  any  more
  1286. specifics of AS2's  routes, but does  not inject these  extra more  specific
  1287. routes into OSPF.
  1288.  
  1289.  
  1290.  aut-num: AS1
  1291.  import: from AS2 accept AS2^+
  1292.  export: protocol BGP into OSPF
  1293.          to AS1 announce AS2
  1294.  
  1295.  
  1296. In the following example,  AS1 injects its static  routes (routes which  are
  1297. members of the set AS1:RS-STATIC-ROUTES) to the interAS routing protocol and
  1298. appends AS1 twice to their AS paths.
  1299.  
  1300.  
  1301.  aut-num: AS1
  1302.  import: protocol STATIC into BGP
  1303.          from AS1 action aspath.prepend(AS1, AS1);
  1304.          accept AS1:RS-STATIC-ROUTES
  1305.  
  1306.  
  1307. In the following example,  AS1 imports different set  of unicast routes  for
  1308. multicast reverse path forwarding from AS2:
  1309.  
  1310.  
  1311.  aut-num: AS1
  1312.  import: from AS2 accept AS2
  1313.  import: protocol IDMR
  1314.          from AS2 accept AS2:RS-RPF-ROUTES
  1315.  
  1316.  
  1317. 7.4 Ambiguity Resolution
  1318.  
  1319.  
  1320. It is possible that the same peering can be covered by more that one peering
  1321. specification in a policy expression.  For example:
  1322.  
  1323.  
  1324.  aut-num: AS1
  1325.  import: from AS2 7.7.7.2 at 7.7.7.1 action pref = 2;
  1326.          from AS2 7.7.7.2 at 7.7.7.1 action pref = 1;
  1327.          accept AS4
  1328.  
  1329.  
  1330. This is  not an  error,  though definitely  not  desirable.   To  break  the
  1331. ambiguity, the action  corresponding to the  first peering specification  is
  1332. used.  That is the routes are accepted with preference 2.  We call this rule
  1333. as the specification-order rule.
  1334.  
  1335. Consider the example:
  1336.  
  1337.  
  1338. Alaettinoglu et. al.           Expires  October 23, 1997           [Page 24]
  1339. Internet Draft                      RPSL                      April 23, 1997
  1340.  
  1341.  aut-num: AS1
  1342.  import: from AS2                    action pref = 2;
  1343.          from AS2 7.7.7.2 at 7.7.7.1 action pref = 1; dpa = 5;
  1344.          accept AS4
  1345.  
  1346.  
  1347. where both peering specifications cover the peering 7.7.7.1-7.7.7.2,  though
  1348. the second one covers  it more specifically.   The specification order  rule
  1349. still applies, and only the action ``pref =  2'' is executed.  In fact,  the
  1350. second peering-action pair has  no use since  the first peering-action  pair
  1351. always covers it.   If the intended policy was  to accept these routes  with
  1352. preference 1 on this particular peering  and with preference 2 in all  other
  1353. peerings, the user should have specified:
  1354.  
  1355.  
  1356.  aut-num: AS1
  1357.  import: from AS2 7.7.7.2 at 7.7.7.1 action pref = 1; dpa = 5;
  1358.          from AS2                    action pref = 2;
  1359.          accept AS4
  1360.  
  1361.  
  1362. It is also possible that more than one policy expression can cover the  same
  1363. set of routes for the same peering.  For example:
  1364.  
  1365.  
  1366.  aut-num: AS1
  1367.  import: from AS2 action pref = 2; accept AS4
  1368.  import: from AS2 action pref = 1; accept AS4
  1369.  
  1370.  
  1371. In this case, the specification-order  rule is still used.   That is,  AS4's
  1372. routes are  accepted from  AS2  with preference  2.    If the  filters  were
  1373. overlapping but not exactly the same:
  1374.  
  1375.  
  1376.  aut-num: AS1
  1377.  import: from AS2 action pref = 2; accept AS4
  1378.  import: from AS2 action pref = 1; accept AS4 OR AS5
  1379.  
  1380.  
  1381. the AS4's routes are accepted from  AS2 with preference 2 and however  AS5's
  1382. routes are also accepted, but with preference 1.
  1383.  
  1384. We next give  the general specification  order rule for  the benefit of  the
  1385. RPSL implementors.  Consider two policy expressions:
  1386.  
  1387.  
  1388.  aut-num: AS1
  1389.  import: from peerings-1 action action-1 accept filter-1
  1390.  import: from peerings-2 action action-2 accept filter-2
  1391.  
  1392.  
  1393.  
  1394. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 25]
  1395. Internet Draft                      RPSL                      April 23, 1997
  1396.  
  1397. The  above  policy  expressions  are  equivalent  to  the  following   three
  1398. expressions where there is no overlap:
  1399.  
  1400.  
  1401.  aut-num: AS1
  1402.  import: from peerings-1 action action-1 accept filter-1
  1403.  import: from peerings-3 action action-2 accept filter-2 AND NOT filter-1
  1404.  import: from peerings-4 action action-2 accept filter-2
  1405.  
  1406.  
  1407. where  peerings-3  are  those  that  are  covered  by  both  peerings-1  and
  1408. peerings-2, and peerings-4 are those that are covered by peerings-2 but  not
  1409. by peerings-1 (``filter-2  AND NOT  filter-1'' matches the  routes that  are
  1410. matched by filter-2 but not by filter-1).
  1411.  
  1412. Example:
  1413.  
  1414.  
  1415.  aut-num: AS1
  1416.  import: from AS2 7.7.7.2 at 7.7.7.1
  1417.          action pref = 2;
  1418.          accept {128.9.0.0/16}
  1419.  import: from AS2
  1420.          action pref = 1;
  1421.          accept {128.9.0.0/16, 75.0.0.0/8}
  1422.  
  1423.  
  1424. Lets consider two  peerings with AS2,  7.7.7.1-7.7.7.2 and  9.9.9.1-9.9.9.2.
  1425. Both policy expressions cover 7.7.7.1-7.7.7.2.   On this peering, the  route
  1426. 128.9.0.0/16 is accepted  with preference  2,  and the  route 75.0.0.0/8  is
  1427. accepted with preference 1.  The peering 9.9.9.1-9.9.9.2 is only covered  by
  1428. the second policy expressions.   Hence, both the route 128.9.0.0/16 and  the
  1429. route 75.0.0.0/8 are accepted with preference 1 on peering 9.9.9.1-9.9.9.2.
  1430.  
  1431.  
  1432. 7.5 default Attribute:  Default Policy Specification
  1433.  
  1434.  
  1435. Default routing policies  are specified using  the default attribute.    The
  1436. default attribute has the following syntax:
  1437.  
  1438.  
  1439.     default: to <peering> [action <action>] [networks <filter>]
  1440.  
  1441.  
  1442. The <action>  and  <filter> specifications  are  optional.    The  semantics
  1443. are as  follows:   The <peering>  specification indicates  the AS  (and  the
  1444. router if  present)  is being  defaulted  to;  the  <action>  specification,
  1445. if present,  indicates  various  attributes of  defaulting,  for  example  a
  1446. relative preference if  multiple defaults  are specified;  and the  <filter>
  1447. specifications, if present, is a policy filter.  A router chooses a  default
  1448.  
  1449.  
  1450. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 26]
  1451. Internet Draft                      RPSL                      April 23, 1997
  1452.  
  1453. router from the routes in its routing table that matches this <filter>.
  1454.  
  1455. In the following example, AS1 defaults to AS2 for routing.
  1456.  
  1457.  
  1458.  aut-num: AS1
  1459.  default: to AS2
  1460.  
  1461.  
  1462. In the following example, router 7.7.7.1  in AS1 defaults to router  7.7.7.2
  1463. in AS2.
  1464.  
  1465.  
  1466.  aut-num: AS1
  1467.  default: to AS2 7.7.7.2 at 7.7.7.1
  1468.  
  1469.  
  1470. In the following example, AS1 defaults to AS2 and AS3, but prefers AS2  over
  1471. AS3.
  1472.  
  1473.  
  1474.  aut-num: AS1
  1475.  default: to AS2 action pref = 1;
  1476.  default: to AS3 action pref = 2;
  1477.  
  1478.  
  1479. In the following example, AS1 defaults  to AS2 and uses 128.9.0.0/16 as  the
  1480. default network.
  1481.  
  1482.  
  1483.  aut-num: AS1
  1484.  default: to AS2 networks { 128.9.0.0/16 }
  1485.  
  1486.  
  1487. 7.6 Structured Policy Specification
  1488.  
  1489.  
  1490. The import  and  export policies  can  be structured.    We  only  reccomend
  1491. structured policies to advanced RPSL users.   Please feel free to skip  this
  1492. section.
  1493.  
  1494. The BNF for a structured policy specification is the following:
  1495.  
  1496.  
  1497.    <import-factor> ::= <import-expression> |
  1498.                        from <peering-1> [action <action-1>]
  1499.                        . . .
  1500.                        from <peering-N> [action <action-N>]
  1501.                        accept <filter>;
  1502.  
  1503.    <import-term> ::=  <import-factor> |
  1504.  
  1505.  
  1506. Alaettinoglu et. al.           Expires  October 23, 1997           [Page 27]
  1507. Internet Draft                      RPSL                      April 23, 1997
  1508.  
  1509.                       LEFT-BRACE
  1510.                       <import-factor>
  1511.                       . . .
  1512.                       <import-factor>
  1513.                       RIGHT-BRACE
  1514.  
  1515.    <import-expression> ::= <import-term>                            |
  1516.                            <import-term> EXCEPT <import-expression> |
  1517.                            <import-term> REFINE <import-expression>
  1518.  
  1519.  
  1520. Please note the semicolon at the end of an <import-factor>.  The syntax  and
  1521. semantics for an <import-factor> is already defined in Section 7.1.
  1522.  
  1523. An <import-term> is either a  sequence of <import-factor>'s enclosed  within
  1524. matching braces (i.e. `{'  and `}') or just  a single <import-factor>.   The
  1525. semantics of an <import-term>  is the union  of <import-factor>'s using  the
  1526. specification order rule.  Here is an example of an <import-term>:
  1527.  
  1528.  
  1529.    {
  1530.       from AS1 accept AS1;
  1531.       from AS2 accept AS2;
  1532.    }
  1533.  
  1534.  
  1535. where AS1's routes are imported from AS1 and AS2's routes are imported  from
  1536. AS2.  A nice way to view an <import-term> is as a set of import policies.
  1537.  
  1538. An <import-expression>  is either  an <import-term>  or two  <import-term>'s
  1539. separated by keywords "except" or "refine".   Without going into  semantics,
  1540. for example:
  1541.  
  1542.  
  1543.    {
  1544.       from AS1 accept AS1;
  1545.       from AS2 accept AS2;
  1546.    } except {
  1547.          from AS3 accept {128.9.0.0/16};
  1548.      }
  1549.  
  1550.  
  1551. is an <import-expression>.   A nice way to  view except and refine  keywords
  1552. is as policy-set  operators.   To  provide nesting,  an  <import-expression>
  1553. is also an <import-factor>.   Hence there  can be exceptions to  exceptions,
  1554. refinements to refinements, or even refinements to exceptions, and so on.
  1555.  
  1556. The semantics for the except policy-set operator is as follows:  The  result
  1557. of an except operation is another  <import-term>.  The resulting policy  set
  1558. contains the policies of the right hand set unmodified.  The policies of the
  1559. left hand set are also contained  but their filters are modified to  exclude
  1560.  
  1561.  
  1562. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 28]
  1563. Internet Draft                      RPSL                      April 23, 1997
  1564.  
  1565. the filters of the right hand set.  That is, the policies in the  right hand
  1566. set are exceptions to  the policies in the  left hand set.   When there  are
  1567. multiple levels of  nesting,  the operations  (both except  and refine)  are
  1568. performed right to left.
  1569.  
  1570. We next modify the syntax of the import attribute to:
  1571.  
  1572.  
  1573.  import: [protocol <protocol1>] [into <protocol2>]
  1574.          <import-expression>
  1575.  
  1576.  
  1577. If the <import-expression> in  an import attribute  is not structured,  i.e.
  1578. contains a single <import-factor>, the semicolon after it can be omitted.
  1579.  
  1580. Consider the following example:
  1581.  
  1582.  
  1583.  import: from AS1 accept as-foo;
  1584.          except {
  1585.             from AS2 accept AS226;
  1586.             except {
  1587.                from AS3 accept {128.9.0.0/16};
  1588.             }
  1589.          }
  1590.  
  1591.  
  1592. where the route 128.9.0.0/16 is originated  by AS226, and AS226 is a  member
  1593. of the as set as-foo.   In this example, the route 128.9.0.0/16 is  accepted
  1594. from AS3, any other route (not 128.9.0.0/16) originated by AS226 is accepted
  1595. from AS2, and any other ASes' routes in as-foo is accepted from AS1.
  1596.  
  1597. We can  come  to  the  same conclusion  using  the  algebra  defined  above.
  1598. Consider the inner exception specification:
  1599.  
  1600.  
  1601.    from AS2 accept AS226;
  1602.    except {
  1603.       from AS3 accept {128.9.0.0/16};
  1604.    }
  1605.  
  1606.  
  1607. is equivalent to
  1608.  
  1609.  
  1610.   {
  1611.    from AS3 accept {128.9.0.0/16};
  1612.    from AS2 accept AS226 AND NOT {128.9.0.0/16};
  1613.   }
  1614.  
  1615.  
  1616.  
  1617.  
  1618. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 29]
  1619. Internet Draft                      RPSL                      April 23, 1997
  1620.  
  1621. Hence, the original expression is equivalent to:
  1622.  
  1623.  
  1624.  import: from AS1 accept as-foo;
  1625.          except {
  1626.             from AS3 accept {128.9.0.0/16};
  1627.             from AS2 accept AS226 AND NOT {128.9.0.0/16};
  1628.          }
  1629.  
  1630.  
  1631. which is equivalent to
  1632.  
  1633.  
  1634.  import: {
  1635.            from AS3 accept {128.9.0.0/16};
  1636.            from AS2 accept AS226 AND NOT {128.9.0.0/16};
  1637.            from AS1 accept as-foo AND NOT
  1638.                 (AS226 AND NOT {128.9.0.0/16} OR {128.9.0.0/16});
  1639.          }
  1640.  
  1641.  
  1642. In the  case  of  the  refine policy-set  operator,  the  resulting  set  is
  1643. constructed by taking the cartasian product of the two sets as follows:  for
  1644. each policy l in the left hand set  and for each policy r in the right  hand
  1645. set, the peerings of the resulting policy are the peerings common to both  r
  1646. and l; the filter of the resulting policy is the intersection of l's  filter
  1647. and r's filter; and  action of the resulting  policy is l's action  followed
  1648. by r's action.  If there are  no common peerings, or if the intersection  of
  1649. filters is empty, a resulting policy is not generated.
  1650.  
  1651. Consider the following example:
  1652.  
  1653.  
  1654.  import: { from AS-ANY action pref = 1; accept community.contains({3560,10});
  1655.            from AS-ANY action pref = 2; accept community.contains({3560,20});
  1656.          } refine {
  1657.             from AS1 accept AS1;
  1658.             from AS2 accept AS2;
  1659.             from AS3 accept AS3;
  1660.          }
  1661.  
  1662.  
  1663. Here, any route with community  {3560,10} is assigned a preference  of 1 and
  1664. any route with community {3560,20} is assigned a  preference of 2 regardless
  1665. of whom they are  imported from.   However, only  AS1's routes are  imported
  1666. from AS1, and only AS2's routes are imported from AS2, and only AS3's routes
  1667. are imported form AS3, and no routes are imported from any other AS. We  can
  1668. reach the same conclusion using the above algebra.  That is, our example  is
  1669. equivalent to:
  1670.  
  1671.  
  1672.  
  1673. Alaettinoglu et. al.           Expires  October 23, 1997           [Page 30]
  1674. Internet Draft                      RPSL                      April 23, 1997
  1675.  
  1676.  import: {
  1677.    from AS1 action pref = 1; accept community.contains({3560,10}) AND AS1;
  1678.    from AS1 action pref = 2; accept community.contains({3560,20}) AND AS1;
  1679.    from AS2 action pref = 1; accept community.contains({3560,10}) AND AS2;
  1680.    from AS2 action pref = 2; accept community.contains({3560,20}) AND AS2;
  1681.    from AS3 action pref = 1; accept community.contains({3560,10}) AND AS3;
  1682.    from AS3 action pref = 2; accept community.contains({3560,20}) AND AS3;
  1683.  }
  1684.  
  1685.  
  1686. Note that the common peerings between  ``from AS1'' and ``from AS-ANY''  are
  1687. those peerings in  ``from AS1''.    Even though  we do  not formally  define
  1688. ``common peerings'', it is  straight forward to  deduce the definition  from
  1689. the definitions of peerings (please see Section 7.1.1).
  1690.  
  1691. Consider the following example:
  1692.  
  1693.  
  1694.  import: {
  1695.    from AS-ANY action med = 0; accept {0.0.0.0/0^0-16};
  1696.    } refine {
  1697.         from AS1 at 7.7.7.1 action pref = 1; accept AS1;
  1698.         from AS1            action pref = 2; accept AS1;
  1699.      }
  1700.  
  1701.  
  1702. where only routes of length 0 to 16 are accepted and med's value is set to 0
  1703. to disable med's effect for all peerings;  In addition, from AS1 only  AS1's
  1704. routes are imported, and AS1's routes imported at 7.7.7.1 are preferred over
  1705. other peerings.  This is equivalent to:
  1706.  
  1707.  
  1708.  import: {
  1709.     from AS1 at 7.7.7.1 action med=0; pref=1; accept {0.0.0.0/0^0-16} AND AS1;
  1710.     from AS1            action med=0; pref=2; accept {0.0.0.0/0^0-16} AND AS1;
  1711.  }
  1712.  
  1713.  
  1714. The above  syntax and  semantics  also apply  equally to  structured  export
  1715. policies with ``from'' replaced with ``to'' and ``accept'' is replaced  with
  1716. ``announce''.
  1717.  
  1718.  
  1719. 8 dictionary Class
  1720.  
  1721.  
  1722. The dictionary  class provides  extensibility  to RPSL.  Dictionary  objects
  1723. define routing policy  attributes, types,  and routing protocols.    Routing
  1724.  
  1725.  
  1726.  
  1727. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 31]
  1728. Internet Draft                      RPSL                      April 23, 1997
  1729.  
  1730. policy attributes, henceforth called rp-attributes, may correspond to actual
  1731. protocol attributes, such as the  BGP path attributes (e.g. community,  dpa,
  1732. and AS-path), or they may correspond to router features (e.g. BGP route flap
  1733. damping).  As new protocols, new protocol attributes, or new router features
  1734. are introduced,  the dictionary  object is  updated to  include  appropriate
  1735. rp-attribute and protocol definitions.
  1736.  
  1737. An rp-attribute is an abstract class;  that is their data representation  is
  1738. not available.   Instead,  they are accessed  through access methods.    For
  1739. example, the rp-attribute for  the BGP AS-path  attribute is called  aspath;
  1740. and it has an access method called prepend which stuffs extra AS numbers  to
  1741. the AS-path attributes.  Access methods  can take arguments.  Arguments  are
  1742. strongly typed.  For example, the  method prepend above takes AS numbers  as
  1743. argument.
  1744.  
  1745. Once an  rp-attribute is  defined  in the  dictionary,  it  can be  used  to
  1746. describe policy filters  and actions.   Policy analysis  tools are  required
  1747. to fetch the  dictionary object and  recognize newly defined  rp-attributes,
  1748. types, and protocols.   The analysis tools  may approximate policy  analyses
  1749. on rp-attributes that they  do not understand:   a filter method may  always
  1750. match, and an action method may always perform no-operation.  Analysis tools
  1751. may even download  code to perform  appropriate operations using  mechanisms
  1752. outside the scope of RPSL.
  1753.  
  1754. We next describe the  syntax and semantics  of the dictionary  class.   This
  1755. description is not essential for understanding dictionary objects (but it is
  1756. essential for creating one).  Please  feel free to skip to the RPSL  Initial
  1757. Dictionary subsection (Section 8.1).
  1758.  
  1759. The attributes  of  the dictionary  class  are shown  in  Figure 14.     The
  1760. dictionary attribute is the name of the dictionary object, obeying the  RPSL
  1761. naming rules.  There can be many dictionary objects, however there is always
  1762. one well-known dictionary object ``RPSL''. All tools use this dictionary  by
  1763. default.
  1764.  
  1765.  
  1766. Attribute      Value                    Type
  1767. dictionary     <object-name>            mandatory, single-valued, class key
  1768. rp-attribute   see description in text  optional, multi valued
  1769. typedef        see description in text  optional, multi valued
  1770. protocol       see description in text  optional, multi valued
  1771. encapsulation  see Section 11           optional, multi valued
  1772.  
  1773.                   Figure 14:  dictionary Class Attributes
  1774.  
  1775.  
  1776.  
  1777. The rp-attribute attribute has the following syntax:
  1778.  
  1779.  
  1780.    rp-attribute: <name>
  1781.  
  1782.  
  1783. Alaettinoglu et. al.           Expires  October 23, 1997           [Page 32]
  1784. Internet Draft                      RPSL                      April 23, 1997
  1785.  
  1786.       <method-1>(<type-1-1>, ..., <type-1-N1> [, "..."])
  1787.       ...
  1788.       <method-M>(<type-M-1>, ..., <type-M-NM> [, "..."])
  1789.  
  1790.  
  1791. where <name> is the name of the rp-attribute; and <method-i> is the name  of
  1792. an access method for  the rp-attribute, taking Ni  arguments where the  j-th
  1793. argument is of type <type-i-j>.  A method name is either an RPSL name or one
  1794. of the operators defined in Figure 15.   The operator methods can take  only
  1795. one argument.
  1796.  
  1797.  
  1798.    operator=           operator==
  1799.    operator<<=         operator<
  1800.    operator>>=         operator>
  1801.    operator+=          operator>=
  1802.    operator-=          operator<=
  1803.    operator*=
  1804.    operator/=
  1805.    operator.=
  1806.  
  1807.  
  1808.                            Figure 15:  Operators
  1809.  
  1810. An rp-attribute can have many methods defined  for it.  Some of the  methods
  1811. may even have the same name, in which case their arguments are of  different
  1812. types.   If the argument  list is followed  by ``...'',  the method takes  a
  1813. variable number of arguments.  In this case, the actual arguments after  the
  1814. Nth argument are of type <type-N>.
  1815.  
  1816. Arguments are strongly  typed.   A type  of an  argument can be  one of  the
  1817. predefined types or  one of the  dictionary defined types.   The  predefined
  1818. type names are listed in Figure 16.   The integer and the real types can  be
  1819. followed by a lower and  an upper bound to specify  the set of valid  values
  1820. of the argument.  The  range specification is optional.   We use the ANSI  C
  1821. language conventions for representing integer, real and string values.   The
  1822. enum type is followed by a list of RPSL names which are the valid  values of
  1823. the type.  The boolean  type can take the values true  or false.  as_number,
  1824. ip_address, address_prefix and dns_name types are  as in Section  2.   filter
  1825. type is a policy filter as in Section 7.
  1826.  
  1827.  
  1828.    integer[lower, upper]              as_number
  1829.    real[lower, upper]                 ipv4_address
  1830.    enum[name, name, ...]              address_prefix
  1831.    string                             dns_name
  1832.    boolean                            filter
  1833.  
  1834.  
  1835.                         Figure 16:  Predefined Types
  1836.  
  1837.  
  1838.  
  1839. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 33]
  1840. Internet Draft                      RPSL                      April 23, 1997
  1841.  
  1842. The typedef attribute specifies a dictionary defined type.  Its syntax is as
  1843. follows:
  1844.  
  1845.  
  1846.    typedef: <name> <type-1> ... <type-N>
  1847.  
  1848.  
  1849. where <name> is the name of the  type being defined and <type-M> is  another
  1850. type name, either predefined or dictionary defined.   The type defined by  a
  1851. typedef is either of the types 1 through N (analogous to unions in C[19]).
  1852.  
  1853. A dictionary defined type can also be a list type, specified as:
  1854.  
  1855.  
  1856.         list [<min_elems>:<max_elems>] of <type>
  1857.  
  1858.  
  1859. where the  list  elements are  of  <type> and  the  list contains  at  least
  1860. <min_elems> and  at most  <max_elems>  elements.   The  size specification  is
  1861. optional.   In this  case, there  is no restriction  in the  number of  list
  1862. elements.  A value of a list  type is represented as a sequence of  elements
  1863. separated by the character  ``,'' and enclosed  by the characters ``{''  and
  1864. ``}''.
  1865.  
  1866. A protocol attribute of  the dictionary class defines  a protocol and a  set
  1867. of peering options for  that protocol (which are  used in inet-rtr class  in
  1868. Section 10).  Its syntax is as follows:
  1869.  
  1870.  
  1871.    protocol: <name>
  1872.     MANDATORY | OPTIONAL <option-1>(<type-1-1>, ..., <type-1-N1> [, "..."])
  1873.     ...
  1874.     MANDATORY | OPTIONAL <option-M>(<type-M-1>, ..., <type-M-NM> [, "..."])
  1875.  
  1876.  
  1877. where <name>  is  the name  of  the protocol;  MANDATORY  and  OPTIONAL  are
  1878. keywords; and <option-i> is  a peering option for  this protocol, taking  Ni
  1879. many arguments.   The syntax and  semantics of the arguments  are as in  the
  1880. rp-attribute.  If the keyword MANDATORY is used the option is mandatory  and
  1881. needs to be specified  for each peering  of this protocol.   If the  keyword
  1882. OPTIONAL is used the option can be skipped.
  1883.  
  1884. The  encapsulation  attribute  defines   a  valid  encapsulation  name   for
  1885. inet-tunnel objects.  Please refer to Section 11 for details.
  1886.  
  1887.  
  1888. 8.1 Initial RPSL Dictionary and Example Policy Actions and Filters
  1889.  
  1890.  
  1891.  
  1892.  
  1893. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 34]
  1894. Internet Draft                      RPSL                      April 23, 1997
  1895. dictionary:   RPSL
  1896. rp-attribute: pref # preference, smaller values represent higher preferences
  1897.               operator=(integer[0, 65535])  # assign an integer
  1898. rp-attribute: med    # BGP multi_exit_discriminator attribute
  1899.               operator=(integer[0, 65535])  # assign an integer
  1900.               operator=(enum[igp_cost])     # assign the IGP metric
  1901. rp-attribute: dpa    # BGP destination preference attribute (dpa)
  1902.               operator=(integer[0, 65535])   # assign an integer
  1903. rp-attribute: aspath # BGP aspath attribute
  1904.               prepend(as_number, ...)       # prepend the AS numbers
  1905.                                             # from last to first order
  1906. typedef:      community_elm # needed for the community attribute
  1907.               integer[1, 4294967200],       # 4 byte community value
  1908.               enum[internet, no_export, no_advertise] # defined in RFC 1997
  1909.               list[2:2] of integer[0, 65535] # construct a 4 byte integer
  1910.                                              # by concating two  2-byte integers
  1911. typedef:      community_list # needed for the community attribute
  1912.               list of community_elm
  1913. rp-attribute: community # BGP community attribute
  1914.               operator=(community_list)     # assign a list of communities
  1915.               operator==(community_list)    # true if equals the argument
  1916.                                             # order independent comparison
  1917.               operator.=(community_elm)     # append just one community
  1918.               append(community_elm, ...)    # append the listed communities
  1919.               delete(community_elm, ...)    # delete the listed communities
  1920.               contains(community_elm, ...)  # true if one of comms is contained
  1921. rp-attribute: flap_damp # flap_damping router feature
  1922.               enable()                      # enable flap_damping
  1923.               disable()                     # disable flap_damping
  1924. rp-attribute: next-hop # next hop router in a static route
  1925.               operator=(ipv4_address)       # assign a router address
  1926.               operator=(enum[self])         # assign router's own address
  1927. rp-attribute: cost # cost of a static route
  1928.               operator=(integer[0, 65535])  # assign an integer
  1929. rp-attribute: ttlscope # IP time-to-live, useful for tunnels
  1930.               operator=(integer[0, 65535])  # assign an integer
  1931. rp-attribute: dvmrp-metric # A DVMRP metric, useful for tunnels
  1932.               operator=(integer[0, 65535])  # assign an integer
  1933. rp-attribute: boundary # for admin scoped multicast
  1934.               operator=(list of address_prefix) # assign address regions
  1935.  
  1936.  
  1937.                     Figure 17:  RPSL Dictionary (cont.)
  1938.  
  1939.  
  1940. The  Figure  18  shows  the  initial   RPSL  dictionary.     It  has   eight
  1941. rp-attributes:   pref to  assign local  preference to  the routes  accepted;
  1942. med to assign a value  to the MULTI_EXIT_DISCRIMINATOR BGP attribute; dpa  to
  1943.  
  1944.  
  1945.  
  1946. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 35]
  1947. Internet Draft                      RPSL                      April 23, 1997
  1948.  
  1949.  
  1950.  encapsulation: IPinIP
  1951.  encapsulation: IPMOBILITY
  1952.  encapsulation: DVMRP
  1953.  encapsulation: GRE
  1954.  encapsulation: IPv6
  1955.  protocol:     BGP # Border Gateway Protocol
  1956.                MANDATORY asno(as_number)   # as number of the peer router
  1957.                OPTIONAL flap_damp()        # enable flap damping
  1958.  protocol:     OSPF
  1959.  protocol:     RIP
  1960.  protocol:     IGRP
  1961.  protocol:     IS-IS
  1962.  protocol:     STATIC
  1963.  protocol:     RIPv6
  1964.  protocol:     DVMRP
  1965.  protocol:     PIM-DM
  1966.  protocol:     PIM-SM
  1967.  protocol:     CBT
  1968.  protocol:     MOSPF
  1969.  
  1970.  
  1971.                         Figure 18:  RPSL Dictionary
  1972.  
  1973. assign a value to the  DPA BGP attribute; aspath  to prepend a value to  the
  1974. AS_PATH BGP attribute; community to  assign a value to or to check the  value
  1975. of the community BGP attribute; flap_damp to enable or disable routing  flap
  1976. damping feature  of the  routers; next-hop  to assign  next  hop routers  to
  1977. static routes; and cost to assign a  cost to static routes.  The  dictionary
  1978. defines two types:   community_elm and  community_list.    community_elm  type
  1979. is either a  4-byte unsigned integer,  or one  of the keywords  no_export  or
  1980. no_advertise (defined  in [9]),  or a list  of two  2-byte unsigned  integers
  1981. in which case the  two integers are concatenated  to form a 4-byte  integer.
  1982. (The last form  is often  used in the  Internet to  partition the  community
  1983. space.  A provider uses its AS number as the first two bytes, and  assigns a
  1984. semantics of its choice to the last two bytes.)  The rp-attributes ttlscope,
  1985. dvmrp-metric, boundary  are for  specifying tunnel  characteristics and  are
  1986. described in Section 11.
  1987.  
  1988. The initial  dictionary (Figure  18)  defines only  options for  the  Border
  1989. Gateway Protocol:  asno and flap_damp.   The mandatory asno option is the  AS
  1990. number of the  peer router.    The optional  flap_damp  option instructs  the
  1991. router to damp route flaps when importing routes from the peer router.
  1992.  
  1993. The initial  dictionary  (Figure  18) defines  the  following  encapsulation
  1994. types:  IPinIP  [28], IPMOBILITY  [23], DVMRP   [24],  GRE   [15], and  IPv6
  1995. [10].
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 36]
  2003. Internet Draft                      RPSL                      April 23, 1997
  2004.  
  2005. Policy Actions and Filters Using RP-Attributes
  2006.  
  2007.  
  2008. The syntax of  a policy action  or a filter  using an rp-attribute  x is  as
  2009. follows:
  2010.  
  2011.  
  2012.     x.method(arguments)
  2013.     x ``op'' argument
  2014.  
  2015.  
  2016. where  method  is  a  method  and  ``op''  is  an  operator  method  of  the
  2017. rp-attribute x.   If an operator  method is used  in specifying a  composite
  2018. policy filter,  it  evaluates  earlier  than  the  composite  policy  filter
  2019. operators (i.e. AND, OR, NOT, and implicit or operator).
  2020.  
  2021. The pref rp-attribute can be assigned a positive integer as follows:
  2022.  
  2023.  
  2024.    pref = 10;
  2025.  
  2026.  
  2027. The med rp-attribute can be assigned  either a positive integer or the  word
  2028. ``igp_cost'' as follows:
  2029.  
  2030.  
  2031.    med = 0;
  2032.    med = igp_cost;
  2033.  
  2034.  
  2035. The dpa rp-attribute can be assigned a positive integer as follows:
  2036.  
  2037.  
  2038.    dpa = 100;
  2039.  
  2040.  
  2041. The BGP  community  attribute is  list-valued,  that  is  it is  a  list  of
  2042. 4-byte integers each representing a  ``community''.  The following  examples
  2043. demonstrate how to add communities to this rp-attribute:
  2044.  
  2045.  
  2046.    community .= 100;
  2047.    community .= NO_EXPORT;
  2048.    community .= {3561,10};
  2049.  
  2050.  
  2051. In the last case, a 4-byte integer is constructed where the more significant
  2052. two bytes equal  3561 and  the less  significant two bytes  equal 10.    The
  2053. following examples demonstrate how to delete communities from the  community
  2054. rp-attribute:
  2055.  
  2056.  
  2057.  
  2058. Alaettinoglu et. al.           Expires  October 23, 1997           [Page 37]
  2059. Internet Draft                      RPSL                      April 23, 1997
  2060.  
  2061.    community.delete(100, NO_EXPORT, {3561,10});
  2062.  
  2063.  
  2064. Filters that use the community  rp-attribute can be defined as  demonstrated
  2065. by the following examples:
  2066.  
  2067.  
  2068.    community.contains(100, NO_EXPORT, {3561,10});
  2069.  
  2070.  
  2071. The community rp-attribute can be set to a list of communities as follows:
  2072.  
  2073.  
  2074.    community = {100, NO_EXPORT, {3561,10}, 200};
  2075.    community = {};
  2076.  
  2077.  
  2078. In this  first case,  the community  rp-attribute contains  the  communities
  2079. 100, NO_EXPORT, {3561,10},  and 200.    In  the latter  case, the  community
  2080. rp-attribute is cleared.  The community rp-attribute can be compared against
  2081. a list of communities as follows:
  2082.  
  2083.  
  2084.    community == {100, NO_EXPORT, {3561,10}, 200};
  2085.  
  2086.  
  2087. To influence the route selection,  the BGP as_path rp-attribute can be  made
  2088. longer by prepending AS numbers to it as follows:
  2089.  
  2090.  
  2091.    aspath.prepend(AS1);
  2092.    aspath.prepend(AS1, AS1, AS1);
  2093.  
  2094.  
  2095. Flap damping can be turned on or off as follows:
  2096.  
  2097.  
  2098.    flap_damp.enable();
  2099.    flap_damp.disable();
  2100.  
  2101.  
  2102. The following examples are invalid:
  2103.  
  2104.  
  2105.    med = -50;                     # -50 is not in the range
  2106.    med = igp;                     # igp is not one of the enum values
  2107.    med.assign(10);                # method assign is not defined
  2108.    community.append({AS3561,20}); # the first argument should be 3561
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 38]
  2115. Internet Draft                      RPSL                      April 23, 1997
  2116.  
  2117. Figure 19 shows a  more advanced example  using the rp-attribute  community.
  2118. In this  example,  AS3561  bases  its  route  selection  preference  on  the
  2119. community attribute.    Other  ASes  may indirectly  affect  AS3561's  route
  2120. selection  by  including   the  appropriate  communities   in  their   route
  2121. announcements.
  2122.  
  2123.  aut-num: AS1
  2124.  export: to AS2 action community.={3561,10};
  2125.          to AS3 action community.={3561,20};
  2126.          announce AS1
  2127.  
  2128.  as-set: AS3561:AS-PEERS
  2129.  members: AS2, AS3
  2130.  
  2131.  aut-num: AS3561
  2132.  import: from AS3561:AS-PEERS
  2133.          action pref = 10;
  2134.          accept community.contains({3561,10})
  2135.  import: from AS3561:AS-PEERS
  2136.          action pref = 20;
  2137.          accept community.contains({3561,20})
  2138.  import: from AS3561:AS-PEERS
  2139.          action pref = 30;
  2140.          accept ANY
  2141.  
  2142.  
  2143.         Figure 19:  Policy example using the community rp-attribute.
  2144.  
  2145.  
  2146.  
  2147. 9 Advanced route Class
  2148.  
  2149.  
  2150. 9.1 Specifying Static Routes
  2151.  
  2152.  
  2153. The attribute inject-at can be used to specify static routes.  Its syntax is
  2154. as follows:
  2155.  
  2156.  
  2157.    inject-at: <router> [action <action>]
  2158.  
  2159.  
  2160. where <router>  is an  IP address  of a  router and  <action> is  as in  the
  2161. aut-num class.  <router> executes the <action> and injects the route to  the
  2162. interAS routing system.  <action> may set certain route attributes such as a
  2163. next-hop router or a cost.
  2164.  
  2165. In the following example, the router 7.7.7.1 injects the route 128.7.0.0/16.
  2166. The next-hop routers (in this example,  there are two next-hop routers)  for
  2167. this route are  7.7.7.2 and  7.7.7.3 and  the route has  a cost  of 10  over
  2168.  
  2169.  
  2170. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 39]
  2171. Internet Draft                      RPSL                      April 23, 1997
  2172.  
  2173. 7.7.7.2 and 20 over 7.7.7.3.
  2174.  
  2175.  
  2176.    route:     128.7.0.0/16
  2177.    origin:    AS1
  2178.    inject-at: 7.7.7.1 action next-hop = 7.7.7.2; cost = 10;
  2179.    inject-at: 7.7.7.1 action next-hop = 7.7.7.3; cost = 20;
  2180.  
  2181.  
  2182. 9.2 Specifying Aggregate Routes
  2183.  
  2184.  
  2185. The attributes  aggr-by, inject-at,  export-comps, and  holes  are used  for
  2186. specifying aggregate routes [13].
  2187.  
  2188. The aggr-by attribute  defines what component  routes are used  to form  the
  2189. aggregate.  Its syntax is as follows:
  2190.  
  2191.  
  2192.    aggr-by: [atomic] <filter>
  2193.  
  2194.  
  2195. A router in the origin AS forms the aggregate route if there is at least one
  2196. route in its routing  table that matches  <filter>.   If the keyword  ATOMIC
  2197. is specified, the  aggregation is  done atomically, otherwise  the BGP  path
  2198. attributes of the matching routes are  used to form the BGP path  attributes
  2199. of the aggregate route.   For  example, if atomic  aggregation is done,  the
  2200. aggregate route  would have  an  AS-path that  starts from  the  aggregating
  2201. AS [13].   Otherwise, the aggregate route  would have an AS-path  containing
  2202. AS-sets formed from the AS-paths of the matching routes.
  2203.  
  2204. Figure 20  shows  some example  aggregate  route  objects.    The  aggregate
  2205. 128.9.0.0/16 is  generated if  there  is a  route  that matches  the  filter
  2206. ``128.9.0.0/16^- AND  <^AS226>''  (this  filter matches  more  specifics  of
  2207. 128.9.0.0/16 that are  received form  AS226).   The BGP  path attributes  of
  2208. the matching  routes  are  used to  form  the  BGP path  attributes  of  the
  2209. route 128.9.0.0/16.  Similarly,  the aggregate 128.8.0.0/16 is generated  if
  2210. there is a route  that matches the  filter ``128.8.0.0/16^- AND  <^AS226>''.
  2211. However, its  path attributes  are generated  using the  atomic  aggregation
  2212. rules [13].  The aggregate  128.7.0.0/16 is always and atomically  generated
  2213. since the policy filter ``ANY'' matches any route in the routing table.
  2214.  
  2215. The inject-at attribute lists the routers in the originating AS that  inject
  2216. this route  to the  interAS routing  system.   That  is,  these routers  are
  2217. configured to  perform the  aggregation.    If  the inject-at  attribute  is
  2218. missing, all routers  in the originating  AS perform the  aggregation.   The
  2219. route 128.7.0.0/16 in Figure 20 is  injected by routers 7.7.7.1 and  9.9.9.1
  2220. in AS1.
  2221.  
  2222. When a  set of  routes are  aggregated, the  intent is  to  export only  the
  2223. aggregate route and suppress  the exporting of the  component routes to  the
  2224.  
  2225.  
  2226. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 40]
  2227. Internet Draft                      RPSL                      April 23, 1997
  2228.  
  2229.  
  2230.    route: 128.9.0.0/16
  2231.    origin: AS1
  2232.    aggr-by: {128.9.0.0/16^-} AND <^AS226>
  2233.  
  2234.    route: 128.8.0.0/16
  2235.    origin: AS1
  2236.    aggr-by: ATOMIC {128.8.0.0/16^-} AND <^AS226>
  2237.  
  2238.    route: 128.7.0.0/16
  2239.    origin: AS1
  2240.    aggr-by: ATOMIC ANY
  2241.    inject-at: 7.7.7.1
  2242.    inject-at: 9.9.9.1
  2243.    export-comps: {128.7.9.0/24}
  2244.  
  2245.  
  2246.                     Figure 20:  Aggregate route objects.
  2247.  
  2248. outside world.  However, to satisfy certain policy and topology  constraints
  2249. (e.g. a  multi-homed component),  it is  often required  to export  some  of
  2250. the components.    The export-comps  attribute equals  an RPSL  filter  that
  2251. matches the routes that  need to be  exported to the neighboring  ASes.   If
  2252. this attribute is missing,  no component route needs  to be exported to  the
  2253. neighboring ASes.    The export-comps  attribute can  only be  specified  if
  2254. an aggr-by  attribute is  specified for  the route  object.   The  component
  2255. 128.7.9.0/24 of route  128.7.0.0/16 in  Figure 20  needs to  be exported  to
  2256. other ASes.
  2257.  
  2258. The holes  attribute lists  the  component address  prefixes which  are  not
  2259. reachable through  the aggregate  route (perhaps  that part  of the  address
  2260. space is unallocated).  Figure 21 shows a route object whose two components,
  2261. namely 128.9.0.0/16 and 128.7.0.0/16, are  not reachable via the  aggregate.
  2262. That is, if a data packet destined to a host in 128.9.0.0/16 is sent to AS1,
  2263. AS1 can not deliver it to its final destination (i.e. it is black-holed).
  2264.  
  2265.  
  2266.    route: 128.0.0.0/12
  2267.    origin: AS1
  2268.    aggr-by: {128.0.0.0/12^-}
  2269.    holes: 128.7.0.0/16, 128.9.0.0/16
  2270.  
  2271.  
  2272. Figure 21:    The  route  128.0.0.0/12 does  not  lead  to  destinations  in
  2273. 128.9.0.0/16.
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 41]
  2283. Internet Draft                      RPSL                      April 23, 1997
  2284.  
  2285. 10 inet-rtr Class
  2286.  
  2287.  
  2288. Routers are  specified using  the inet-rtr  class.   The  attributes of  the
  2289. inet-rtr class are shown in  Figure 22.  The  inet-rtr attribute is a  valid
  2290. DNS name of the router  described.  Each alias  attribute, if present, is  a
  2291. canonical DNS name for the router.  The local-as attribute specifies the  AS
  2292. number of the AS which owns/operates this router.
  2293.  
  2294.  
  2295.   Attribute  Value                    Type
  2296.   inet-rtr   <dns-name>               mandatory, single-valued, class key
  2297.   alias      <dns-name>               optional, multi-valued
  2298.   local-as   <as-number>              mandatory, single-valued
  2299.   ifaddr     see description in text  mandatory, multi-valued
  2300.   peer       see description in text  optional, multi-valued
  2301.  
  2302.  
  2303.                    Figure 22:  inet-rtr Class Attributes
  2304.  
  2305.  
  2306. The value of an ifaddr attribute has the following syntax:
  2307.  
  2308.  
  2309.    <ipv4-address> masklen <integer>
  2310.    [tunnel <inet-tunnel-object-name>]
  2311.    [action <action>]
  2312.  
  2313.  
  2314. The IP address and  the mask length  are mandatory for each  interface.   If
  2315. the interface is a tunnel, and if there is an inet-tunnel object  describing
  2316. the tunnel, the tunnel's name can also  be specified.  (An example  inet-rtr
  2317. object with tunnels is presented in Section  11.)  Optionally an action  can
  2318. be specified to set other parameters of this interface.
  2319.  
  2320. Figure 23 presents an example  inet-rtr object.  The  name of the router  is
  2321. ``amsterdam.ripe.net''.  ``amsterdam1.ripe.net'' is a canonical name for the
  2322. router.  The router is connected to  4 networks.  Its IP addresses and  mask
  2323. lengths in those networks are specified in the ifaddr attributes.
  2324.  
  2325. Each peer attribute, if present,  specifies a protocol peering with  another
  2326. router.  The value of a peer attribute has the following syntax:
  2327.  
  2328.  
  2329.    <protocol> <ipv4-address> <options>
  2330.  
  2331.  
  2332. where <protocol> is a protocol name, <ipv4-address> is the IP address of the
  2333. peer router,  and <options> is  a comma  separated list  of peering  options
  2334. for <protocol>.  Possible protocol  names and attributes are defined in  the
  2335. dictionary (please see Section  8).   In the above  example, the router  has
  2336.  
  2337.  
  2338. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 42]
  2339. Internet Draft                      RPSL                      April 23, 1997
  2340.  
  2341.  
  2342.  inet-rtr: Amsterdam.ripe.net
  2343.  alias:    amsterdam1.ripe.net
  2344.  localas:  AS3333
  2345.  ifaddr:   192.87.45.190 masklen 24
  2346.  ifaddr:   192.87.4.28   masklen 24
  2347.  ifaddr:   193.0.0.222   masklen 27
  2348.  ifaddr:   193.0.0.158   masklen 27
  2349.  peer:     BGP 192.87.45.195 asno(AS3334), flap_damp()
  2350.  
  2351.  
  2352.                         Figure 23:  inet-rtr Objects
  2353.  
  2354. a BGP peering  with the router  192.87.45.195 in AS3334  and turns the  flap
  2355. damping on when importing routes from this router.
  2356.  
  2357.  
  2358.  
  2359. 11 inet-tunnel Class and Specifying Tunnels
  2360.  
  2361.  
  2362. Tunneling is a fundamental networking technology  that is used in a  variety
  2363. circumstances.  A common use of  tunneling is to incrementally deploy a  new
  2364. network layer protocol.  The  approach is to encapsulate ("tunnel") the  new
  2365. protocol through the existing network  layer protocol, usually IP.  Examples
  2366. of this approach include include the multicast backbone [3], where multicast
  2367. packets are encapsulated in IP packets using protocol 4 (IP in IP), and IPv6
  2368. backbone [1], where  IPv6 packets are  encapsulated in IP  packets using  IP
  2369. protocol 41 [14].
  2370.  
  2371. Another use of  tunneling is to  force congruence between  the existing  (IP
  2372. unicast) topology and some new topology.  Due the special requirements of IP
  2373. multicast routing, the MBONE is also an example of this use of tunneling.
  2374.  
  2375. This  section  describes  general  tunneling  specification  in  RPSL.  Both
  2376. point-to-point  and  point-to-multipoint  tunnels  of  encapsulation  types,
  2377. including DVMRP,  GRE,  and  IPv6,  are  supported.    In  addition  to  the
  2378. encapsulation, a protocol to run inside the tunnel can also be specified.
  2379.  
  2380. Tunnels are specified using  the inet-tunnel class.   The attributes of  the
  2381. inet-tunnel class are shown in  Figure 24.   The inet-tunnel attribute is  a
  2382. valid RPSL name for  the tunnel described.   The tunnel-source attribute  is
  2383. the IP address of the source end point  of the tunnel.  The inet-tunnel  and
  2384. the tunnel-source attributes form the class key.  That is, a  point-to-point
  2385. tunnel is specified using two tunnel object,  one for each end point of  the
  2386. tunnel.  The tunnel-sink attribute is the IP address of other end points  of
  2387. the tunnel.   If the tunnel  is a multi-point  tunnel, multiple  tunnel-sink
  2388. attributes can be used to list each  end point.  The tunnel-encap  attribute
  2389. is an encapsulation  name.   Valid encapsulation  names are  defined in  the
  2390. dictionary and include IPinIP [28],  IPMOBILITY [23], DVMRP [24], GRE  [15],
  2391. and IPv6 [10].   The  tunnel-protocol attribute  is a protocol  name to  run
  2392.  
  2393.  
  2394. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 43]
  2395. Internet Draft                      RPSL                      April 23, 1997
  2396.  
  2397. "inside" the tunnel.   Valid  protocol names are  defined in the  dictionary
  2398. and include BGP, RIPv6,  DVMRP. See  [26] for an  application that uses  BGP
  2399. tunneled in GRE.  The tunnel-mcast-tree  attribute is used  to describe  the
  2400. multicast tree construction mechanism used on the tunnel.  Examples  include
  2401. PIM-DM and PIM-SM.
  2402.  
  2403.  
  2404. Attribute          Value                    Type
  2405. inet-tunnel        <rpsl-name>              mandatory, single-valued, class key
  2406. tunnel-source      <ipv4-address>           mandatory, single valued, class key
  2407. tunnel-sink        <ipv4-address>           mandatory, multi-valued, class key
  2408. tunnel-encap       <encapsulation-name>     mandatory, single-valued
  2409. tunnel-protocol    <protocol-name>          mandatory, single valued
  2410. tunnel-mcast-tree  <protocol-name>          optional, single valued
  2411. tunnel-in          see description in text  mandatory, multi-valued
  2412. tunnel-out         see description in text  mandatory, multi-valued
  2413.                   Figure 24:  inet-tunnel Class Attributes
  2414.  
  2415.  
  2416.  
  2417. The tunnel-in and tunnel-out attributes have the following format:
  2418.  
  2419.  
  2420.    tunnel-in:  from <ipv4-address> [action <action>] accept   <filter>
  2421.    tunnel-out: to   <ipv4-address> [action <action>] announce <filter>
  2422.  
  2423.  
  2424. where <action>  and <filter>  are as  in  the aut-num  class.   The  possible
  2425. actions are defined in the dictionary and include
  2426.  
  2427.  
  2428. ttlscope The minimum IP  time-to-live required for a packet to be  forwarded
  2429.     to the specified endpoint (in the case of multipoint tunnels, there  may
  2430.     be per endpoint scopes).
  2431.  
  2432. boundary A boundary  attribute describes  an administratively defined  class
  2433.     of packets that will not be forwarded through the tunnel [21].
  2434.  
  2435. dvmrp-metric A DVMRP metric.
  2436.  
  2437.  
  2438. These attributes are particularly relevant to multicast routing.  Attributes
  2439. for other tunnels  can later  be defined  in the  dictionary.   The <filter>
  2440. specifications describe  filters  that  are  appropriate  for  the  tunnel's
  2441. routing protocol.  In the case of DVMRP, the filter specification can be the
  2442. list of network prefixes accepted or advertised.
  2443.  
  2444. Figure 25 has two  examples of tunnel  objects.  In  the first example,  the
  2445. router eugene-isp.nero.net  has two  tunnels:   a DVMRP  tunnel to  dec3800-
  2446. 2-fddi-0.SanFrancisco.mci.net  and  a  GRE  tunnel  to  eugene-isp.nero.net.
  2447. The DVMRP  tunnel  object is  called  MBONE-TUNNEL-EUG.  eugene-isp.nero.net
  2448.  
  2449.  
  2450. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 44]
  2451. Internet Draft                      RPSL                      April 23, 1997
  2452.  
  2453. will accept  any routes  and forward  packets  to the  DVMRP tunnel  if  the
  2454. packet's time-to-live  is  greater  than or  equal  to  64.    In  addition,
  2455. eugene-isp.nero.net will not pass any packets that match the  administrative
  2456. scope boundary filter (in  this case,  239.254.0.0/16).   The GRE tunnel  is
  2457. named GRE-TUNNEL-EUG.
  2458.  
  2459.  inet-rtr: eugene-isp.nero.net
  2460.  loacalas: AS4600
  2461.  ifaddr:   166.48.14.6 masklen 30 tunnel MBONE-TUNNEL-EUG
  2462.  ifaddr:   166.48.14.6 masklen 30 tunnel GRE-TUNNEL-EUG
  2463.  admin-c:  DMM65
  2464.  tech-c:   DMM65
  2465.  notify:   nethelp@ns.uoregon.edu
  2466.  mnt-by:   MAINT-AS3582
  2467.  changed:  meyer@ns.uoregon.edu 961122
  2468.  source:   RADB
  2469.  
  2470.  inet-tunnel:     MBONE-TUNNEL-EUG
  2471.  tunnel-source:   166.48.14.6   # eugene-isp.nero.net
  2472.  tunnel-sink:     204.70.158.61 # dec3800-2-fddi-0.SanFrancisco.mci.net
  2473.  tunnel-encap:    DVMRP
  2474.  tunnel-protocol: DVMRP
  2475.  tunnel-in:       from 204.70.158.61 accept ANY
  2476.  tunnel-out:      to 204.70.158.61
  2477.                   action
  2478.                      ttlscope=64;
  2479.                      boundary={239.254.0.0/16};
  2480.                      dvmrp-metric=1;
  2481.                   announce AS-NERO-TRANSIT
  2482.  ...
  2483.  
  2484.  inet-tunnel:       GRE-TUNNEL-EUG
  2485.  tunnel-source:     166.48.14.6
  2486.  tunnel-sink:       206.42.19.240
  2487.  tunnel-protocol:   DVMRP
  2488.  tunnel-mcast-tree: PIM-DM
  2489.  tunnel-encap:      GRE
  2490.  tunnel-in:         from 206.42.19.240 accept ANY
  2491.  tunnel-out:        to 206.42.19.240
  2492.                     action
  2493.                       ttlscope=64;
  2494.                     announce ANY
  2495.  ...
  2496.  
  2497.  
  2498.                       Figure 25:  inet-tunnel Objects
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 45]
  2507. Internet Draft                      RPSL                      April 23, 1997
  2508.  
  2509. 12 Security Consideration
  2510.  
  2511.  
  2512. This document describes  RPSL, a language  for expressing routing  policies.
  2513. As such,  it  does  not  itself  have (or  need)  a  security  architecture.
  2514. However,  any registry  that  implements  this  language  should  provide  a
  2515. mechanism for:
  2516.  
  2517.  
  2518. 1.  Data Integrity  and  Origin  Authentication.     Both  data  origin  and
  2519.     integrity can  be provided  by associating  cryptographically  generated
  2520.     digital signatures with  each object  in a IRR.  There may  be a  single
  2521.     private  key  that  signs  for  all  objects  associated  with  a  given
  2522.     MAINTAINER object, or there may be finer grained control.  As is common,
  2523.     it is expected that an  implementation will keep the MAINTAINER  private
  2524.     key off-line and  it will be  used to  re-sign all objects  for a  given
  2525.     MAINTAINER.
  2526.  
  2527. 2.  Public Key Distribution.  It  is expected that any IRR implemeting  RPSL
  2528.     will use the Group  Key Management Protocol  (GKMP) [16].   The IETF  IP
  2529.     Security Working Group  is actively  working on GKMP  extensions to  the
  2530.     standards-track ISAKMP key  management protocol being  developed in  the
  2531.     same working group.
  2532.  
  2533. 3.  Transaction Security.   When a  user is querying  a registry for  policy
  2534.     objects, to eliminate snooping and to eliminate third parties  injecting
  2535.     objects, the server and the client may optionally use authentication and
  2536.     encryption techniques [12].
  2537.  
  2538.  
  2539. 13 Acknowledgements
  2540.  
  2541.  
  2542. We would like to thank Jessica Yu, Randy Bush, Alan Barrett, David  Kessens,
  2543. Bill Manning, Sue  Hares, Ramesh  Govindan, Kannan  Varadhan, Satish  Kumar,
  2544. Craig Labovitz,  Rusty Eddy,  David  J. LeRoy,  David Whipple,  Jon  Postel,
  2545. Deborah Estrin, Elliot  Schwartz, Joachim Schmitz,  and the participants  of
  2546. the IETF RPS Working Group for various comments and suggestions.
  2547.  
  2548.  
  2549.  
  2550. References
  2551.  
  2552.  
  2553.  [1] 6BONE. See http://www-6bone.lbl.gov/6bone/.
  2554.  
  2555.  [2] Internet
  2556.      Routing   Registry.  Procedures.    http://www.ra.net/RADB.tools.docs/,
  2557.      http://www.ripe.net/db/doc.html.
  2558.  
  2559.  [3] MBONE. See http://www.best.com/ prince/techinfo/misc.html.
  2560.  
  2561.  
  2562. Alaettinoglu et. al.           Expires  October 23, 1997           [Page 46]
  2563. Internet Draft                      RPSL                      April 23, 1997
  2564.  
  2565.  [4] C.  Alaettinouglu, D.  Meyer,  and J.  Schmitz. Application  of  Routing
  2566.      Policy Specification  Language (RPSL) on  the Internet. Internet  Draft
  2567.      draft-ietf-rps-appl-rpsl-00.ps, March 1997. Work in progress.
  2568.  
  2569.  [5] T.  Bates. Specifying  an `Internet  Router' in  the Routing  Registry.
  2570.      Technical  Report RIPE-122,  RIPE,  RIPE NCC,  Amsterdam,  Netherlands,
  2571.      October 1994.
  2572.  
  2573.  [6] T.  Bates, E.  Gerich,  L. Joncheray,  J-M. Jouanigot,  D.  Karrenberg,
  2574.      M.  Terpstra,  and  J.  Yu.   Representation  of  IP  Routing  Policies
  2575.      in  a Routing  Registry.  Technical Report  ripe-181, RIPE,  RIPE  NCC,
  2576.      Amsterdam, Netherlands, October 1994.
  2577.  
  2578.  [7] T.  Bates, E.  Gerich,  L. Joncheray,  J-M. Jouanigot,  D.  Karrenberg,
  2579.      M.  Terpstra, and J.  Yu. Representation  of IP Routing  Policies in  a
  2580.      Routing Registry. Technical Report RFC-1786, March 1995.
  2581.  
  2582.  [8] T. Bates, J-M. Jouanigot, D. Karrenberg, P. Lothberg, and  M. Terpstra.
  2583.      Representation of IP  Routing Policies in the RIPE Database.  Technical
  2584.      Report ripe-81, RIPE, RIPE NCC, Amsterdam, Netherlands, February 1993.
  2585.  
  2586.  [9] R. Chandra,  P. Traina, and T. Li.  BGP Communities Attribute.  Request
  2587.      for Comment RFC-1997, Network Information Center, August 1996.
  2588.  
  2589. [10] A. Conta  and S. Deering. Generic  Packet Tunneling in IPv6.  Technical
  2590.      Report draft-ietf-ipngwg-ipv6-tunnel-04.txt, October 1996.
  2591.  
  2592. [11] D. Crocker.  Standard for  the format of  ARPA Internet text  messages.
  2593.      Request for Comment RFC-822, Network Information Center, August 1982.
  2594.  
  2595. [12] D. Eastlake  and C.  Kaufman. Domain Name  System Security  Extensions.
  2596.      Technical Report RFC2065, January 1997.
  2597.  
  2598. [13] V.  Fuller, T.  Li,  J. Yu,  and  K. Varadhan.  Classless  Inter-Domain
  2599.      Routing (CIDR): an Address Assignment and Aggregation Strategy, 1993.
  2600.  
  2601. [14] R. Gilligan and  E. Nordmark. Transition Mechanisms for IPv6 Hosts  and
  2602.      Routers. Technical Report RFC1933, April 1996.
  2603.  
  2604. [15] S.  Hanks,  T.  Li,  D.  Farinacci,  and  P.  Traina.  Generic  Routing
  2605.      Encapsulation (GRE). Technical Report RFC1701, October 1994.
  2606.  
  2607. [16] H.  Harney.  Group Key  Management Protocol  (GKMP).  Technical  Report
  2608.      draft-harney-gkmp-arch-01.txt,  draft-harney-gkmp-spec-01.txt,   August
  2609.      1996. Informational RFC publication is pending.
  2610.  
  2611. [17] D. Karrenberg  and T. Bates.  Description of  Inter-AS Networks in  the
  2612.      RIPE  Routing Registry.  Technical  Report  RIPE-104, RIPE,  RIPE  NCC,
  2613.      Amsterdam, Netherlands, December 1993.
  2614.  
  2615. [18] D.  Karrenberg  and M.  Terpstra.  Authorisation  and  Notification  of
  2616.  
  2617.  
  2618. Alaettinoglu et. al.           Expires  October 23, 1997           [Page 47]
  2619. Internet Draft                      RPSL                      April 23, 1997
  2620.  
  2621.      Changes in  the RIPE  Database. Technical Report  ripe-120, RIPE,  RIPE
  2622.      NCC, Amsterdam, Netherlands, October 1994.
  2623.  
  2624. [19] B.  W.  Kernighan  and D.  M.  Ritchie.  The  C  Programming  Language.
  2625.      Prentice-Hall, 1978.
  2626.  
  2627. [20] A.  Lord  and   M.  Terpstra.  RIPE  Database  Template  for   Networks
  2628.      and  Persons. Technical  Report ripe-119,  RIPE,  RIPE NCC,  Amsterdam,
  2629.      Netherlands, October 1994.
  2630.  
  2631. [21] D.  Meyer.  Administratively  Scoped  IP  Multicast.  Technical  Report
  2632.      draft-ietf-mboned-admin-ip-space-01.txt, December 1996.
  2633.  
  2634. [22] P. V. Mockapetris. Domain names - concepts and facilities.  Request for
  2635.      Comment RFC-1034, Network Information Center, November 1987.
  2636.  
  2637. [23] C. Perkins. Minimal Encapsulation within IP.  Technical Report RFC2004,
  2638.      October 1996.
  2639.  
  2640. [24] T.  Pusateri. Distance  Vector  Multicast Routing  Protocol.  Technical
  2641.      Report draft-ietf-idmr-dvmrp-v3-03, September 1996.
  2642.  
  2643. [25] Y.   Rekhter.  Inter-Domain   Routing  Protocol  (IDRP).   Journal   of
  2644.      Internetworking Research and Experience, 4:61--80, 1993.
  2645.  
  2646. [26] Y. Rekhter. Auto route injection with tunnelling, October 1996.  NANOG,
  2647.      See http://www.academ.com/nanog/oct1996/multihome.html.
  2648.  
  2649. [27] Y. Rekhter and T. Li. A Border Gateway Protocol 4 (BGP-4).  Request for
  2650.      Comment RFC-1654, Network Information Center, July 1994.
  2651.  
  2652. [28] W.  Simpson. IP  in  IP Tunneling.  Technical Report  RFC1853,  October
  2653.      1995.
  2654.  
  2655.  
  2656. A Routing Registry Sites
  2657.  
  2658.  
  2659. The set of routing registries as of November 1996 are RIPE, RADB, CANet, MCI
  2660. and ANS. You may  contact one of  these registries to  find out the  current
  2661. list of registries.
  2662.  
  2663.  
  2664.  
  2665. B Authors' Addresses
  2666.  
  2667.  
  2668.    Cengiz Alaettinoglu
  2669.    USC Information Sciences Institute
  2670.    4676 Admiralty Way, Suite 1001
  2671.    Marina del Rey, CA  90292
  2672.  
  2673.  
  2674. Alaettinoglu et. al.           Expires  October 23, 1997           [Page 48]
  2675. Internet Draft                      RPSL                      April 23, 1997
  2676.  
  2677.    email: cengiz@isi.edu
  2678.  
  2679.    Tony Bates
  2680.    Cisco Systems, Inc.
  2681.    170 West Tasman Drive
  2682.    San Jose, CA 95134
  2683.    email: tbates@cisco.com
  2684.  
  2685.    Elise Gerich
  2686.    At Home Network
  2687.    385 Ravendale Drive
  2688.    Mountain View, CA 94043
  2689.    email: epg@home.net
  2690.  
  2691.    Daniel Karrenberg
  2692.    RIPE Network Coordination Centre (NCC)
  2693.    Kruislaan 409
  2694.    NL-1098 SJ Amsterdam
  2695.    Netherlands
  2696.    email: dfk@ripe.net
  2697.  
  2698.    David Meyer
  2699.    University of Oregon
  2700.    Eugene, OR 97403
  2701.    email: meyer@antc.uoregon.edu
  2702.  
  2703.    Marten Terpstra
  2704.    c/o Bay Networks, Inc.
  2705.    2 Federal St
  2706.    Billerica MA 01821
  2707.    email: marten@BayNetworks.com
  2708.  
  2709.    Curtis Villamizar
  2710.    ANS
  2711.    email: curtis@ans.net
  2712.  
  2713.  
  2714.  
  2715.  
  2716.  
  2717.  
  2718.  
  2719.  
  2720.  
  2721.  
  2722.  
  2723.  
  2724.  
  2725.  
  2726.  
  2727.  
  2728.  
  2729.  
  2730. Alaettinoglu et.  al.          Expires  October 23, 1997           [Page 49]
  2731.