📄 rfc2280.txt
字号:
Figure 10: route-set Objects An address prefix or a route-set name in a members attribute can be optionally followed by a range operator. For example, the following setAlaettinoglu, et. al. Standards Track [Page 12]RFC 2280 RPSL January 1998 route-set: rs-bar members: 5.0.0.0/8^+, 30.0.0.0/8^24-32, rs-foo^+ contains all the more specifics of 5.0.0.0/8 including 5.0.0.0/8, all the more specifics of 30.0.0.0/8 which are of length 24 to 32 such as 30.9.9.96/28, and all the more specifics of address prefixes in route set rs-foo. The mbrs-by-ref attribute is a list of maintainer names or the keyword ANY. If this attribute is used, the route set also includes address prefixes whose route objects are registered by one of these maintainers and whose member-of attribute refers to the name of this route set. If the value of a mbrs-by-ref attribute is ANY, any route object referring to the route set name is a member. If the mbrs-by- ref attribute is missing, only the address prefixes listed in the members attribute are members of the set. route-set: rs-foo mbrs-by-ref: MNTR-ME, MNTR-YOU route-set: rs-bar members: 128.7.0.0/16 mbrs-by-ref: MNTR-YOU route: 128.9.0.0/16 origin: AS1 member-of: rs-foo mnt-by: MNTR-ME route: 128.8.0.0/16 origin: AS2 member-of: rs-foo, rs-bar mnt-by: MNTR-YOU Figure 11: route-set objects. Figure 11 presents example route-set objects that use the mbrs-by-ref attribute. The set rs-foo contains two address prefixes, namely 128.8.0.0/16 and 128.9.0.0/16 since the route objects for 128.8.0.0/16 and 128.9.0.0/16 refer to the set name rs-foo in their member-of attribute. The set rs-bar contains the address prefixes 128.7.0.0/16 and 128.8.0.0/16. The route 128.7.0.0/16 is explicitly listed in the members attribute of rs-bar, and the route object for 128.8.0.0/16 refer to the set name rs-bar in its member-of attribute. Note that, if an address prefix is listed in a members attribute of a route set, it is a member of that route set. The route objectAlaettinoglu, et. al. Standards Track [Page 13]RFC 2280 RPSL January 1998 corresponding to this address prefix does not need to contain a member-of attribute referring to this set name. The member-of attribute of the route class is an additional mechanism for specifying the members indirectly.5.2 as-set Class The attributes of the as-set class are shown in Figure 12. The as- set attribute defines the name of the set. It is an RPSL name that starts with "as-". The members attribute lists the members of the set. The members attribute is a list of AS numbers, or other as-set names. Attribute Value Type as-set <object-name> mandatory, single-valued, class key members list of <as-numbers> or optional, single-valued <as-set-names> mbrs-by-ref list of <mntner-names> optional, single-valued Figure 12: as-set Class Attributes Figure 13 presents two as-set objects. The set as-foo contains two ASes, namely AS1 and AS2. The set as-bar contains the members of the set as-foo and AS3, that is it contains AS1, AS2, AS3. as-set: as-foo as-set: as-bar members: AS1, AS2 members: AS3, as-foo Figure 13: as-set objects. The mbrs-by-ref attribute is a list of maintainer names or the keyword ANY. If this attribute is used, the AS set also includes ASes whose aut-num objects are registered by one of these maintainers and whose member-of attribute refers to the name of this AS set. If the value of a mbrs-by-ref attribute is ANY, any AS object referring to the AS set is a member of the set. If the mbrs-by-ref attribute is missing, only the ASes listed in the members attribute are members of the set. Figure 14 presents an example as-set object that uses the mbrs-by-ref attribute. The set as-foo contains AS1, AS2 and AS3. AS4 is not a member of the set as-foo even though the aut-num object references as-foo. This is because MNTR-OTHER is not listed in the as-foo's mbrs-by-ref attribute.Alaettinoglu, et. al. Standards Track [Page 14]RFC 2280 RPSL January 1998 as-set: as-foo members: AS1, AS2 mbrs-by-ref: MNTR-ME aut-num: AS3 aut-num: AS4 member-of: as-foo member-of: as-foo mnt-by: MNTR-ME mnt-by: MNTR-OTHER Figure 14: as-set objects.5.3 Predefined Set Objects In a context that expects a route set (e.g. members attribute of the route-set class), an AS number ASx defines the set of routes that are originated by ASx; and an as-set AS-X defines the set of routes that are originated by the ASes in AS-X. A route p is said to be originated by ASx if there is a route object for p with ASx as the value of the origin attribute. For example, in Figure 15, the route set rs-special contains 128.9.0.0/16, routes of AS1 and AS2, and routes of the ASes in AS set AS-FOO. route-set: rs-special members: 128.9.0.0/16, AS1, AS2, AS-FOO Figure 15: Use of AS numbers and AS sets in route sets. The set rs-any contains all routes registered in IRR. The set as-any contains all ASes registered in IRR.5.4 Hierarchical Set Names Set names can be hierarchical. A hierarchical set name is a sequence of set names and AS numbers separated by colons ":". For example, the following names are valid: AS1:AS-CUSTOMERS, AS1:RS-EXCEPTIONS, AS1:RS-EXPORT:AS2, RS-EXCEPTIONS:RS-BOGUS. All components of an hierarchical set name which are not AS numbers should start with "as-" or "rs-" for as sets and route sets respectively. A set object with name X1:...:Xn-1:Xn can only be created by the maintainer of the object with name X1:...:Xn-1. That is, only the maintainer of AS1 can create a set with name AS1:AS-FOO; and only the maintainer of AS1:AS-FOO can create a set with name AS1:AS-FOO:AS- BAR.Alaettinoglu, et. al. Standards Track [Page 15]RFC 2280 RPSL January 1998 The purpose of an hierarchical set name is to partition the set name space so that the controllers of the set name X1 controls the whole set name space under X1, i.e. X1:...:Xn-1. This is important since anyone can create a set named AS-MCI-CUSTOMERS but only the people created AS3561 can create AS3561:AS-CUSTOMERS. In the former, it is not clear if the set AS-MCI-CUSTOMERS has any relationship with MCI. In the latter, we can guarantee that AS3561:AS-CUSTOMERS and AS3561 are created by the same entity.6 aut-num Class ASes are specified using the aut-num class. The attributes of the aut-num class are shown in Figure 16. The value of the aut-num attribute is the AS number of the AS described by this object. The as-name attribute is a symbolic name (in RPSL name syntax) of the AS. The import, export and default routing policies of the AS are specified using import, export and default attributes respectively. Attribute Value Type aut-num <as-number> mandatory, single-valued, class key as-name <object-name> mandatory, single-valued member-of list of <as-set-names> optional, single-valued import see Section 6.1 optional, multi valued export see Section 6.2 optional, multi valued default see Section 6.5 optional, multi valued Figure 16: aut-num Class Attributes6.1 import Attribute: Import Policy Specification Figure 17 shows a typical interconnection of ASes that we will be using in our examples throughout this section. In this example topology, there are three ASes, AS1, AS2, and AS3; two exchange points, EX1 and EX2; and six routers. Routers connected to the same exchange point peer with each other, i.e. open a connection for exchanging routing information. Each router would export a subset of the routes it has to its peer routers. Peer routers would import a subset of these routes. A router while importing routes would set some route attributes. For example, AS1 can assign higher preference values to the routes it imports from AS2 so that it prefers AS2 over AS3. While exporting routes, a router may also set some route attributes in order to affect route selection by its peers. For example, AS2 may set the MULTI-EXIT-DISCRIMINATOR BGP attribute so that AS1 prefers to use the router 9.9.9.2. Most interAS policies are specified by specifying what route subsets can be imported or exported, and how the various BGP route attributes are set and used.Alaettinoglu, et. al. Standards Track [Page 16]RFC 2280 RPSL January 1998 ---------------------- ---------------------- | 7.7.7.1 |-------| |-------| 7.7.7.2 | | | ======== | | | AS1 | EX1 |-------| 7.7.7.3 AS2 | | | | | | 9.9.9.1 |------ ------| 9.9.9.2 | ---------------------- | | ---------------------- =========== | EX2 ---------------------- | | 9.9.9.3 |--------- | | | AS3 | ---------------------- Figure 17: Example topology consisting of three ASes, AS1, AS2, and AS3; two exchange points, EX1 and EX2; and six routers. In RPSL, an import policy is divided into import policy expressions. Each import policy expression is specified using an import attribute. The import attribute has the following syntax (we will extend this syntax later in Sections 6.3 and 6.6): import: from <peering-1> [action <action-1>] . . . from <peering-N> [action <action-N>] accept <filter> The action specification is optional. The semantics of an import attribute is as follows: the set of routes that are matched by <filter> are imported from all the peers in <peerings>; while importing routes at <peering-M>, <action-M> is executed. E.g. aut-num: AS1 import: from AS2 action pref = 1; accept { 128.9.0.0/16 } This example states that the route 128.9.0.0/16 is accepted from AS2 with preference 1. In the next few subsections, we will describe how peerings, actions and filters are specified.6.1.1 Peering Specification Our example above used an AS number to specify peerings. The peerings can be specified at different granularities. The syntax of a peering specification has two forms. The first one is as follows:Alaettinoglu, et. al. Standards Track [Page 17]RFC 2280 RPSL January 1998 <peer-as> [<peer-router>] [at <local-router>] where <local-router> and <peer-router> are IP addresses of routers, <peer-as> is an AS number. <peer-as> must be the AS number of <peer-router>. Both <local-router> and <peer-router> are optional. If both <local-router> and <peer-router> are specified, this peering specification identifies only the peering between these two routers. If only <local-router> is specified, this peering specification identifies all the peerings between <local-router> and any of its peer routers in <peer-as>. If only <peer-router> is specified, this peering specification identifies all the peerings between any router in the local AS and <peer-router>. If neither <local-router> nor <peer-router> is specified, this peering specification identifies all the peerings between any router in the local AS and any router in <peer-as>. We next give examples. Consider the topology of Figure 17 where 7.7.7.1, 7.7.7.2 and 7.7.7.3 peer with each other; 9.9.9.1, 9.9.9.2 and 9.9.9.3 peer with each other. In the following example 7.7.7.1 imports 128.9.0.0/16 from 7.7.7.2. (1) aut-num: AS1 import: from AS2 7.7.7.2 at 7.7.7.1 accept { 128.9.0.0/16 } In the following example 7.7.7.1 imports 128.9.0.0/16 from 7.7.7.2 and 7.7.7.3. (2) aut-num: AS1 import: from AS2 at 7.7.7.1 accept { 128.9.0.0/16 } In the following example 7.7.7.1 imports 128.9.0.0/16 from 7.7.7.2 and 7.7.7.3, and 9.9.9.1 imports 128.9.0.0/16 from 9.9.9.2. (3) aut-num: AS1 import: from AS2 accept { 128.9.0.0/16 }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -