====== BGP-LS ====== BGP provides various extension useful for SDN such as : L3VPN, L2VPN, IP multicast, linkstate, etc. BGP-LS is an extension of BGP which provides a mecahnism by wich link-state and TE information can be collected. It uses a new BGP Network Layer Reachability Information (NLRI) encoding format. ===== Context for BGP-LS ===== Link-State Database (LSDB) and IGP's Traffic Engineering (TED) describe only the links and nodes with an IGP area. Some applications need visibility outside one area or Autonomous System AS. IETF defined : * **PCE,** compute TE paths * **Alto Server,** generate an abstracted network topology and provide it to network applications. They both require to gather informations about the topologies and capabilities of the network. To build an optimal path, PCE needs a database with topology information to run path computation. This database is the **TED (Traffic Engineering Database)**. It needs link brandwidth, IGP metrics, etc. In BGP-LS, BGP speaker can retrieve information from IGP LSDB and send it to a controller. A router maintains databases of link-state informations about nodes and link-state information: * local/remote IP addresses, * local/remote interface identifiers, * link metric & TE metric, * link brandwidth, * reservable brandwidth, * (Class of Service class, reservation state, preemption, Shared RIsk Link Groups (SLRGs)) ===== BGP-LS format and encapsulation ===== BGP-LS works only for the following IGP protocols: IS-IS Level 1, IS-IS Level 2, OSPFv2, Direct, Static Configuration, OSPFv3. The //Direct// and //Static Configuration// are used when sourcing local information. "If BGP-LS has direct access to interface information and wants to advertise a local link, then the Protocol-ID 'Direct' SHOULD be used." [1] "For modeling virtual links, the Protocol-ID 'Static configuration' SHOULD be used" BGP-LS introduces a **new NLRI** and a new **Path attribute**: ==== BGP-LS new NRLI ==== __What is BGP NLRI (Network Layer Reachability Information) ?__ It is information exchanged between BGP speaker with a BGP UPDATE message, it usually contains the network mask in bit, and the prefix (address of subnet). The new NLRI is based on the TLV format (Type/Length/Value): +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // Value (variable) // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ BGP-LS introduces new NLRI types composed of 4 objects: ^ Type ^ NLRI Type ^ | 1 | Node NLRI | | 2 | Link NLRI | | 3 | IPv4 Topology Prefix NLRI | | 4 | IPv6 Topology Prefix NLRI | === Node NLRI === +-+-+-+-+-+-+-+-+ | Protocol-ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Identifier | | (64 bits) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // Local Node Descriptors (variable) // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ exemple of info included : Node Name, Router-ID, Multi-Topology identifier === Link NLRI === +-+-+-+-+-+-+-+-+ | Protocol-ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Identifier | | (64 bits) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // Local Node Descriptors (variable) // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // Remote Node Descriptors (variable) // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // Link Descriptors (variable) // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ exemple of info included: Metric, Max Bandwidth, unreserved Bandwidth, available Bandwidth ==== BGP-LS new Path Attribute ==== __What is BGP Path Attribute ?__ BGP Path Attributes are the characteristics of BGP routes. - Well-known Mandatory: Recognized and Included in all BGP Update messages. - Well-known Discretionary: Recognized and May or May not include in BGP Update messages - Optional Transitive: Even if Not Supported it Still need to accept and Send in Update Message. - Optional Non-transitive: Can be ignored and not advertise to peers. Path attributes are used to carry necessary attributes to characterize the objects described above i.e. Node, Link or Prefix NLRI. ====== Questions ====== __Which AS number can I choose for my BGP-SL peers ? __ "IANA has reserved, for Private Use, a contiguous block of 1023 Autonomous System numbers from the "16-bit Autonomous System Numbers" registry, namely 64512 - 65534 inclusive." [4], --- //[[sowarks@minet.net|sowarks]] 2018/03/12 14:43// ===== Sources ===== * [1] RFC 7752, North-Bound Distribution of Link-State and Traffic Engineering (TE) Information Using BGP * [2] [[https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_bgp/configuration/xe-16/irg-xe-16-book/bgp-ls.html]] * [3] [[http://packetpushers.net/yet-another-new-bgp-nlri-bgp-ls/]] * [4] RFC 6996, Autonomous System (AS) Reservation for Private Use