idnits 2.17.1 draft-ietf-i2rs-rib-info-model-08.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- -- The document has examples using IPv4 documentation addresses according to RFC6890, but does not use any IPv6 documentation addresses. Maybe there should be IPv6 examples, too? Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 393 has weird spacing: '... base load...' == Line 410 has weird spacing: '...thop-id egres...' == Line 418 has weird spacing: '...l-encap tunne...' -- The document date (October 19, 2015) is 3111 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Outdated reference: A later version (-11) exists of draft-ietf-i2rs-problem-statement-06 Summary: 0 errors (**), 0 flaws (~~), 5 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group N. Bahadur, Ed. 3 Internet-Draft Bracket Computing 4 Intended status: Informational S. Kini, Ed. 5 Expires: April 21, 2016 Ericsson 6 J. Medved 7 Cisco 8 October 19, 2015 10 Routing Information Base Info Model 11 draft-ietf-i2rs-rib-info-model-08 13 Abstract 15 Routing and routing functions in enterprise and carrier networks are 16 typically performed by network devices (routers and switches) using a 17 routing information base (RIB). Protocols and configuration push 18 data into the RIB and the RIB manager installs state into the 19 hardware; for packet forwarding. This draft specifies an information 20 model for the RIB to enable defining a standardized data model. Such 21 a data model can be used to define an interface to the RIB from an 22 entity that may even be external to the network device. This 23 interface can be used to support new use-cases being defined by the 24 IETF I2RS WG. 26 Status of this Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at http://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on April 21, 2016. 43 Copyright Notice 45 Copyright (c) 2015 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (http://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the Simplified BSD License. 58 Table of Contents 60 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 61 1.1. Conventions used in this document . . . . . . . . . . . . 6 62 2. RIB data . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 63 2.1. RIB definition . . . . . . . . . . . . . . . . . . . . . . 6 64 2.2. Routing instance . . . . . . . . . . . . . . . . . . . . . 7 65 2.3. Route . . . . . . . . . . . . . . . . . . . . . . . . . . 8 66 2.4. Nexthop . . . . . . . . . . . . . . . . . . . . . . . . . 9 67 2.4.1. Nexthop types . . . . . . . . . . . . . . . . . . . . 11 68 2.4.2. Nexthop list attributes . . . . . . . . . . . . . . . 12 69 2.4.3. Nexthop content . . . . . . . . . . . . . . . . . . . 12 70 2.4.4. Special nexthops . . . . . . . . . . . . . . . . . . . 13 71 3. Reading from the RIB . . . . . . . . . . . . . . . . . . . . . 13 72 4. Writing to the RIB . . . . . . . . . . . . . . . . . . . . . . 14 73 5. Notifications . . . . . . . . . . . . . . . . . . . . . . . . 14 74 6. RIB grammar . . . . . . . . . . . . . . . . . . . . . . . . . 15 75 6.1. Nexthop grammar explained . . . . . . . . . . . . . . . . 17 76 7. Using the RIB grammar . . . . . . . . . . . . . . . . . . . . 18 77 7.1. Using route preference . . . . . . . . . . . . . . . . . . 18 78 7.2. Using different nexthops types . . . . . . . . . . . . . . 18 79 7.2.1. Tunnel nexthops . . . . . . . . . . . . . . . . . . . 18 80 7.2.2. Replication lists . . . . . . . . . . . . . . . . . . 18 81 7.2.3. Weighted lists . . . . . . . . . . . . . . . . . . . . 19 82 7.2.4. Protection . . . . . . . . . . . . . . . . . . . . . . 19 83 7.2.5. Nexthop chains . . . . . . . . . . . . . . . . . . . . 20 84 7.2.6. Lists of lists . . . . . . . . . . . . . . . . . . . . 21 85 7.3. Performing multicast . . . . . . . . . . . . . . . . . . . 22 86 8. RIB operations at scale . . . . . . . . . . . . . . . . . . . 23 87 8.1. RIB reads . . . . . . . . . . . . . . . . . . . . . . . . 23 88 8.2. RIB writes . . . . . . . . . . . . . . . . . . . . . . . . 23 89 8.3. RIB events and notifications . . . . . . . . . . . . . . . 23 90 9. Security Considerations . . . . . . . . . . . . . . . . . . . 23 91 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 24 92 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 24 93 12. References . . . . . . . . . . . . . . . . . . . . . . . . . . 24 94 12.1. Normative References . . . . . . . . . . . . . . . . . . . 24 95 12.2. Informative References . . . . . . . . . . . . . . . . . . 24 97 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 25 99 1. Introduction 101 Routing and routing functions in enterprise and carrier networks are 102 traditionally performed in network devices. Traditionally routers 103 run routing protocols and the routing protocols (along with static 104 config) populate the Routing information base (RIB) of the router. 105 The RIB is managed by the RIB manager and the RIB manager provides a 106 north-bound interface to its clients i.e. the routing protocols to 107 insert routes into the RIB. The RIB manager consults the RIB and 108 decides how to program the forwarding information base (FIB) of the 109 hardware by interfacing with the FIB manager. The relationship 110 between these entities is shown in Figure 1. 112 +-------------+ +-------------+ 113 |RIB client 1 | ...... |RIB client N | 114 +-------------+ +-------------+ 115 ^ ^ 116 | | 117 +----------------------+ 118 | 119 V 120 +---------------------+ 121 |RIB manager | 122 | | 123 | +-----+ | 124 | | RIB | | 125 | +-----+ | 126 +---------------------+ 127 ^ 128 | 129 +---------------------------------+ 130 | | 131 V V 132 +-------------+ +-------------+ 133 |FIB manager 1| |FIB manager M| 134 | +-----+ | .......... | +-----+ | 135 | | FIB | | | | FIB | | 136 | +-----+ | | +-----+ | 137 +-------------+ +-------------+ 139 Figure 1: RIB manager, RIB clients and FIB managers 141 Routing protocols are inherently distributed in nature and each 142 router makes an independent decision based on the routing data 143 received from its peers. With the advent of newer deployment 144 paradigms and the need for specialized applications, there is an 145 emerging need to guide the router's routing function 146 [I-D.ietf-i2rs-problem-statement]. Traditional network-device 147 protocol-based RIB population suffices for most use cases where 148 distributed network control is used. However there are use cases 149 which the network operators currently address by configuring static 150 routes, policies and RIB import/export rules on the routers. There 151 is also a growing list of use cases [I-D.white-i2rs-use-case], 152 [I-D.hares-i2rs-use-case-vn-vc] in which a network operator might 153 want to program the RIB based on data unrelated to just routing 154 (within that network's domain). Programming the RIB could be based 155 on other information such as routing data in the adjacent domain or 156 the load on storage and compute in the given domain. Or it could 157 simply be a programmatic way of creating on-demand dynamic overlays 158 (e.g. GRE tunnels) between compute hosts (without requiring the 159 hosts to run traditional routing protocols). If there was a 160 standardized publicly documented programmatic interface to a RIB, it 161 would enable further networking applications that address a variety 162 of use-cases [I-D.ietf-i2rs-problem-statement]. 164 A programmatic interface to the RIB involves 2 types of operations - 165 reading from the RIB and writing (adding/modifying/deleting) to the 166 RIB. [I-D.white-i2rs-use-case] lists various use-cases which require 167 read and/or write manipulation of the RIB. 169 In order to understand what is in a router's RIB, methods like per- 170 protocol SNMP MIBs and show output screen scraping are used. These 171 methods are not scalable, since they are client pull mechanisms and 172 not proactive push (from the router) mechanisms. Screen scraping is 173 error prone (since the output format can change) and is vendor 174 dependent. Building a RIB from per-protocol MIBs is error prone 175 since the MIB data represent protocol data and not the exact 176 information that went into the RIB. Thus, just getting read-only RIB 177 information from a router is a hard task. 179 Adding content to the RIB from an external entity can be done today 180 using static configuration mechanisms provided by router vendors. 181 However the mix of what can be modified in the RIB varies from vendor 182 to vendor and the method of configuring it is also vendor dependent. 183 This makes it hard for an external entity to program a multi-vendor 184 network in a consistent and vendor-independent way. 186 The purpose of this draft is to specify an information model for the 187 RIB. Using the information model, one can build a detailed data 188 model for the RIB. That data model could then be used by an external 189 entity to program a network device. 191 The rest of this document is organized as follows. Section 2 goes 192 into the details of what constitutes and can be programmed in a RIB. 193 Guidelines for reading and writing the RIB are provided in Section 3 194 and Section 4 respectively. Section 5 provides a high-level view of 195 the events and notifications going from a network device to an 196 external entity, to update the external entity on asynchronous 197 events. The RIB grammar is specified in Section 6. Examples of 198 using the RIB grammar are shown in Section 7. Section 8 covers 199 considerations for performing RIB operations at scale. 201 1.1. Conventions used in this document 203 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 204 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 205 document are to be interpreted as described in [RFC2119]. 207 2. RIB data 209 This section describes the details of a RIB. It makes forward 210 references to objects in the RIB grammar (Section 6). A high-level 211 description of the RIB contents is as shown below. 213 routing-instance 214 | | 215 | | 216 0..N | | 1..N 217 | | 218 interface(s) RIB(s) 219 | 220 | 221 | 0..N 222 | 223 route(s) 225 Figure 2: RIB model 227 2.1. RIB definition 229 A RIB is an entity that contains routes. A RIB is identified by its 230 name and a RIB is contained within a routing instance (Section 2.2). 231 The name MUST be unique within a routing instance. All routes in a 232 given RIB MUST be of the same type (e.g. IPv4). Each RIB MUST 233 belong to a routing instance. 235 A routing instance can have multiple RIBs. A routing instance can 236 even have two or more RIBs with the same type of routes (e.g. IPv6). 237 A typical case where this can be used is for multi-topology routing 238 ([RFC4915], [RFC5120]). 240 Each RIB can be optionally associated with a ENABLE_IP_RPF_CHECK 241 attribute that enables Reverse path forwarding (RPF) checks on all IP 242 routes in that RIB. Reverse path forwarding (RPF) check is used to 243 prevent spoofing and limit malicious traffic. For IP packets, the IP 244 source address is looked up and the rpf interface(s) associated with 245 the route for that IP source address is found. If the incoming IP 246 packet's interface matches one of the rpf interface(s), then the IP 247 packet is forwarded based on its IP destination address; otherwise, 248 the IP packet is discarded. 250 2.2. Routing instance 252 A routing instance, in the context of the RIB information model, is a 253 collection of RIBs, interfaces, and routing parameters. A routing 254 instance creates a logical slice of the router and allows different 255 logical slices; across a set of routers; to communicate with each 256 other. Layer 3 Virtual Private Networks (VPN), Layer 2 VPNs (L2VPN) 257 and Virtual Private Lan Service (VPLS) can be modeled as routing 258 instances. Note that modeling a Layer 2 VPN using a routing instance 259 only models the Layer-3 (RIB) aspect and does not model any layer-2 260 information (like ARP) that might be associated with the L2VPN. 262 The set of interfaces indicates which interfaces are associated with 263 this routing instance. The RIBs specify how incoming traffic is to 264 be forwarded. And the routing parameters control the information in 265 the RIBs. The intersection set of interfaces of 2 routing instances 266 MUST be the null set. In other words, an interface MUST NOT be 267 present in 2 routing instances. Thus a routing instance describes 268 the routing information and parameters across a set of interfaces. 270 A routing instance MUST contain the following mandatory fields. 271 o INSTANCE_NAME: A routing instance is identified by its name, 272 INSTANCE_NAME. This MUST be unique across all routing instances 273 in a given network device. 274 o rib-list: This is the list of RIBs associated with this routing 275 instance. Each routing instance can have multiple RIBs to 276 represent routes of different types. For example, one would put 277 IPv4 routes in one RIB and MPLS routes in another RIB. 279 A routing instance MAY contain the following optional fields. 280 o interface-list: This represents the list of interfaces associated 281 with this routing instance. The interface list helps constrain 282 the boundaries of packet forwarding. Packets coming on these 283 interfaces are directly associated with the given routing 284 instance. The interface list contains a list of identifiers, with 285 each identifier uniquely identifying an interface. 286 o ROUTER_ID: The router-id field identifies the network device in 287 control plane interactions with other network devices. This field 288 is to be used if one wants to virtualize a physical router into 289 multiple virtual routers. Each virtual router MUST have a unique 290 router-id. ROUTER_ID MUST be unique across all network devices in 291 a given domain. 293 2.3. Route 295 A route is essentially a match condition and an action following the 296 match. The match condition specifies the kind of route (IPv4, MPLS, 297 etc.) and the set of fields to match on. Figure 3 represents the 298 overall contents of a route. 300 route 301 | | | 302 +---------+ | +----------+ 303 | | | 304 0..N | | | 306 route-attribute match nexthop 307 | 308 | 309 +-------+-------+-------+--------+ 310 | | | | | 311 | | | | | 313 IPv4 IPv6 MPLS MAC Interface 315 Figure 3: Route model 317 This document specifies the following match types: 318 o IPv4: Match on destination IP address in the IPv4 header 319 o IPv6: Match on destination IP address in the IPv6 header 320 o MPLS: Match on a MPLS label at the top of the MPLS label stack 321 o MAC: Match on MAC destination addresses in the ethernet header 322 o Interface: Match on incoming interface of the packet 323 o IP multicast: Match on (S, G) or (*, G), where S and G are IP 324 addresses 326 Each route MUST have associated with it the following mandatory route 327 attributes. 328 o ROUTE_PREFERENCE: This is a numerical value that allows for 329 comparing routes from different protocols. Static configuration 330 is also considered a protocol for the purpose of this field. It 331 is also known as administrative-distance. The lower the value, 332 the higher the preference. For example there can be an OSPF route 333 for 192.0.2.1/32 with a preference of 5. If a controller programs 334 a route for 192.0.2.1/32 with a preference of 2, then the 335 controller's route will be preferred by the RIB manager. 336 Preference should be used to dictate behavior. For more examples 337 of preference, see Section 7.1. 339 Each route can have associated with it one or more optional route 340 attributes. 341 o route-vendor-attributes: Vendors can specify vendor-specific 342 attributes using this. The details of this attribute is outside 343 the scope of this document. 345 2.4. Nexthop 347 A nexthop represents an object resulting from a route lookup. For 348 example, if a route lookup results in sending the packet out a given 349 interface, then the nexthop represents that interface. 351 Nexthops can be fully resolved nexthops or unresolved nexthop. A 352 resolved nexthop has adequate information to send the outgoing packet 353 to the destination by forwarding it on an interface to a directly 354 connected neighbor. For example, a nexthop to a point-to-point 355 interface or a nexthop to an IP address on an Ethernet interface has 356 the nexthop resolved. An unresolved nexthop is something that 357 requires the RIB manager to determine the final resolved nexthop. 358 For example, a nexthop could be an IP address. The RIB manager would 359 resolve how to reach that IP address, e.g. is the IP address 360 reachable by regular IP forwarding or by a MPLS tunnel or by both. 361 If the RIB manager cannot resolve the nexthop, then the nexthop 362 remains in an unresolved state and is NOT a candidate for 363 installation in the FIB. Future RIB events can cause an unresolved 364 nexthop to get resolved (like that IP address being advertised by an 365 IGP neighbor). Conversely resolved nexthops can also become 366 unresolved (e.g. in case of a tunnel going down) and hence would no 367 longer be candidates to be installed in the FIB. 369 When at least one of a route's nexthops is resolved, then the route 370 can be used to forward packets. Such a route is considered eligible 371 to be installed in the FIB and is henceforth referred to as a FIB- 372 eligible route. Conversely, when all the nexthops of a route are 373 unresolved that route can no longer be used to forward packets. Such 374 a route is considered ineligible to be installed in the FIB and is 375 henceforth referred to as a FIB-ineligible route. The RIB 376 information model allows an external entity to program routes whose 377 nexthops may be unresolved initially. Whenever an unresolved nexthop 378 gets resolved, the RIB manager will send a notification of the same 379 (see Section 5 ). 381 The overall structure and usage of a nexthop is as shown in the 382 figure below. 384 route 385 | 386 | 0..N 387 | 388 nexthop <-------------------------------+ 389 | | 390 +-------+----------------------------+-------------+ | 391 | | | | | | 392 | | | | | | 393 base load-balance protection replicate chain | 394 | | | | | | 395 | |2..N |2..N |2..N |1..N | 396 | | | | | | 397 | | V | | | 398 | +------------->+<------------+-------------+ | 399 | | | 400 | +-------------------------------------+ 401 | 402 +-------------------+ 403 | 404 | 405 | 406 | 407 +---------------+--------+--------+--------------+ 408 | | | | 409 | | | | 410 nexthop-id egress-interface logical-tunnel | 411 | 412 | 413 +---------------------------+ 414 | 415 +--------------+-----------+ 416 | | | 417 | | | 418 tunnel-encap tunnel-decap special-nexthop 420 Figure 4: Nexthop model 422 Nexthops can be identified by an identifier to create a level of 423 indirection. The identifier is set by the RIB manager and returned 424 to the external entity on request. The RIB data-model SHOULD support 425 a way to optionally receive a nexthop identifier for a given nexthop. 426 For example, one can create a nexthop that points to a BGP peer. The 427 returned nexthop identifier can then be used for programming routes 428 to point to the same nexthop. Given that the RIB manager has created 429 an indirection for that BGP peer using the nexthop identifier, if the 430 transport path to the BGP peer changes, that change in path will be 431 seamless to the external entity and all routes that point to that BGP 432 peer will automatically start going over the new transport path. 433 Nexthop indirection using identifiers could be applied to not just 434 unicast nexthops, but even to nexthops that contain chains and nested 435 nexthops (Section 2.4.1). 437 2.4.1. Nexthop types 439 This document specifies a very generic, extensible and recursive 440 grammar for nexthops. Nexthops can be 441 o Interface nexthops - pointing to an interface 442 o Tunnel nexthops - pointing to a tunnel 443 o Replication lists - list of nexthops to which to replicate a 444 packet 445 o Weighted lists - for load-balancing 446 o Preference lists - for protection using primary and backup 447 o Nexthop chains - for chaining multiple operations or attaching 448 multiple headers 449 o Lists of lists - recursive application of the above 450 o Indirect nexthops - pointing to a nexthop identifier 451 o Special nexthops - for performing specific well-defined functions 452 (e.g. drop) 453 It is expected that all network devices will have a limit on how many 454 levels of lookup can be performed and not all hardware will be able 455 to support all kinds of nexthops. RIB capability negotiation becomes 456 very important for this reason and a RIB data-model MUST specify a 457 way for an external entity to learn about the network device's 458 capabilities. Examples of when and how to use various kinds of 459 nexthops are shown in Section 7.2. 461 Tunnel nexthops allow an external entity to program static tunnel 462 headers. There can be cases where the remote tunnel end-point does 463 not support dynamic signaling (e.g. no LDP support on a host) and in 464 those cases the external entity might want to program the tunnel 465 header on both ends of the tunnel. The tunnel nexthop is kept 466 generic with specifications provided for some commonly used tunnels. 467 It is expected that the data-model will model these tunnel types with 468 complete accuracy. 470 Nexthop chains Section 7.2.5, is a way to perform multiple operations 471 on a packet by logically combining them. For example, one can chain 472 together "decapsulate MPLS header" and "send it out a specific 473 EGRESS_INTERFACE". Chains can be used to specify multiple headers 474 over a packet, before a packet is forwarded. One simple example is 475 that of MPLS over GRE, wherein the packet has an inner MPLS header 476 followed by a GRE header followed by an IP header. The outermost IP 477 header is decided by the network device whereas the MPLS header and 478 GRE header are specified by the controller. Not every network device 479 will be able to support all kinds of nexthop chains and an arbitrary 480 number of header chained together. The RIB data-model SHOULD provide 481 a way to expose nexthop chaining capability supported by a given 482 network device. 484 2.4.2. Nexthop list attributes 486 For nexthops that are of the form of a list(s), attributes can be 487 associated with each member of the list to indicate the role of an 488 individual member of the list. Two attributes are specified: 489 o NEXTHOP_PREFERENCE: This is used for protection schemes. It is an 490 integer value between 1 and 99. A lower value indicates higher 491 preference. To download a primary/standby pair to the FIB, the 492 nexthops that are resolved and have two highest preferences are 493 selected. Each should have a unique value 494 within a 495 * 496 (Section 6). 497 o NEXTHOP_LB_WEIGHT: This is used for load-balancing. Each list 498 member MUST be assigned a weight between 1 and 99. The weight 499 determines the proportion of traffic to be sent over a nexthop 500 used for forwarding as a ratio of the weight of this nexthop 501 divided by the weights of all the nexthops of this route that are 502 used for forwarding. To perform equal load-balancing, one MAY 503 specify a weight of "0" for all the member nexthops. The value 504 "0" is reserved for equal load-balancing and if applied, MUST be 505 applied to all member nexthops. 507 2.4.3. Nexthop content 509 At the lowest level, a nexthop can be one of: 510 o identifier: This is an identifier returned by the network device 511 representing a nexthop. This can be used as a way of re-using a 512 nexthop when programming complex nexthops. 513 o EGRESS_INTERFACE: This represents a physical, logical or virtual 514 interface on the network device. Address resolution must not be 515 required on this interface. This interface may belong to any 516 routing instance. 517 o IP address: A route lookup on this IP address is done to determine 518 the egress interface. Address resolution may be required 519 depending on the interface. 520 * An optional RIB name can also be specified to indicate the RIB 521 in which the IP address is to be looked up. One can use the 522 RIB name field to direct the packet from one domain into 523 another domain. By default the RIB will be the same as the one 524 that route belongs to. 526 o EGRESS_INTERFACE and IP address: This can be used in cases e.g. 527 where the IP address is a link-local address. 528 o EGRESS_INTERFACE and MAC address: The egress interface must be an 529 ethernet interface. Address resolution is not required for this 530 nexthop. 531 o tunnel encap: This can be an encap representing an IP tunnel or 532 MPLS tunnel or others as defined in this document. An optional 533 egress interface can be chained to the tunnel encap to indicate 534 which interface to send the packet out on. The egress interface 535 is useful when the network device contains Ethernet interfaces and 536 one needs to perform address resolution for the IP packet. 537 o tunnel decap: This is to specify decapsulating a tunnel header. 538 After decap, further lookup on the packet can be done via chaining 539 it with another nexthop. The packet can also be sent out via a 540 EGRESS_INTERFACE directly. 541 o logical tunnel: This can be a MPLS LSP or a GRE tunnel (or others 542 as defined in this document), that is represented by a unique 543 identifier (E.g. name). 544 o RIB_NAME: A nexthop pointing to a RIB indicates that the route 545 lookup needs to continue in the specified RIB. This is a way to 546 perform chained lookups. 548 2.4.4. Special nexthops 550 This document specifies certain special nexthops. The purpose of 551 each of them is explained below: 552 o DISCARD: This indicates that the network device should drop the 553 packet and increment a drop counter. 554 o DISCARD_WITH_ERROR: This indicates that the network device should 555 drop the packet, increment a drop counter and send back an 556 appropriate error message (like ICMP error). 557 o RECEIVE: This indicates that that the traffic is destined for the 558 network device. For example, protocol packets or OAM packets. 559 All locally destined traffic SHOULD be throttled to avoid a denial 560 of service attack on the router's control plane. An optional 561 rate-limiter can be specified to indicate how to throttle traffic 562 destined for the control plane. The description of the rate- 563 limiter is outside the scope of this document. 565 3. Reading from the RIB 567 A RIB data-model MUST allow an external entity to read entries, for 568 RIBs created by that entity. The network device administrator MAY 569 allow reading of other RIBs by an external entity through access 570 lists on the network device. The details of access lists are outside 571 the scope of this document. 573 The data-model MUST support a full read of the RIB and subsequent 574 incremental reads of changes to the RIB. An external agent SHOULD be 575 able to request a full read at any time in the lifecycle of the 576 connection. When sending data to an external entity, the RIB manager 577 SHOULD try to send all dependencies of an object prior to sending 578 that object. 580 4. Writing to the RIB 582 A RIB data-model MUST allow an external entity to write entries, for 583 RIBs created by that entity. The network device administrator MAY 584 allow writes to other RIBs by an external entity through access lists 585 on the network device. The details of access lists are outside the 586 scope of this document. 588 When writing an object to a RIB, the external entity SHOULD try to 589 write all dependencies of the object prior to sending that object. 590 The data-model SHOULD support requesting identifiers for nexthops and 591 collecting the identifiers back in the response. 593 Route programming in the RIB MUST result in a return code that 594 contains the following attributes: 595 o Installed - Yes/No (Indicates whether the route got installed in 596 the FIB) 597 o Active - Yes/No (Indicates whether a route is fully resolved and 598 is a candidate for selection) 599 o Reason - E.g. Not authorized 600 The data-model MUST specify which objects are modify-able objects. A 601 modify-able object is one whose contents can be changed without 602 having to change objects that depend on it and without affecting any 603 data forwarding. To change a non-modifiable object, one will need to 604 create a new object and delete the old one. For example, routes that 605 use a nexthop that is identified by a nexthop identifier should be 606 unaffected when the contents of that nexthop changes. 608 5. Notifications 610 Asynchronous notifications are sent by the network device's RIB 611 manager to an external entity when some event occurs on the network 612 device. A RIB data-model MUST support sending asynchronous 613 notifications. A brief list of suggested notifications is as below: 614 o Route change notification, with return code as specified in 615 Section 4 616 o Nexthop resolution status (resolved/unresolved) notification 618 6. RIB grammar 620 This section specifies the RIB information model in Routing Backus- 621 Naur Form [RFC5511]. This grammar is intended to help the reader 622 better understand the english text description in order to derive a 623 data model. However it may not provide all the detail provided by 624 the english text. When there is a lack of clarity in the grammar the 625 english text will take precedence. 627 ::= 628 [] 629 [] 631 ::= ( ...) 633 ::= ( ...) 634 ::= 635 [ ... ] 636 [ENABLE_IP_RPF_CHECK] 637 ::= | | 638 | 640 ::= 641 [] 642 [] 644 ::= | | 645 | | 646 647 ::= | | | | 649 ::= 650 ( | | 651 ( )) 652 ::= 653 ::= 654 ::= 656 ::= 657 ( | | 658 ( )) 659 ::= 660 ::= 661 ::= 662 ::= | | 664 ::= [] 665 [] 667 ::= | 668 | 669 670 ::= <> 671 ::= <> 672 ::= <> 673 ::= <> 675 ::= | | 676 | | 677 679 ::= | 680 | 681 | 682 | | 683 ( 684 ( | )) | 685 ( ) | 686 | | 687 | 688 ) 690 ::= 692 ::= | | 693 ( []) 695 ::= 696 ( = 699 ( )... 701 ::= ... 703 ::= ... 705 ::= 706 ::= | | | | | 708 ::= ( ) | 709 ( ) | 710 ( ) | 711 ( ) | 712 ( ) | 713 ( ) 715 ::= 716 [] [] 718 ::= 719 [] 720 [] [] 722 ::= ( ...) 723 ::= ( [] 724 [] []) | 725 ( 726 []) 728 ::= [] 729 ::= ( | ) 730 [] 731 ::= ( | ) 732 733 [] 735 ::= (( []) | 736 ( []) | 737 ( [])) 739 Figure 5: RIB rBNF grammar 741 6.1. Nexthop grammar explained 743 A nexthop is used to specify the next network element to forward the 744 traffic to. It is also used to specify how the traffic should be 745 load-balanced, protected using preference or multicasted using 746 replication. This is explicitly specified in the grammar. The 747 nexthop has recursion built-in to address complex use-cases like the 748 one defined in Section 7.2.6. 750 7. Using the RIB grammar 752 The RIB grammar is very generic and covers a variety of features. 753 This section provides examples on using objects in the RIB grammar 754 and examples to program certain use cases. 756 7.1. Using route preference 758 Using route preference a client can pre-install alternate paths in 759 the network. For example, if OSPF has a route preference of 10, then 760 another client can install a route with route preference of 20 to the 761 same destination. The OSPF route will get precedence and will get 762 installed in the FIB. When the OSPF route is withdrawn, the 763 alternate path will get installed in the FIB. 765 Route preference can also be used to prevent denial of service 766 attacks by installing routes with the best preference, which either 767 drops the offending traffic or routes it to some monitoring/analysis 768 station. Since the routes are installed with the best preference, 769 they will supersede any route installed by any other protocol. 771 7.2. Using different nexthops types 773 The RIB grammar allows one to create a variety of nexthops. This 774 section describes uses for certain types of nexthops. 776 7.2.1. Tunnel nexthops 778 A tunnel nexthop points to a tunnel of some kind. Traffic that goes 779 over the tunnel gets encapsulated with the tunnel encap. Tunnel 780 nexthops are useful for abstracting out details of the network, by 781 having the traffic seamlessly route between network edges. At the 782 end of a tunnel, the tunnel will get decapsulated. Thus the grammar 783 supports two kinds of operations, one for encap and another for 784 decap. 786 7.2.2. Replication lists 788 One can create a replication list for replicating traffic to multiple 789 destinations. The destinations, in turn, could be complex nexthops 790 in themselves - at a level supported by the network device. Point to 791 multipoint and broadcast are examples that involve replication. 793 A replication list (at the simplest level) can be represented as: 795 ::= [ ... ] 797 The above can be derived from the grammar as follows: 799 ::= 800 ::= ... 802 7.2.3. Weighted lists 804 A weighted list is used to load-balance traffic among a set of 805 nexthops. From a modeling perspective, a weighted list is very 806 similar to a replication list, with the difference that each member 807 nexthop MUST have a NEXTHOP_LB_WEIGHT associated with it. 809 A weighted list (at the simplest level) can be represented as: 811 ::= ( ) 812 [( )... ] 814 The above can be derived from the grammar as follows: 816 ::= 817 ::= 818 819 ( ) ... 820 ::= ( ) 821 ( ) ... 823 7.2.4. Protection 825 A primary/backup protection can be represented as: 827 ::= <1> 828 <2> ) 830 The above can be derived from the grammar as follows: 832 ::= 833 ::= ( 834 ( )...) 835 ::= ( 836 ( )) 837 ::= (( 838 ( )) 839 ::= (<1> 840 (<2> )) 842 Traffic can be load-balanced among multiple primary nexthops and a 843 single backup. In such a case, the nexthop will look like: 845 ::= (<1> 846 ( 847 ( 848 ( ) ...)) 849 <2> ) 851 A backup can also have another backup. In such a case, the list will 852 look like: 854 ::= (<1> 855 <2> (<1> <2> )) 857 7.2.5. Nexthop chains 859 A nexthop chain is a way to perform multiple operations on a packet 860 by logically combining them. For example, when a VPN packet comes on 861 the WAN interface and has to be forwarded to the correct VPN 862 interface, one needs to POP the VPN label before sending the packet 863 out. Using a nexthop chain, one can chain together "pop MPLS header" 864 and "send it out a specific EGRESS_INTERFACE". 866 The above example can be derived from the grammar as follows: 868 ::= 869 ::= 870 ::= 871 ::= ( ) 873 Elements in a nexthop-chain are evaluated left to right. 875 A nexthop chain can also be used to put one or more headers on an 876 outgoing packet. One example is a Pseudowire - which is MPLS over 877 some transport (MPLS or GRE for instance). Another example is VxLAN 878 over IP. A nexthop chain thus allows an external entity to break up 879 the programming of the nexthop into independent pieces - one per 880 encapsulation. 882 A simple example of MPLS over GRE can be represented as: 884 ::= ( ) ( ) 885 887 The above can be derived from the grammar as follows: 889 ::= 890 ::= 891 ::= 892 ::= ( ) ( ) 893 895 7.2.6. Lists of lists 897 Lists of lists is a complex construct. One example of usage of such 898 a construct is to replicate traffic to multiple destinations, with 899 load balancing. In other words, for each branch of the replication 900 tree, there are multiple interfaces on which traffic needs to be 901 load-balanced on. So the outer list is a replication list for 902 multicast and the inner lists are weighted lists for load balancing. 903 Lets take an example of a network element has to replicate traffic to 904 two other network elements. Traffic to the first network element 905 should be load balanced equally over two interfaces outgoing-1-1 and 906 outgoing-1-2. Traffic to the second network element should be load 907 balanced over three interfaces outgoing-2-1, outgoing-2-2 and 908 outgoing-2-3 in the ratio 20:20:60. 910 This can be derived from the grammar as follows: 912 ::= 913 ::= ( ...) 914 ::= ( ) 915 ::= (( ) 916 ( )) 917 ::= (( 918 ( 919 ( ) ...)) 920 (( 921 ( 922 ( ) ...)) 923 ::= (( 924 ( 925 ( ))) 926 (( 927 ( 928 ( ) 929 ( ))) 930 ::= (( 931 ( ) 932 ( ))) 933 (( 934 ( ) 935 ( ) 936 ( ))) 937 ::= 938 (( 939 (50 ) 940 (50 ))) 941 (( 942 (20 ) 943 (20 ) 944 (60 ))) 946 7.3. Performing multicast 948 IP multicast involves matching a packet on (S, G) or (*, G), where 949 both S (source) and G (group) are IP prefixes. Following the match, 950 the packet is replicated to one or more recipients. How the 951 recipients subscribe to the multicast group is outside the scope of 952 this document. 954 In PIM-based multicast, the packets are IP forwarded on an IP 955 multicast tree. The downstream nodes on each point in the multicast 956 tree is one or more IP addresses. These can be represented as a 957 replication list ( Section 7.2.2 ). 959 In MPLS-based multicast, the packets are forwarded on a point to 960 multipoint (P2MP) label-switched path (LSP). The nexthop for a P2MP 961 LSP can be represented in the nexthop grammar as a 962 (P2MP LSP identifier) or a replication list ( Section 7.2.2) of 963 , with each tunnel encap representing a single mpls 964 downstream nexthop. 966 8. RIB operations at scale 968 This section discusses the scale requirements for a RIB data-model. 969 The RIB data-model should be able to handle large scale of 970 operations, to enable deployment of RIB applications in large 971 networks. 973 8.1. RIB reads 975 Bulking (grouping of multiple objects in a single message) MUST be 976 supported when a network device sends RIB data to an external entity. 977 Similarly the data model MUST enable a RIB client to request data in 978 bulk from a network device. 980 8.2. RIB writes 982 Bulking (grouping of multiple write operations in a single message) 983 MUST be supported when an external entity wants to write to the RIB. 984 The response from the network device MUST include a return-code for 985 each write operation in the bulk message. 987 8.3. RIB events and notifications 989 There can be cases where a single network event results in multiple 990 events and/or notifications from the network device to an external 991 entity. On the other hand, due to timing of multiple things 992 happening at the same time, a network device might have to send 993 multiple events and/or notifications to an external entity. The 994 network device originated event/notification message MUST support 995 bulking of multiple events and notifications in a single message. 997 9. Security Considerations 999 All interactions between a RIB manager and an external entity MUST be 1000 authenticated and authorized. The RIB manager MUST protect itself 1001 against a denial of service attack by a rogue external entity, by 1002 throttling request processing. A RIB manager MUST enforce limits on 1003 how much data can be programmed by an external entity and return 1004 error when such a limit is reached. 1006 The RIB manager MUST expose a data-model that it implements. An 1007 external agent MUST send requests to the RIB manager that comply with 1008 the supported data-model. The data-model MUST specify the behavior 1009 of the RIB manager on handling of unsupported data requests. 1011 10. IANA Considerations 1013 This document does not generate any considerations for IANA. 1015 11. Acknowledgements 1017 The authors would like to thank Ron Folkes, Jeffrey Zhang, the 1018 working group co-chairs and reviewers on their comments and 1019 suggestions on this draft. The following people contributed to the 1020 design of the RIB model as part of the I2RS Interim meeting in April 1021 2013 - Wes George, Chris Liljenstolpe, Jeff Tantsura, Susan Hares and 1022 Fabian Schneider. 1024 12. References 1026 12.1. Normative References 1028 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1029 Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ 1030 RFC2119, March 1997, 1031 . 1033 12.2. Informative References 1035 [I-D.hares-i2rs-use-case-vn-vc] 1036 Hares, S. and M. Chen, "Use Cases for Virtual Connections 1037 on Demand (VCoD) and Virtual Network on Demand (VNoD) 1038 using Interface to Routing System", 1039 draft-hares-i2rs-use-case-vn-vc-03 (work in progress), 1040 July 2014. 1042 [I-D.ietf-i2rs-problem-statement] 1043 Atlas, A., Nadeau, T., and D. Ward, "Interface to the 1044 Routing System Problem Statement", 1045 draft-ietf-i2rs-problem-statement-06 (work in progress), 1046 January 2015. 1048 [I-D.white-i2rs-use-case] 1049 White, R., Hares, S., and A. Retana, "Protocol Independent 1050 Use Cases for an Interface to the Routing System", 1051 draft-white-i2rs-use-case-06 (work in progress), 1052 July 2014. 1054 [RFC4915] Psenak, P., Mirtorabi, S., Roy, A., Nguyen, L., and P. 1055 Pillay-Esnault, "Multi-Topology (MT) Routing in OSPF", 1056 RFC 4915, DOI 10.17487/RFC4915, June 2007, 1057 . 1059 [RFC5120] Przygienda, T., Shen, N., and N. Sheth, "M-ISIS: Multi 1060 Topology (MT) Routing in Intermediate System to 1061 Intermediate Systems (IS-ISs)", RFC 5120, DOI 10.17487/ 1062 RFC5120, February 2008, 1063 . 1065 [RFC5511] Farrel, A., "Routing Backus-Naur Form (RBNF): A Syntax 1066 Used to Form Encoding Rules in Various Routing Protocol 1067 Specifications", RFC 5511, DOI 10.17487/RFC5511, 1068 April 2009, . 1070 Authors' Addresses 1072 Nitin Bahadur (editor) 1073 Bracket Computing 1074 150 West Evelyn Ave, Suite 200 1075 Mountain View, CA 94041 1076 US 1078 Email: nitin_bahadur@yahoo.com 1080 Sriganesh Kini (editor) 1081 Ericsson 1083 Email: sriganesh.kini@ericsson.com 1085 Jan Medved 1086 Cisco 1088 Email: jmedved@cisco.com