-
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.
The exact name of the family and JSON fields may change slightly before the next release during the 4.0 development process.
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;
}
}
}
There are basically three types of JSON structures in the current implementation, one for each NRLI type: NODE, LINK and PREFIX. They are uniquely identified by the value in "ls-nlri-type" according to the following table:
__________________
| ID | NLRI Type |
| ---|-------------|
| 1 | Node NLRI |
| 2 | Link NLRI |
| 3 | Prefix NLRI |
--------------------
Examples of each of these data types follow below, please note that they do not represent the full set of possible TLVs.
Node JSON:
{
"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" } ]
}
}
}
}
}
}
Link JSON
{
"exabgp": "3.5.0",
"time": 1483696956.01,
"host": "ruissalo",
"pid": 13326,
"ppid": 13172,
"counter": 14,
"type": "update",
"neighbor": {
"address": {
"local": "172.24.248.5",
"peer": "172.24.248.52"
},
"asn": {
"local": "65050",
"peer": "65000"
},
"direction": "receive",
"message": {
"update": {
"attribute": {
"origin": "igp",
"as-path": [
65000
],
"confederation-path": [
],
"bgp-ls": {
"admin-group-mask": [
32784
],
"maximum-link-bandwidth": 125000000,
"maximum-reservable-link-bandwidth": 125000000,
"unreserved-bandwidth": [
125000000,
125000000,
125000000,
125000000,
125000000,
125000000,
125000000,
125000000
],
"te-metric": "10",
"igp-metric": "10",
"shared-risk-link-groups": [
10001,
100002
]
}
},
"announce": {
"bgpls bgp-ls": {
"172.24.248.52": [
{
"ls-nlri-type": 2,
"l3-routing-toplogy": "0",
"protocol-id": 2,
"local-node-descriptors": {
"autonomous-system": "65000",
"router-id": "172000160022"
},
"remote-node-descriptors": {
"autonomous-system": "65000",
"router-id": "172000160002"
},
"interface-address": {
"interface-address": "10.0.0.4"
},
"neighbor-address": {
"neighbor-address": "10.0.0.5"
}
}
]
}
}
}
}
}
}
Prefix JSON
{
"exabgp": "3.5.0",
"time": 1483696640.91,
"host": "ruissalo",
"pid": 65938,
"ppid": 16664,
"counter": 1,
"type": "update",
"neighbor": {
"address": {
"local": "10.0.0.1",
"peer": "10.0.0.2"
},
"asn": {
"local": "65001",
"peer": "65000"
},
"direction": "in",
"message": {
"update": {
"attribute": {
"origin": "igp",
"local-preference": 300,
"bgp-ls": {
"prefix-metric": "3"
}
},
"announce": {
"bgpls bgp-ls": {
"10.0.0.2": [
{
"ls-nlri-type": 3,
"l3-routing-toplogy": 0,
"protocol-id": 2,
"node-descriptors": {
"autonomous-system": "65300",
"bgp-ls-identifier": "2886795018",
"router-id": "110444002004"
},
"ip-reachability-tlv": "10.16.254.2",
"nexthop": "10.16.255.1"
},
{
"ls-nlri-type": 3,
"l3-routing-toplogy": 0,
"protocol-id": 2,
"node-descriptors": {
"autonomous-system": "65800",
"bgp-ls-identifier": "2886795018",
"router-id": "110019902004"
},
"ip-reachability-tlv": "10.23.9.0",
"nexthop": "10.16.255.10"
},
{
"ls-nlri-type": 3,
"l3-routing-toplogy": 0,
"protocol-id": 2,
"node-descriptors": {
"autonomous-system": "65900",
"bgp-ls-identifier": "2886795018",
"router-id": "063340151132"
},
"ip-reachability-tlv": "10.16.25.2",
"nexthop": "10.16.2.1"
},
{
"ls-nlri-type": 3,
"l3-routing-toplogy": 0,
"protocol-id": 2,
"node-descriptors": {
"autonomous-system": "65300",
"bgp-ls-identifier": "2222795018",
"router-id": "0612401544442"
},
"ip-reachability-tlv": "10.3.0.0",
"nexthop": "10.16.25.1"
},
{
"ls-nlri-type": 3,
"l3-routing-toplogy": 0,
"protocol-id": 2,
"node-descriptors": {
"autonomous-system": "65300",
"bgp-ls-identifier": "2886995018",
"router-id": "061240151132"
},
"ip-reachability-tlv": "10.1.20.10",
"nexthop": "10.16.25.1"
},
{
"ls-nlri-type": 3,
"l3-routing-toplogy": 0,
"protocol-id": 2,
"node-descriptors": {
"autonomous-system": "65300",
"bgp-ls-identifier": "2886222018",
"router-id": "010012226004"
},
"ip-reachability-tlv": "10.16.2.28",
"nexthop": "10.16.25.1"
},
{
"ls-nlri-type": 3,
"l3-routing-toplogy": 0,
"protocol-id": 2,
"node-descriptors": {
"autonomous-system": "65600",
"bgp-ls-identifier": "2882225018",
"router-id": "0100133336004"
},
"ip-reachability-tlv": "10.23.9.0",
"nexthop": "10.1.25.1"
},
{
"ls-nlri-type": 3,
"l3-routing-toplogy": 0,
"protocol-id": 2,
"node-descriptors": {
"autonomous-system": "65200",
"bgp-ls-identifier": "2886795018",
"router-id": "010017002005"
},
"ip-reachability-tlv": "10.16.254.5",
"nexthop": "10.16.25.1"
},
{
"ls-nlri-type": 3,
"l3-routing-toplogy": 0,
"protocol-id": 2,
"node-descriptors": {
"autonomous-system": "65200",
"bgp-ls-identifier": "2886795018",
"router-id": "010022222005"
},
"ip-reachability-tlv": "10.2.9.0",
"nexthop": "10.16.25.1"
},
{
"ls-nlri-type": 3,
"l3-routing-toplogy": 0,
"protocol-id": 2,
"node-descriptors": {
"autonomous-system": "65200",
"bgp-ls-identifier": "1111111111",
"router-id": "010017992005"
},
"ip-reachability-tlv": "10.15.50.1",
"nexthop": "10.16.25.1"
}
]
}
}
}
}
}
}
(Data above doesn't represent any real topology, it was taken from real routers but was anonymized)
- Juniper
You can check here for details on how to set up a Juniper device to enable the distribution of link state information.
- Cisco
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