-
Notifications
You must be signed in to change notification settings - Fork 447
BGP LS support
BGP Link State, as defined in RFC 7752, defines a way in which an IGP node can export and transport its link state database using BGP. In the context of MPLS TE this database contains not only topology information but also the extensions required to perform traffic engineering. Making these bits available to a northbound entity (hence the "North-Bound Distribution" in the RFC title) can be useful in areas like LSP optimization, custom path computation, monitoring, etc.
ExaBGP can be used as such northbound entity, receiving and decoding BGP-LS information from a device and then probably feeding this data to a separate process. With the information received you could then perform offline CSPF computations, link monitoring and many more.
A working ExaBGP configuration could look like the following:
process parsed-route-backend {
run /home/ruissalo/exabgp/etc/exabgp/processes/file.py;
encoder json;
}
`neighbor 10.30.4.3 {`
`local-address 10.30.4.2;`
`local-as 65050;`
`peer-as 65000;`
`family { `
`bgpls bgp-ls;`
`}`
`api {`
`processes [ parsed-route-backend ];`
`receive {`
`parsed;`
`update;`
`}`
`} `
`}`
Where file.py is just a python script that reads from stdin and dumps the data into a file. This file will then contain update information like the following:
{ "exabgp": "3.5.0", "time": 1483605300.29, "host" : "ruissalo", "pid" : 10697, "ppid" : 10666, "counter": 12, "type": "update", "neighbor": { "address": { "local": "10.0.0.2", "peer": "10.0.0.1" }, "asn": { "local": "65050", "peer": "65000" }, "direction": "receive", "message": { "update": { "attribute": { "origin": "igp", "as-path": [ 65000 ], "confederation-path": [], "bgp-ls": { "node-name": "R1", "area-id": "490002", "local-te-router-id": "172.16.0.201" } }, "announce": { "bgpls bgp-ls": { "10.0.0.1": [ { "ls-nlri-type": 1, "l3-routing-toplogy": 0, "protocol-id": 2, "node-descriptors": { "autonomous-system": "65000", "router-id": "172000160201" }, "nexthop": "10.0.0.1" } ] } } } } } }
{ "exabgp": "3.5.0", "time": 1483605300.33, "host" : "ruissalo", "pid" : 10697, "ppid" : 10666, "counter": 13, "type": "update", "neighbor": { "address": { "local": "10.0.0.2", "peer": "10.0.0.1" }, "asn": { "local": "65050", "peer": "65000" }, "direction": "receive", "message": { "update": { "attribute": { "origin": "igp", "as-path": [ 65000 ], "confederation-path": [], "bgp-ls": { "admin-group-mask": [0], "maximum-link-bandwidth": 125000000.0, "maximum-reservable-link-bandwidth": 125000000.0, "unreserved-bandwidth": [125000000.0, 125000000.0, 125000000.0, 125000000.0, 125000000.0, 125000000.0, 125000000.0, 125000000.0], "te-metric": "10", "igp-metric": "10" } }, "announce": { "bgpls bgp-ls": { "10.0.0.1": [ { "ls-nlri-type": 2, "l3-routing-toplogy": "0", "protocol-id": 2, "local-node-descriptors": { "autonomous-system": "65000", "router-id": "172000160002" },
(...)
TODO
You can check here for details on how to set up a Juniper device to enable the distribution of link state information.
Before submitting any bug report make sure link state data is actually being exported from the TED:
Junos:
show route table lsdist.0
lsdist.0: 29 destinations, 29 routes (29 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
NODE { AS:65000 ISO:1720.0000.0202.00 ISIS-L2:0 }/1152
*[IS-IS/18] 4w1d 21:35:17
Fictitious
NODE { AS:65000 ISO:1720.0016.0001.00 ISIS-L2:0 }/1152
*[IS-IS/18] 4w1d 21:36:43
Fictitious
LINK { Local { AS:65000 ISO:1720.0016.0001.00 }.{ IPv4:10.0.0.3 } Remote { AS:65000 ISO:1720.0016.0011.00 }.{ IPv4:10.0.0.2 } ISIS-L2:0 }/1152
And that it is also being advertised to the ExaBGP neighbor:
show route advertising-protocol bgp 10.30.4.3 | match "NODE|LINK|PREFIX"
Get Started
Misc
Self-Promotion