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-appl-rpsl-00.txt < prev    next >
Text File  |  1997-03-26  |  38KB  |  987 lines

  1.  
  2. Internet Draft                                           Cengiz Alaettinoglu
  3. Expires  September 26, 1997                                          USC/ISI
  4. draft-ietf-rps-appl-rpsl-00.txt                                  David Meyer
  5.                                                         University of Oregon
  6.                                                              Joachim Schmitz
  7.                                                                      DFN-NOC
  8.                                                               March 26, 1997
  9.  
  10.  
  11.  
  12. Application of Routing Policy Specification Language (RPSL) on the Internet
  13.  
  14.  
  15.  
  16.  
  17. Status of this Memo
  18.  
  19.  
  20. This document is an Internet Draft, and can be found as
  21. draft-ietf-rps-appl-rpsl-00.txt in any standard internet drafts
  22. repository.  Internet Drafts are working documents of the
  23. Internet Engineering Task Force (IETF), its  Areas, and its
  24. Working Groups.  Note that other groups may also distribute
  25. working documents as Internet Drafts.
  26.  
  27. Internet Drafts  are draft  documents valid  for a  maximum of
  28. six  months. Internet Drafts may be  updated, replaced, or
  29. obsoleted by other  documents at any time.   It  is not
  30. appropriate  to use Internet  Drafts as  reference material, or
  31. to cite  them other than  as a ``working  draft'' or ``work  in
  32. progress.'' 
  33.  
  34. Please check  the I-D  abstract  listing contained  in each
  35. Internet  Draft directory to learn the current status of this or
  36. any other Internet Draft. 
  37.  
  38.  
  39. 1 Introduction
  40.  
  41.  
  42. This document  is  a tutorial  on  using the  Routing  Policy
  43. Specification Language (RPSL) to specify routing policies.  It
  44. covers registering policies in an Internet Routing Registry
  45. (IRR) using RPSL, and  the use of tools  to generate vendor
  46. specific router  configuration.  It  is targeted towards  an
  47. Internet/Network Service  Provider (ISP/NSP)  engineer who  is
  48. new  to  RPSL and to IRR.  Readers are  referred to the  RPSL
  49. reference  document [1]  for completeness.    We  recommend
  50. reading this  document  before  reading  the reference document.
  51. We hope  that for  many cases, this  document will  be
  52. sufficient. 
  53.  
  54. IRR is a  repository of routing  policies.   It currently
  55. consists of  five sites:  CA*Net  registry in  Canada,  ANS, MCI
  56. and RADB  registries in  the 
  57.  
  58. Internet Draft Application of RPSL              March 26, 1997 
  59.  
  60. United States  of America,  and RIPE  registry in  Europe.
  61. Each of  these sites run independent  of each  other.   However,
  62. each  site exchanges  its data with each other at some frequency
  63. (at  least once a day or as often  as every ten minutes).  MCI,
  64. Ca*Net and ANS are private registries and  contain routing
  65. policies  of MCI,  Ca*Net, ANS,  and their  customers
  66. respectively. RADB and RIPE are public registries, and any ISP
  67. can publish their  policies in these registries.   Since
  68. registries exchange  their data regularly,  you need to  register
  69. your policies  in  only one  of  them.    If you  are  an MCI,
  70. ANS or CA*Net  customer, we recommend you  register your policies
  71. with them.  Otherwise, please register your  policies either at
  72. the RIPE or  RADB registry, whichever is closer to you.   We
  73. recommend against registering  in multiple registries since  it
  74. often  eventually leads  to inconsistent  data between the
  75. registries. 
  76.  
  77. Routing policies registered in IRR are  specified using
  78. RPSL. RPSL is  based on an earlier language known as RIPE-181 [2,
  79. 3].  Through operational use of RIPE-181 it has become  apparent
  80. that certain  policies cannot be  specified and a  need for  an
  81. enhanced  and more  general language  is needed. RPSL addresses
  82. RIPE-181's limitations.  RPSL obsoletes RIPE-181 [2, 3]. 
  83.  
  84. RPSL is  object oriented;  that is,  objects  contain pieces  of
  85. policy  and administrative information.  For example, each
  86. address prefix routed in  the inter-domain mesh is specified in a
  87. route object and policies of each AS are specified in an aut-num
  88. object.  Objects have relations between each  other. For example,
  89. all route objects of an ISP refer to the Autonomous System (AS)
  90. number of the ISP. These  relations form sets of objects.   We
  91. can then  use these set names to specify policies collectively to
  92. all their members. For example, we can use the  AS number of an
  93. ISP  to specify policy against  all of its routes.   In the
  94. following sections, we  will describe each of  these objects
  95. (rather object classes)  in more detail  and give numerous
  96. examples for you to create your own  objects.  In most  cases,
  97. you should be able  to cut and paste our examples to create your
  98. own objects. 
  99.  
  100. Once you register  your policies in  IRR, they are  available for
  101. others  to query using a  whois service.   For  example, to  see
  102. the  route object  for 128.223.0.0/16, please try the following
  103. UNIX command: 
  104.  
  105.  
  106.     % whois -h radb.ra.net 128.223.0.0/16
  107.       route:       128.223.0.0/16
  108.       descr:       UONet
  109.       descr:       University of Oregon
  110.       descr:       Computing Center
  111.       descr:       Eugene, OR 97403-1212
  112.       descr:       USA
  113.       origin:      AS3582
  114.       mnt-by:      MAINT-AS3582
  115.       changed:     meyer@ns.uoregon.edu 960222
  116.       source:      RADB
  117.  
  118.  
  119.  
  120.  
  121. Alaettinoglu et.  al.          Expires  September 26, 1997          [Page 2]
  122. Internet Draft               Application of RPSL             March 26, 1997
  123.  
  124. The output of the  command is the ASCII  representation of the
  125. route  object whose details will be  covered in Section 2.3.
  126. That is  not all, once  you register your policies in IRR, they
  127. can be analyzed for consistency or  used to diagnose Internet's
  128. operational routing problems.   RAToolSet  [5] is  a suite of
  129. tools for  analyzing this data.   It  contains tools (RtConfig)
  130. to configure routers, tools (prpath and  prtraceroute) to analyse
  131. paths on  the Internet, tools (roe,  aoe and  prcheck) to
  132. compare,  validate and  register RPSL objects, and others.
  133.  
  134. The remainder  of  this  document  is  organized  as  follows:
  135. Section  2 introduces the fundamental RPSL objects.  Section 3
  136. discusses implementation of various common policies using
  137. RPSL. Finally, Section 4 describes the  use of RtConfig to
  138. generate vendor specific router configurations. 
  139.  
  140.  
  141. 2 RPSL Objects
  142.  
  143.  
  144. This section introduces the fundamental RPSL objects required to
  145. implement many typical Internet routing policies.  The basic
  146. elements are 
  147.  
  148.  
  149.  o  maintainer objects (mntner)
  150.  
  151.  o  autonomous system number objects (aut-num)
  152.  
  153.  o  route objects (route)
  154.  
  155.  o  set objects (as-set, route-set)
  156.  
  157.  
  158. and they are described  in the following  sections.   These
  159. objects must  be registered in the IRR, in only one of the
  160. existing registries.  In  general, registration is  done  by
  161. sending  mail  to a  registry  robot. The  mail addresses are
  162. different for different registries.  The contents of the  mail
  163. consists of the  objects you  want to  have registered,
  164. separated by  empty lines, and  often some  kind of
  165. authorization (see  below).   The  registry robot automatically
  166. processes your  mail,  entering  new objects  into  the database,
  167. deleting old ones, or activating  changes.  Moreover, it may
  168. send notifications and replies with an error or success report
  169. about its actions. The first object which  has to be  registered,
  170. normally is the  mntner.   In general, to have  it properly
  171. authenticated, a maintainer  object is  added manually by
  172. registry staff.   Afterwards, all  other actions should be  done
  173. through the registry robot.  Each registry provides documentation
  174. on how  to use it.  If problems arise your registry staff is
  175. willing to assist you. 
  176.  
  177.  
  178.  
  179. Alaettinoglu et.  al.          Expires  September 26, 1997          [Page 3]
  180. Internet Draft               Application of RPSL              March 26, 1997
  181.  
  182. 2.1 The Maintainer Object
  183.  
  184.  
  185. The maintainer object is  used to introduce some  kind of
  186. authorization  for registrations.   It  lists various  contact
  187. persons  and describes  security mechanisms that  will be
  188. applied when  updating other  objects in  an  IRR. Registering a
  189. mntner object  is the  first step  in creating  policies  for an
  190. AS.  An  example  is shown  in  Figure  1.    The  maintainer  is
  191. called MAINT-AS3701.   The  contact  person here  is  the same
  192. for  administrative admin-c and  technical tech-c  issues and  is
  193. referenced  by the  NIC-handle DMM65.  NIC-handles are unique
  194. identifiers for persons in registries.  Refer to registry
  195. documentation for further details on person objects and usage of
  196. NIC-handles. 
  197.  
  198. The example shows  two authentication mechanisms:   CRYPT-PW and
  199. MAIL-FROM. CRYPT-PW takes  as its  argument  a password  that  is
  200. encrypted  with  Unix crypt(3) routine.    When sending  updates,
  201. the  maintainer adds  the  field password:  <cleartext password>
  202. to the beginning of any requests that are to be authenticated.
  203. MAIL-FROM takes an argument that is a regular  expression which
  204. covers a set  of mail addresses.   Only users with  any of these
  205. mail addresses are authorized to work  with objects secured by
  206. the  corresponding maintainer(1).
  207.  
  208. The security mechanisms of the mntner  object will only be
  209. applied on  those objects referencing a  specific mntner  object.
  210. The reference  is done  by adding the attribute mnt-by to an
  211. object using the name of the mntner object as its value.   In
  212. Figure  1, the maintainer  MAINT-AS3701 is maintained  by itself.
  213.  
  214.  
  215. 2.2 The Autonomous System Object
  216.  
  217.  
  218. The autonomous system object describes the import and export
  219. policies of an AS. Each organization registers an autonomous
  220. system object (aut-num) in the IRR for its AS. Figure 2 shows the
  221. aut-num for AS3582 (UONET). 
  222.  
  223. The autonomous system object  lists contacts (admin-c,  tech-c)
  224. and here  is maintained by  mnt-by: MAINT-AS3701  which is  the
  225. maintainer  displayed  in Figure 2.
  226.  
  227. The most important attributes  of the aut-num object  are as-in
  228. and  as-out. The as-in clause of an aut-num  specifies import
  229. policies, while the  as-out clause specifies export policies.
  230. The corresponding  clauses allow a  very detailed description of
  231. the routing policy of the AS specified.  The details are given in
  232. section 3. 
  233.  
  234. ------------------------------
  235.  1.  Clearly,  neither  of   these  mechanisms  is  sufficient
  236.      to provide strong authentication  or  authorization.
  237.      Other public  key  (e.g.,  PGP) authentication mechanisms
  238.      are available from some of the IRRs. 
  239.  
  240.  
  241. Alaettinoglu et.  al.          Expires  September 26, 1997          [Page 4]
  242. Internet Draft               Application of RPSL              March 26, 1997
  243.  
  244.  
  245.  
  246.   mntner:      MAINT-AS3701
  247.   descr:       Network for Research and Engineering in Oregon
  248.   remark:      Internal Backbone
  249.   admin-c:     DMM65
  250.   tech-c:      DMM65
  251.   upd-to:      noc@nero.net
  252.   auth:        CRYPT-PW  949WK1mirBy6c
  253.   auth:        MAIL-FROM .*@nero.net
  254.   notify:      noc@nero.net
  255.   mnt-by:      MAINT-AS3701
  256.   changed:     meyer@antc.uoregon.edu 970318
  257.   source:      RADB
  258.  
  259.  
  260.                         Figure 1:  Maintainer Object
  261.  
  262.  
  263.  
  264. With these  clauses  the aut-num  object  shows the  relationship
  265. to  other autonomous systems by describing the peerings.  In
  266. addition, it also defines a routing  entity  comprising a  group
  267. of  IP networks  which  are  handled according to the  rules
  268. defined in  the aut-num  object.   Therefore, it  is closely
  269. linked to route objects. 
  270.  
  271. In this example, AS3582 imports all routes from AS3701 by using
  272. the  keyword ANY. AS3582 imports only  internal routes from
  273. AS4222, AS5650, and  AS1798. The import policy for  for AS2914 is
  274. slightly more complex.   Since  AS2914 provides transit to
  275. various <other  ASs, AS3582 accepts routes with  ASPATHs that
  276. begin with  AS2194 followed by  members of AS-WNA,  which is an
  277. AS-SET (see section 2.4.1 below) describing those customers that
  278. transit AS2914. 
  279.  
  280. Since AS3582 is a multi-homed stub  AS (i.e., it does not provide
  281. transit), its export policy consists simply of ``announce
  282. AS3582'' clauses. 
  283.  
  284. The aut-num object  forms the basis  of a scalable  and
  285. maintainable  router configuration system. For example,  if
  286. AS3582 originates  a new route,  it need only create a route
  287. object for  that route with origin AS3582.   AS3582 can now build
  288. configuration using  this route object  without changing  its
  289. aut-num object. 
  290.  
  291. Similarly, if  for example,  AS3701 originates  a new  route,  it
  292. need  only create a route object for  that route with origin
  293. AS3701. Both AS3701 and AS3582 can now build configuration using
  294. this route object without modifying its aut-num object.
  295.  
  296.  
  297. Alaettinoglu et.  al.          Expires  September 26, 1997          [Page 5]
  298. Internet Draft               Application of RPSL              March 26, 1997
  299.  
  300.  
  301.  
  302.       aut-num:     AS3582
  303.       as-name:     UONET
  304.       descr:       University of Oregon, Eugene OR
  305.       as-in:       from AS3701  100 accept ANY
  306.       as-in:       from AS4222  100 accept <^AS4222$>
  307.       as-in:       from AS5650  100 accept <^AS5650$>
  308.       as-in:       from AS2914  100 accept <^AS2914+ (AS-WNA)*$>
  309.       as-in:       from AS1798  100 accept <^AS1798$>
  310.       as-out:      to AS3701 announce AS3582
  311.       as-out:      to AS4222 announce AS3582
  312.       as-out:      to AS5650 announce AS3582
  313.       as-out:      to AS2914 announce AS3582
  314.       as-out:      to AS1798 announce AS3582
  315.       guardian:    meyer@antc.uoregon.edu
  316.       admin-c:     DMM65
  317.       tech-c:      DMM65
  318.       notify:      nethelp@ns.uoregon.edu
  319.       mnt-by:      MAINT-AS3582
  320.       changed:     meyer@antc.uoregon.edu 970316
  321.       source:      RADB
  322.  
  323.  
  324.                     Figure 2:  Autonomous System Object
  325.  
  326.  
  327.       route:       128.223.0.0/16
  328.       descr:       UONet
  329.       descr:       University of Oregon
  330.       descr:       Computing Center
  331.       descr:       Eugene, OR 97403-1212
  332.       descr:       USA
  333.       origin:      AS3582
  334.       mnt-by:      MAINT-AS3582
  335.       changed:     meyer@ns.uoregon.edu 960222
  336.       source:      RADB
  337.  
  338.                     Figure 3:  Example of a route object
  339.  
  340.  
  341. 2.3 The Route Object
  342.  
  343. In contrast  to  aut-num  objects  which  describe propagation
  344. of  routing information for an autonomous system as a whole,
  345. route objects define single routes from an AS. An example was
  346. already given in the introduction: 
  347.  
  348.  
  349.  
  350. Alaettinoglu et.  al.          Expires  September 26, 1997          [Page 6]
  351. Internet Draft               Application of RPSL              March 26, 1997
  352.  
  353. This route object is maintained by MAINT-AS3582 and references
  354. AS3582 by the origin attribute.  By  this reference it is
  355. grouped together with other  IP networks of same origin,
  356. becoming member of the  routing entity denoted  by the
  357. corresponding AS  number.   The routing  policy is then defined 
  358. in the aut-num object for this group of routes. 
  359.  
  360. Consequently, the  route objects  give the  routes from  this AS
  361. which  are distributed to  peer ASs  according  to the  rules  of
  362. the  routing  policy. Therefore, for  any route  in the  global
  363. routing  table of  the real  world a route object  must exist in
  364. one registry  of the IRR.  Since routes  from the global routing
  365. table come  from external  peerings alone,  as they  are
  366. described in the aut-num  object, only route objects  must be
  367. registered  in the IRR which should be seen outside your
  368. AS. Normally, this set of external routes is different from the
  369. routes  internally visible within your AS.  One of the major
  370. reasons is that external peers need no information at all about
  371. your internal routing specifics.  Therefore, external routes are
  372. in  general aggregated combinations of internal routes, having
  373. shorter IP prefixes where applicable according to the CIDR rules.
  374. Please see the CIDR FAQ [4] for  a tutorial introduction to
  375. CIDR. It is strongly recommended that you aggregate your routes
  376. as  much as possible,  thereby minimizing the  number of  routes
  377. you inject into the global routing table  and at the same time
  378. reducing  the corresponding number of route objects in the IRR.
  379.  
  380. While you may easily query single route objects using the whois
  381. program, and submit objects via mail to the registry robots, this
  382. becomes kind of awkward for larger sets.  The RAToolSet [5]
  383. offers several tools to make handling of route objects easier.
  384. If  you want to  read policy data  from the IRR  and process it
  385. by other programs, you  might be interested in using peval  which 
  386. is a low level policy evaluation tool.  As an example, the
  387. command 
  388.  
  389.     peval -h radb.ra.net -expand_all AS3582
  390.  
  391. will give you all route objects from AS3582 registered with
  392. RADB. 
  393.  
  394. A much more sophisticated  tool from the RAToolSet  to handle
  395. route  objects interactively is the  route object editor roe.
  396. It has a graphical  user interface to  view  and manipulate
  397. route objects registered  at  any  IRR. New route  objects may
  398. be generated  from templates  and submitted  to  the registries.
  399. Moreover, the route objects from the databases may be  compared
  400. to real life routes.  Therefore,  roe is highly recommended as an
  401. interface to the IRR  for route  objects.   Further information
  402. on peval  and roe  is available together with the RAToolSet [5]. 
  403.  
  404. 2.4 Set Objects
  405.  
  406. With  routing  policies it is often  necessary  to  reference
  407. groups  of autonomous systems or  routes which  have identical
  408. properties regarding  a 
  409.  
  410.  
  411. Alaettinoglu et.  al.          Expires  September 26, 1997          [Page 7]
  412. Internet Draft               Application of RPSL              March 26, 1997
  413.  
  414. specific policy. To make working  with such groups  easier RPSL
  415. allows  to combine them in set objects.   There are two  basic
  416. types of predefined  set objects, as-set, and route-set.  The
  417. RPSL set objects are described below. 
  418.  
  419. 2.4.1 AS-SET Object
  420.  
  421. Autonomous system set objects (as-set)  are used to group
  422. autonomous  system objects into  named sets. An as-set  has an
  423. RPSL name  that starts  with ``AS-''.  In the example in Figure
  424. 4, an as-set called AS-NERO-PARTNERS  and containing AS3701,
  425. AS4201, AS3582, AS4222, AS1798 is defined.  The as-set is the
  426. RPSL replacement for the RIPE-181  as-macro.  Functionality is
  427. the  same but syntax is different.
  428.  
  429. AS-SETs are particularly  useful when  specifying policies  for
  430. groups  such as customers, providers, or for transit. You  are
  431. encouraged to  register sets for these groups  because it is
  432. most likely that  you will treat  them alike, i.e.  you  will
  433. have  a  very similar  routing  policy for  all  your customers
  434. which have an  autonomous system of  their own.   You may as
  435. well discover that this is also true for the providers you are
  436. peering with,  and it is most  convenient to  have the  ASs
  437. combined in one  as-set for  which you offer  transit.    For
  438. example, if a transit provider  specifies  its import policy
  439. using its customer's as-set (i.e., its  as-in clause for  the
  440. customer contains the customer's as-set), then that customer can
  441. modify  the set of ASs  that its  transit provider accepts  from
  442. it. Again, this  can be accomplished without requiring  the
  443. customer or  the transit provider  to modify its aut-num object. 
  444.  
  445.  
  446.    as-set:    AS-NERO-PARTNERS
  447.    members:   AS3701, AS4201, AS3582, AS4222, AS1798
  448.  
  449.    aut-num:   AS3701
  450.    member-of: AS-NERO-PARTNERS
  451.    ...
  452.  
  453.    aut-num:   AS4201
  454.    member-of: AS-NERO-PARTNERS
  455.    ...
  456.    [etc]
  457.  
  458.  
  459.                           Figure 4:  as-set Object
  460.  
  461.  
  462. The ASs of the set are simply compiled in a comma delimited list
  463. following the members attribute of the  as-set. This  list may
  464. also contain  other AS-SETs. For an AS being member of an as-set
  465. is indicated by  the member-of attribute of the aut-num object.
  466.  
  467.  
  468.  
  469. Alaettinoglu et.  al.          Expires  September 26, 1997          [Page 8]
  470. Internet Draft                Application of RPSL            March 26, 1997
  471.  
  472. 2.4.2 ROUTE-SET Object
  473.  
  474. A route-set is a way to  name a group of routes. The syntax is
  475. similar  to the as-set. A route-set has an  RPSL name that
  476. starts  with ``RS-''. The members attribute lists  the members of
  477. the set.   The value  of a  members attribute is a list of
  478. address prefixes, or route-set  names.  The  members of the
  479. route-set are the address prefixes  or the names of other route
  480. sets specified.
  481.  
  482. Figure 5 presents some  example route-set objects. The set
  483. rs-uo  contains two address  prefixes, namely 128.223.0.0/16
  484. and 198.32.162.0/24. The set rs-bar contains  the members  of the
  485. set  rs-uo and  the address  prefix 128.7.0.0/16.  The set
  486. rs-empty contains no members. 
  487.  
  488.  
  489.    route-set: rs-uo
  490.    members: 128.223.0.0/16, 198.32.162.0/24
  491.  
  492.    route-set: rs-bar
  493.    members: 128.7.0.0/16, rs-uo
  494.  
  495.    route-set: rs-empty
  496.  
  497.  
  498.                         Figure 5:  route-set Objects
  499.  
  500.  
  501. 3 Specifying Policies using RPSL
  502.  
  503. In this section we show how the various RPSL objects can be used
  504. to  specify typical Internet policies. 
  505.  
  506.  
  507. 3.1 Provider-Customer Policies
  508.  
  509.  
  510. In typical customer-provider  relationships,  the customer
  511. imports all  the routes that the provider has  and exports its
  512. routes to  the provider.   The provider's policies are
  513. symmetrical in the sense that it exports all  routes that it has
  514. to the  customer,  and it  imports only  the customers
  515. routes. Figure 6 illustrates one way of  expressing these
  516. policies using RPSL  where AS3701 is the provider and  AS3582 is
  517. the customer.   Refer to Figure 2  for AS3582's aut-num.
  518.  
  519. In this example, ``announce ANY'' means  export any route  that 
  520. AS3701  has registered, and  ``accept <^AS3582$>'' means  accept
  521. only  AS3582's  routes (i.e., that  have AS-PATHs of length
  522. one, where the AS in the path is 
  523.  
  524.  
  525. Alaettinoglu et.  al.          Expires  September 26, 1997          [Page 9]
  526. Internet Draft                Application of RPSL            March 26, 1997
  527.  
  528.  
  529.   aut-num:     AS3701
  530.   as-name:     NERO-NET
  531.   descr:       Network for Engineering and Research in Oregon
  532.   ...
  533.   as-in:       from AS3582 100 accept <^AS3582$>
  534.   as-out:      to AS3582 announce ANY
  535.   ...
  536.   guardian:    meyer@antc.uoregon.edu
  537.   admin-c:     DMM65
  538.   tech-c:      DMM65
  539.   notify:      noc@nero.net
  540.   mnt-by:      MAINT-AS3701
  541.   changed:     meyer@antc.uoregon.edu 970316
  542.   source:      RADB
  543.  
  544.  
  545.                Figure 6:  Provider-Customer Policies in RPSL
  546.  
  547. AS3582)(2). Note that  AS3582 is  taking full  routing from
  548. AS3701;  this can be seen in  that AS3701 is announcing  ``ANY'',
  549. and AS3582 is  accepting ``ANY''. The  important point  in this
  550. example is  that if  AS3582 adds  or deletes route objects, there
  551. is no need to update the aut-num objects.   The added (or
  552. deleted) objects  will implicitly  update AS3582's  and  AS3701's 
  553. policies, and thus affect their router configuration files.
  554.  
  555. As mentioned  above, if  the customer  is  itself a  provider,
  556. i.e.  it  has its own  customers,  the  set of  routes  passed to
  557. the  provider  includes its customers'  routes  as  illustrated
  558. in  Figure  7. In  this  example, ``accept AS-NERO-PARTNERS''
  559. means that for each  AS X in the set defined  by AS-NERO-PARTNERS
  560. accept AS X's routes. 
  561.  
  562. In this case shown in Figure 7, if AS3701 gets a new customer,
  563. then it  can update the definition  of the AS-NERO-PARTNERS  set
  564. to include  the new  AS. The policies specified in the aut-num
  565. objects for AS4600 and AS3701 do  not change.
  566.  
  567.  
  568. 3.2 Inter-Provider Policies
  569.  
  570.  
  571. In this  case, the  policies  of both  providers are  to export
  572. only  their customer routes  to the  other provider,  and to
  573. import only  the  customer routes of the  other provider.   This
  574. is commonly referred  to as  peerage. Figure 8 illustrates  how
  575. this is  expressed using RPSL  where both AS  3701 and AS AS2914
  576. are providers.   In this  example, AS3701 advertises only  the 
  577. ------------------------------
  578.  2. AS-PATH regular expressions are POSIX compliant regular expressions, see
  579. section 3.3.
  580.  
  581.  
  582.  
  583. Alaettinoglu et.  al.         Expires  September 26, 1997          [Page 10]
  584. Internet Draft               Application of RPSL              March 26, 1997
  585.  
  586.  
  587.   aut-num:     AS4600
  588.   as-name:     NERO-TRANSIT
  589.   descr:       Network for Engineering and Research in Oregon
  590.   ...
  591.   as-in:       from AS3701 100 accept <^A3701+ (AS-NERO-PARTNERS)*$>
  592.   as-out:      to AS3701 announce ANY
  593.   ...
  594.   guardian:    meyer@antc.uoregon.edu
  595.   admin-c:     DMM65
  596.   tech-c:      DMM65
  597.   notify:      noc@nero.net
  598.   mnt-by:      MAINT-AS4600
  599.   changed:     meyer@antc.uoregon.edu 970316
  600.   source:      RADB
  601.  
  602.  
  603.                Figure 7:  Provider-Customer Policies in RPSL
  604.  
  605. AS paths described by the  AS-SET AS-NERO-PARTNERS (i.e.,
  606. customer  routes). Likewise, we  filter routes  that  come from
  607. AS2914, accepting  only  those defined by the  filter ``<^AS2914+
  608. (AS-WNA)*$>'', i.e.,  those routes  whose AS-PATH attribute ends
  609. with an AS in the set defined by the AS-WNA AS-SET. 
  610.  
  611.  
  612.   aut-num:     AS3701
  613.   as-name:     NERO-NET
  614.   descr:       Network for Engineering and Research in Oregon
  615.   ...
  616.   as-in:       from AS2914 100 accept <^AS2914+ (AS-WNA)*$>
  617.   as-out:      to AS2914 announce AS-NERO-PARTNERS
  618.   ...
  619.   guardian:    meyer@antc.uoregon.edu
  620.   admin-c:     DMM65
  621.   tech-c:      DMM65
  622.   notify:      noc@nero.net
  623.   mnt-by:      MAINT-AS3701
  624.   changed:     meyer@antc.uoregon.edu 970316
  625.   source:      RADB
  626.  
  627.  
  628.                  Figure 8:  Inter-Provider Policies in RPSL
  629.  
  630.  
  631.  
  632. 3.3 AS-PATHS
  633.  
  634.  
  635. In previous  examples  of routing  policies  special expressions
  636. have  been used to describe  the ASs accepted  from or announced
  637. to peering  partners. Actually, these expressions do  not only
  638. cover the  ASs themselves but  also 
  639.  
  640.  
  641. Alaettinoglu et.  al.         Expires  September 26, 1997          [Page 11]
  642. Internet Draft               Application of RPSL              March 26, 1997
  643.  
  644.  
  645.     +--------------------+                +--------------------+
  646.     |            7.7.7.1 |-----+    +-----| 7.7.7.2            |
  647.     |                    |     |    |     |                    |
  648.     | AS1                |    ========    |                AS2 |
  649.     |                    |    IX    |     |                    |
  650.     |                    |          +-----| 7.7.7.3            |
  651.     +--------------------+                +--------------------+
  652.  
  653.  
  654.           Figure 9:  Including interfaces in peerings definitions
  655.  
  656. their number  and sequence. This  is achieved  by  a mechanism
  657. known  as regular expressions.  Those familiar with the UNIX
  658. world or with programming languages like C or perl will most
  659. likely already understood the details  of the AS-PATHS displayed
  660. in the examples. RPSL uses POSIX compliant regular expressions.
  661.  
  662. Regular expressions follow certain rules. Several characters
  663. have  special meanings, e.g.  ``^'' denotes  the beginning  of a
  664. string,  ``$'' its  end. Then it becomes obvious that the AS-PATH
  665. <^AS3582$> accepted from AS3582  in Figure 7 has length one and
  666. consists of AS3582 only. 
  667.  
  668. Besides these positional indicators there are also operators,
  669. e.g. the unary postfix operators ``+'' or ``*'' as seen in figure
  670. 8 which ASs are  accepted by AS2914:   <^AS2914+ (AS-WNA)*$>.
  671. These operators  work on the  directly preceding regular
  672. expressions, i.e. + only affects AS2914, and * only  works on
  673. (AS-WNA). Operator ``+''  means one or  more occurrences,
  674. operator  ``*'' means zero or more occurrences.   Now it  becomes
  675. obvious that the  AS-PATHS accepted start with at least one
  676. AS2914 but may as well be stuffed  allowing several occurrences
  677. of AS2914.   Then the AS-PATH  continues with no or  any number
  678. of any ASs out of the as-set AS-WNA. No other ASs may then
  679. follow. 
  680.  
  681. Apparently, quite complicated AS-PATHS  can be  expressed in  a
  682. very  handy and short way. For a  complete list of  operators and
  683. rules for  regular expressions applicable to AS-PATHS in RPSL
  684. refer to the RPSL document [1]. 
  685.  
  686. 3.4 Including Interfaces in Peering Definitions
  687.  
  688.  
  689. In the above  examples peerings were  only given  among ASs.
  690. However,  the peerings may be described  in much more detail  by
  691. RPSL. Actually,  peerings are introduced among physical  routers
  692. using real IP  addresses.  These  can be specified in the as-in
  693. and as-out attributes.   Figure 9 shows a  simple example of two
  694. ASs AS1 and  AS2 which  are connected to  an exchange  point
  695. IX. While AS1 has  only one connection  to the exchange  point
  696. via a  router interface with IP address  7.7.7.1, AS2 has  two
  697. different connections  with IP address 7.7.7.2 and 7.7.7.3.   The
  698. first AS  may then define its  routing policy in more detail by
  699. specifying its boundary router. 
  700.  
  701.  
  702.  
  703. Alaettinoglu et. al.          Expires  September 26, 1997          [Page 12]
  704. Internet Draft               Application of RPSL              March 26, 1997
  705.  
  706.     aut-num:   AS1
  707.     as-in:     from AS2 at 7.7.7.1 accept <^AS2$>
  708.     ...
  709.  
  710.  
  711. This is very simple  and does not  make much of a  difference
  712. compared to  a policy where no boundary router is specified
  713. because AS1 in this example has only one connection  to the
  714. exchange point.    However, AS1  might want  to choose to accept
  715. only announcements  from AS2  which come  from the  router with
  716. IP address 7.7.7.2 and disregard router 7.7.7.3.  AS1 then
  717. defines  the following routing policy towards AS2:
  718.  
  719.  
  720.     aut-num:   AS1
  721.     as-in:     from AS2 7.7.7.2 at 7.7.7.1 accept <^AS2$>
  722.     ...
  723.  
  724.  
  725. So both routers  involved in  a peering may  be specified  and by
  726. selecting certain pairs of routers other connections can be
  727. denied.  If no routers are included in a policy clause then it
  728. is assumed that the policy is true  for all peerings among the
  729. ASs involved. 
  730.  
  731.  
  732. 3.5 Describing Simple Backup Connections
  733.  
  734.  
  735. The specification of  peerings among ASs  is not limited  to one
  736. router  for each AS. In Figure 9 one of the two connections of
  737. AS2 to the exchange point IX might be  used as  backup in case
  738. the other  connection fails.   Let  us assume that AS1 wants to
  739. use the connection to router 7.7.7.2 of AS2  during regular
  740. operations, and router 7.7.7.3 as backup.  In a router
  741. configuration this may be done by setting a local  preference.
  742. The equivalent in RPSL is a corresponding action definition  in
  743. the peering description. The  action definitions are inserted
  744. directly before the accept keyword. 
  745.  
  746.     aut-num:   AS1
  747.     as-in:     from AS2 7.7.7.2 at 7.7.7.1 action pref=10
  748.                from AS2 7.7.7.3 at 7.7.7.1 action pref=20
  749.                accept <^AS2$>
  750.     ...
  751.  
  752.  
  753. Actions may also be defined without specifying IP addresses of
  754. routers. If no routers are  included in the  policy clause  then
  755. it is  asumed that  the actions are carried out for all peerings
  756. among the ASs involved. 
  757.  
  758. In the previous example AS1 controls where it  sends its traffic
  759. and  which connection is  used as  backup. However,  AS2 may
  760. also define  a  backup connection in an as-out clause:
  761.  
  762.  
  763. Alaettinoglu et. al.          Expires  September 26, 1997          [Page 13]
  764. Internet Draft               Application of RPSL              March 26, 1997
  765.  
  766.     aut-num:   AS2
  767.     as-out:    to AS1 7.7.7.1 at 7.7.7.2 action med=10
  768.                to AS1 7.7.7.1 at 7.7.7.3 action med=20
  769.                announce <^AS2$>
  770.     ...
  771.  
  772.  
  773. The definition  given here for AS2 is  the  symmetric counterpart
  774. to  the routing policy of  AS1. The selection  of routing
  775. information  is done  by setting the multi exit discriminator
  776. metric med. Actually, med metrics will not be used in practice
  777. like this; they are more suitable for load balancing including
  778. backups. For  more details  on med  metrics refer  to the
  779. BGP-4 RFC [6].
  780.  
  781.  
  782. 3.6 The aut-num Object Editor
  783.  
  784.  
  785. All the examples shown in the previous sections may well be
  786. edited by  hand. They may be  extracted one  by one  from the
  787. IRR using  the whois  program, edited, and then handed  back to
  788. the  registry robots.   However, again  the RAToolSet [5]
  789. provides  a very nice  tool which makes  working with  aut-num
  790. objects much easier:  the aut-num object editor aoe. 
  791.  
  792. The aut-num  object  editor has  a  graphical  user interface  to
  793. view  and manipulate aut-num objects registered at any IRR. New
  794. aut-num objects may be generated using templates and  submitted
  795. ot the registries.   Moreover,  the routing policy from  the
  796. databases may  be compared to  real life  peerings. Therefore,
  797. aoe is  highly  recommended  as  an interface  to  the  IRR  for
  798. aut-num objects.  Further information on aoe is available
  799. together with  the RAToolSet [5].
  800.  
  801.  
  802. 4 Router Configuration Using RtConfig
  803.  
  804.  
  805. RtConfig  is  a  tool  developed  by  the  Routing  Arbiter
  806. project  [7]) to generate vendor specific  router configurations
  807. from the  policy data  held in the various  IRRs.   RtConfig
  808. currently supports  Cisco,  gated and  RSd configuration formats.
  809. RtConfig  written in C++,  C, lex,  and yacc.    It has been
  810. publicly  available since late  1994, and is  currently being
  811. used by several sites for  router configuration.   A few  of the
  812. sites  currently using RtConfig include the Routing Arbiter
  813. Project (USA), ANS (USA),  CA*Net (Canada),  IMNet (Japan),
  814. VERIO  (USA),  Oregon-IX  (USA),  IAfrica  (South Africa).   The
  815. next section  describes a methodology  for generating  vendor
  816. specific router configurations using RtConfig.(3) 
  817.  
  818. ------------------------------
  819.  3. Discussion of RtConfig internals is beyond the scope of this document.
  820.  
  821.  
  822.  
  823.  
  824. Alaettinoglu et.  al.         Expires  September 26, 1997          [Page 14]
  825. Internet Draft               Application of RPSL              March 26, 1997
  826.  
  827. 4.1 Using RtConfig
  828.  
  829.  
  830. The general paradigm for  using RtConfig involves  registering
  831. policy in  an IRR, building a RtConfig source file, then running
  832. running RtConfig  against the source  file and  the  IRR database
  833. to  create vendor specific router configuration for the
  834. specified policy. The source file will contain vendor specific
  835. commands as well as RtConfig commands;  in particular, the
  836. vendor specific policy configuration  will be  removed and
  837. replaced with  RtConfig commands.  Commands  beginning with
  838. @RtConfig  instruct RtConfig to  perform special operations.   An
  839. example template file  is shown in Figure  10.   In this example,
  840. commands such  as ``@RtConfig  import AS3582  198.32.162.1/32
  841. AS3701 198.32.162.2/32''  instruct  RtConfig  to  generate
  842. vendor  specific import policies where the router 198.32.162.1 in
  843. AS3582 is importing  routes from router 198.32.162.2 in AS3701.
  844. The other @RtConfig commands  instruct the RtConfig  to  use
  845. certain names  and  numbers  in the  output  that  it generates
  846. (please refer to RtConfig manual [7] for additional
  847. information). 
  848.  
  849.  
  850.   router    bgp 3582
  851.   network   128.223.0.0
  852.   !
  853.   !       Start with access-list 100
  854.   !
  855.   @RtConfig set cisco`access`list`no = 100
  856.   !
  857.   !       NERO
  858.   !
  859.   neighbor 198.32.162.2 remote-as 3701
  860.   @RtConfig set cisco`map`name = "AS3701-EXPORT"
  861.   @RtConfig export AS3582 198.32.162.1/32 AS3701 198.32.162.2/32
  862.   @RtConfig set cisco`map`name = "AS3701-IMPORT"
  863.   @RtConfig import AS3582 198.32.162.1/32 AS3701 198.32.162.2/32
  864.   !
  865.   !       WNA/VERIO
  866.   !
  867.   neighbor 198.32.162.6 remote-as 2914
  868.   @RtConfig set cisco`map`name = "AS2914-EXPORT"
  869.   @RtConfig export AS3582 198.32.162.1/32 AS2914 198.32.162.6/32
  870.   @RtConfig set cisco`map`name = "AS2914-IMPORT"
  871.   @RtConfig import AS3582 198.32.162.1/32 AS2914 198.32.162.6/32
  872.   ...
  873.  
  874.  
  875.                      Figure 10:  RtConfig Template File
  876.  
  877. Once a  source file  is created,  the  file is  processed by
  878. RtConfig  (the default IRR is the RADB, and the default vendor is
  879. Cisco; however,  RtConfig or command line options can be used  to
  880. override these values).  The  result of running RtConfig on the
  881. source file in Figure 10 is shown in Figure 11. 
  882.  
  883.  
  884.  
  885. Alaettinoglu et. al.          Expires  September 26, 1997          [Page 15]
  886. Internet Draft               Application of RPSL              March 26, 1997
  887.  
  888. References
  889.  
  890.  
  891.  [1] C. Alaettinoglu, T.  Bates, E. Gerich, D. Karrenberg, M. Terpstra,  and
  892.      C. Villamizer:  Routing Policy Specification Language  (RPSL), Internet
  893.      draft, USC Information Sciences Institute, Work in Progress.
  894.  
  895.  [2] T. Bates, J-M. Jouanigot, D. Karrenberg, P. Lothberg, and  M. Terpstra.
  896.      Representation of IP  Routing Policies in the RIPE database,  Technical
  897.      Report ripe-81, RIPE, RIPE NCC, Amsterdam, Netherlands, February 1993.
  898.  
  899.  [3] T.  Bates, E.  Gerich,  J. Joncharay,  J-M. Jouanigot,  D.  Karrenberg,
  900.      M.  Terpstra,  and J.  Yu. Representation  of  IP Routing  Policies  in
  901.      a  Routing  Registry,  Technical  Report  ripe-181,   RIPE,  RIPE  NCC,
  902.      Amsterdam, Netherlands, October 1994.
  903.  
  904.  [4] Hank  Nussbacher. The CIDR  FAQ. Tel  Aviv University  and IBM  Israel.
  905.      http://www.ibm.net.il/~hank/cidr.html
  906.  
  907.  [5] The RAToolSet. http://www.ra.net/ra/RAToolSet/
  908.  
  909.  [6] Y. Rekhter adn T. Li. A Border Gateway Protocol 4 (BGP-4).  Request for
  910.      Comment RFC 1654. Network Information Center, July 1994.
  911.  
  912.  [7] RtConfig        as         part        of        the         RAToolSet.
  913.      http://www.ra.net/ra/RAToolSet/RtConfig.html
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920. Alaettinoglu et.  al.         Expires  September 26, 1997          [Page 16]
  921. Internet Draft               Application of RPSL             March 26, 1997
  922.  
  923.  
  924.   router    bgp 3582
  925.   network   128.223.0.0
  926.   !
  927.   !       NERO
  928.   !
  929.   neighbor 198.32.162.2 remote-as 3701
  930.  
  931.   no access-list 100
  932.   access-list 100 permit ip 128.223.0.0   0.0.0.0   255.255.0.0   0.0.0.0
  933.   access-list 100 deny ip 0.0.0.0 255.255.255.255 0.0.0.0 255.255.255.255
  934.   !
  935.   !
  936.   no route-map AS3701-EXPORT
  937.   route-map AS3701-EXPORT permit 1
  938.    match ip address 100
  939.   !
  940.   router bgp 3582
  941.   neighbor 198.32.162.2 route-map AS3701-EXPORT out
  942.   !
  943.   !
  944.   no route-map AS3701-IMPORT
  945.   route-map AS3701-IMPORT permit 1
  946.    set local-preference 1000
  947.   !
  948.   router bgp 3582
  949.   neighbor 198.32.162.2 route-map AS3701-IMPORT in
  950.   !
  951.   !       WNA/VERIO
  952.   !
  953.   neighbor 198.32.162.6 remote-as 2914
  954.   !
  955.   no route-map AS2914-EXPORT
  956.   route-map AS2914-EXPORT permit 1
  957.    match ip address 100
  958.   !
  959.   router bgp 3582
  960.   neighbor 198.32.162.6 route-map AS2914-EXPORT out
  961.   no ip as-path access-list  100
  962.   ip as-path access-list 100 permit ^_2914(((_[0-9]+))*              \
  963.         (13|22|97|132|175|668|1914|2905|2914|3361|3381|3791|3937|    \
  964.          4178|4354|4571|4674|4683|5091|5303|5798|5855|5856|5881|6083 \
  965.          |6188|6971|7790|7951|8028))?$
  966.   !
  967.   no route-map AS2914-IMPORT
  968.   route-map AS2914-IMPORT permit 1
  969.    match as-path 100
  970.    set local-preference 998
  971.   !
  972.   router bgp 3582
  973.   neighbor 198.32.162.6 route-map AS2914-IMPORT in
  974.   !
  975.   ! other Cisco commands
  976.   !
  977.  
  978.  
  979.                          Figure 11:  Output of RtConfig
  980.  
  981.  
  982. Alaettinoglu et.  al.        Expires  September 26, 1997          [Page 17]
  983. Internet Draft               Application of RPSL             March 26, 1997
  984.  
  985.  
  986.  
  987.