BGP route selection modes
Kentik has added a new configuration option, which determines how the BGP routes are selected for flow enrichment process. To make the whole process clear enough we should start with the basics.
BGP sessions
BGP session between customer’s router and Kentik can be established over:
- IPv4
- IPv6
Since these are “Multiprotocol BGP” sessions, for each of the sessions, it is possible to enable multiple Address Families, for example: Unicast, Multicast, Labeled-unicast, L3VPN, Flowspec, etc.
These Address Families are defined with AFI (Address Family Identifiers) and SAFI (Subsequent Address Family Identifiers) attributes. They are regulated by IANA and the exact values can be found on the following links:
- IANA AFI numbers: https://www.iana.org/assignments/address-family-numbers/address-family-numbers.xhtml
- IANA SAFI numbers: https://www.iana.org/assignments/safi-namespace/safi-namespace.xhtml
The Kentik side of the BGP peering with customer’s devices will be enabled with the Unicast, Labeled-Unicast and L3VPN families by default. For the BGP “IPvX” session from the Kentik side will have the following AFs enabled:
- “IPvX” unicast
- IPv4 and IPv6 labeled-unicast
- “IPvX” L3VPN - (IPv6 L3VPN address family is not used)
Received routes from each of these address families are stored in the separate route table, which is check during the Flow enrichment process.
NOTE: IPv6 VPN routes are received, but not used for the enrichment
The Flowspec address family will be enabled only if the customer explicitly enable it in the device configuration on the Kentik portal.
BGP attributes enrichment process
Assignment of the “Route Prefix/LEN” dimension
The assignment of the Src and Dst Route Prefix is the following:
- Src and Dst Route Prefix dimensions are first populated from the Flow information using Src and Dst Mask field from Flows - if applicable.
- Src and Dst Route Prefix will be overwritten further in the ingest processing if there is a matched BGP route.
- The way to know if the Src or Dst Route Prefix is coming from flow or BGP is by observing other BGP route attributes:
- if the Route prefix originates from the flow information the dimension “Next-hop AS Number” will be “0 - -Reserved AS-,ZZ” and the dimension “AS Path” will be empty.
- if the Route prefix is overwritten by the BGP information, the BGP related dimensions such as “Next-hop AS Number” and “AS path” will be populated
VRF metadata collection
As the part of the SNMP interface discovery process, Kentik SaaS or Kentik kproxy will perform the VRF discovery and interface association. This information about the VRFs is collected over SNMP using MPLS-L3VPN-STD-MIB
, if the device supports it. The devices from Cisco and Juniper Networks support this MIB. We have also developed support for for Nokia’s proprietary MIBs.
For each VRF, Kentik collects:
- Name
- Description
- Route Distinguisher (RD)
- Route Target (RT)
- Interface association
BGP route matching process
The enrichment of the BGP/Route related Flow dimensions is performed as a result of matching the Flow’s IP address against the BGP route received from customer’s device over BGP sessions. The default behavior of the matching process is the following:
- Flow’s Src interface is checked if it is assigned to the VRF.
- If the source interface is in the VRF, flow’s Dst IP address is looked-up against the BGP VPNv4 routes with the RD associated with the source interface’s VRF:
- If there is a route match, the route will be assigned to the flow
- If there is no match, or there is no BGP VPNv4 table at all, or even no L3VPN AF established as part of the BGP peering, the match will not be found and BGP route dimensions are not populated.
- If the source interface is not in the VRF, flow’s Dst IP address is looked-up against the “global” BGP table containing Unicast IPv4/IPv6 AF routes.
- If the source interface is in the VRF, flow’s Dst IP address is looked-up against the BGP VPNv4 routes with the RD associated with the source interface’s VRF:
- The same process is performed for flow’s source IP address route lookup, based on the destination interface association with the VRF.
BGP route selection configuration
To address some additional scenario’s that we have seen in the customer’s network, Kentik added the configurable option to influence the BGP route selection process related to which BGP routes will be used for matching process.
This configuration is available at the Settings → Devices → Edit Device dialog → BGP Tab.
At the dialog, there is a new drop down menu called “BGP Route Selection” with the following three options:
- VPN table for VRF interface, Unicast table for non-VRF interface (default option)
- VPN table, fallback to Unicast table
- VPN table, fallback to Labeled-Unicast table, fallback to Unicast table
The following table describes the behavior of each configuration option:
Dropdown menu option | VRF interface | non-VRF interface |
---|---|---|
VPN table for VRF interface, Unicast table for non-VRF interface | - use only L3VPN routes | - use only Unicast routes |
VPN table, fallback to Unicast table | - use L3VPN - no match: use Unicast | - - use Unicast |
VPN table, fallback to Labeled-Unicast table, fallback to Unicast table | - use L3VPN - no match: use Labeled-Unicast - no match: use Unicast | - use Labeled-Unicast - no match: use Unicast |