.. _bgp-user-guide-topology-provider: Topology Provider ================= This section provides an overview of the BGP topology provider service. It shows how to configure and use all available BGP topology providers. Providers are building topology view of BGP routes stored in local BGP speaker's Loc-RIB. Output topologies are rendered in a form of standardised IETF network topology model. .. contents:: Contents :depth: 2 :local: Inet Reachability Topology ^^^^^^^^^^^^^^^^^^^^^^^^^^ Inet reachability topology exporter offers a mapping service from IPv4/6 routes to network topology nodes. Configuration ''''''''''''' Following example shows how to create a new instance of IPv4 BGP topology exporter: **URL:** ``/restconf/config/network-topology:network-topology`` **Method:** ``POST`` **Content-Type:** ``application/xml`` **Request Body:** .. code-block:: xml :linenos: :emphasize-lines: 2,4,6 bgp-example-ipv4-topology bgp-example @line 2: An identifier for a topology. @line 4: Used to identify type of the topology. In this case BGP IPv4 reachability topology. @line 6: A name of the local BGP speaker instance. ----- The topology exporter instance can be removed in a following way: **URL:** ``/restconf/config/network-topology:network-topology/topology/bgp-example-ipv4-topology`` **Method:** ``DELETE`` ----- Following example shows how to create a new instance of IPv6 BGP topology exporter: **URL:** ``/restconf/config/network-topology:network-topology`` **Method:** ``POST`` **Content-Type:** ``application/xml`` **Request Body:** .. code-block:: xml bgp-example-ipv6-topology bgp-example Usage ''''' Operational state of the topology can be verified via REST: **URL:** ``/restconf/operational/network-topology:network-topology/topology/bgp-example-ipv4-topology`` **Method:** ``GET`` **Response Body:** .. code-block:: xml :linenos: :emphasize-lines: 8,11 bgp-example-ipv4-topology true 10.10.1.1 10.0.0.10/32 @line 8: The identifier of a node in a topology. Its value is mapped from route's NEXT_HOP attribute. @line 11: The IP prefix attribute of the node. Its value is mapped from routes's destination IP prefix. BGP Linkstate Topology ^^^^^^^^^^^^^^^^^^^^^^ BGP linkstate topology exporter offers a mapping service from BGP-LS routes to network topology nodes and links. Configuration ''''''''''''' Following example shows how to create a new instance of linkstate BGP topology exporter: **URL:** ``/restconf/config/network-topology:network-topology`` **Method:** ``POST`` **Content-Type:** ``application/xml`` **Request Body:** .. code-block:: xml bgp-example-linkstate-topology bgp-example Usage ''''' Operational state of the topology can be verified via REST. A sample output below represents a two node topology with two unidirectional links interconnecting those nodes. **URL:** ``/restconf/operational/network-topology:network-topology/topology/bgp-example-linkstate-topology`` **Method:** ``GET`` **Response Body:** .. code-block:: xml bgp-example-linkstate-topology true bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0040 bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.40 40.40.40.40/32 10 203.20.160.0/24 10 node1 40.40.40.40 40.40.40.40 MDAwMDAwMDAwMDY0 bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0039 bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.39 39.39.39.39/32 10 203.20.160.0/24 10 node2 39.39.39.39 39.39.39.39 MDAwMDAwMDAwMDg3 bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0039 bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.39 bgpls://IsisLevel2:1/type=link&local-as=65000&local-domain=673720360&local-router=0000.0000.0040&remote-as=65000&remote-domain=673720360&remote-router=0000.0000.0039&ipv4-iface=203.20.160.40&ipv4-neigh=203.20.160.39 bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0040 bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.40 10 0 1250000.0 12500.0 0 12500.0 0 12500.0 1 12500.0 2 12500.0 3 12500.0 4 12500.0 5 12500.0 6 12500.0 7 bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0040 bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.40 bgpls://IsisLevel2:1/type=link&local-as=65000&local-domain=673720360&local-router=0000.0000.0039&remote-as=65000&remote-domain=673720360&remote-router=0000.0000.0040&ipv4-iface=203.20.160.39&ipv4-neigh=203.20.160.40 bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0039 bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.39 10 0 1250000.0 12500.0 0 12500.0 0 12500.0 1 12500.0 2 12500.0 3 12500.0 4 12500.0 5 12500.0 6 12500.0 7 BGP Network Topology Configuration Loader ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ BGP Network Topology Configuration Loader allows user to define static initial configuration for a BGP protocol instance. This service will detect the creation of new configuration files following the pattern ``network-topology-*.xml`` under the path ``etc/opendaylight/bgpcep``. Once the file is processed, the defined configuration will be available from the configuration Data Store. .. note:: If the BGP topology instance is already present, no update or configuration will be applied. **PATH:** ``etc/opendaylight/bgpcep/network-topology-config.xml`` .. code-block:: xml example-ipv4-topology example-bgp-rib example-ipv6-topology example-bgp-rib example-linkstate-topology example-bgp-rib