====== BGP-PCEP LS ======
OpenDayLight provides a plugin for BGP which features:
* inter/intra-AS peering
* routes advertising
* routes originating
* routes storage
===== Installation =====
This is a short tutorial to build a BGP-LS tunnel communication.
* Install the feature: feature:install odl-bgpcep-bgp
===== Configuration =====
==== 1. Debugging ====
=== a. Get network topology: ===
curl -u "admin:admin" -X GET http://192.168.103.144:8181/restconf/operational/network-topology:network-topology/
{"network-topology":{"topology":[{"topology-id":"example-ipv4-topology","server-provided":true,"topology-types":
{"odl-bgp-topology-types:bgp-ipv4-reachability-topology":{}}},{"topology-id":"flow:1"},{"topology-id":"example-
ipv6-topology","server-provided":true,"topology-types":{"odl-bgp-topology-types:bgp-ipv6-reachability-topology":
{}}},{"topology-id":"example-linkstate-topology","server-provided":true,"topology-types":{"odl-bgp-topology-
types:bgp-linkstate-topology":{}}}]}}
=== b. Debug ===
* Check that BGP speaker is listenning on TCP port 1790 (BGP port of ODL): netstat -lapute | grep 1790
* Check that BGP peer is listening for BGP connection : telnet
==== 2. First attempt ====
* Create bgp-rib.xml file
192.168.103.144
64514
* Add BGP RIB
curl -u "admin:admin" -H "Content-Type: text/xml" -d @bgp-rib.xml -X PUT http://192.168.103.144:8181/restconf/config/openconfig-bgp:bgp/global/config
* Check values are right
curl -u "admin:admin" -X GET http://192.168.103.144:8181/restconf/config/openconfig-bgp:bgp/global/config
====3. Second Attempt ====
=== a. Configure BGP Speaker - Local BGP ===
curl -u "admin:admin" -X GET http://192.168.103.144:8181/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols | python -m json.tool
bgp-example
x:BGP
192.168.103.144
64514
LINKSTATE
curl -u "admin:admin" -X POST -H "Content-Type: text/xml" -d @bgp-config.xml http://192.168.103.144:8181/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols
=== b. Check the RIB ===
curl -u "admin:admin" -X GET http://192.168.103.144:8181/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example | python -m json.tool
=== c. Configure BGP server listening port ===
"BGP uses TCP as its transport protocol, by default listens on port 179. OpenDaylight BGP plugin is configured to listen on port 1790, due to privileged ports restriction for non-root users. One of the workarounds is to use port redirection. In case other port is desired to be used instead, we can reconfigure it." [1]
default
192.168.103.144
179
curl -u "admin:admin" -d @bgp-port.xml -X PUT http://192.168.103.144:8181/restconf/config/odl-bgp-peer-acceptor-config:bgp-peer-acceptor-config/default
It does not work. Please refer to the following
Edit 41-bgp-example.xml file
prefix:bgp-peer-acceptor
bgp-peer-server
0.0.0.0
1790
=== d. Configure peer BGP ===
192.168.103.143
LINKSTATE
x:IPV4-UNICAST
false
0
90
10
179
false
EXTERNAL
64513
curl -u "admin:admin" -X POST -H "Content-Type: text/xml" -d @bgp-peer.xml http://192.168.103.144:8181/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/neighbors
Check peer configuration :
curl -u "admin:admin" -X GET http://192.168.103.144:8181/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/neighbors | python -m json.tool
===== Sources =====
* [[ http://docs.opendaylight.org/en/stable-nitrogen/user-guide/bgp-user-guide.html#overview ]]