There are various situations where you would want to optimize the performance of your route-reflector in BGP network. By default BGP downloads all the routes in RIB. BGP Table-Map is one of the methods to achieve BGP selective route download particularly used on the Route-Reflectors.
BGP Table-map is primary used to suppress the unnecessary downloading of certain BGP routes to the RIB or Forwarding Information Base (FIB) on a dedicated route reflector, which propagates BGP updates without carrying transit traffic.
Suppressing/Filtering the routes in RIB/FIB on the dedicated route-reflectors provides essential saving on the memory and CPU resources on the router.
Note that the Selective Route Download feature is not applicable to Multiprotocol Label Switching (MPLS) Layer 3 VPN because the route download is already automatically suppressed on a route reflector.
The table-map command is configured under route bgp process and is applied on the router as a whole and not on per neighbor basis as route-maps.
It is important to understand the use of the filter keyword in the table-map command:
- When the table-map command is used without the filter keyword, the route map referenced in the table-map command is used to set certain properties (such as the traffic index) of the routes for installation into the RIB. The route is always downloaded, regardless of whether it is permitted or denied by the route map.
- When the table-map command is used with the filter keyword, the route map referenced is also used to control whether a BGP route is to be downloaded to the RIB (hence the filter). A BGP route is not downloaded to the RIB if it is denied by the route map.
We can create a route-map to permit or deny the routes to be downloaded in the RIB or FIB and then use this route-map with the table-map command.
Related- BGP Suppress MAP and Attribute MAP
LET’S USE THE BELOW TOPOLOGY TO UNDERSTAND THE USE OF TABLE-MAPS –
In the topology diagram above R1 is advertising a route of its loopback 1 i.e. 188.8.131.52 to Route-Reflector. We have applied a route-map on Route-Reflector to deny everything and then this route-map is called in the table-map command so avoid the installation of the route in the RIB and FIB on the RR.
Though RR doesn’t install the route in its RIB & FIB it still reflects the route to R2.
SCENARIO 1: TABLE-MAP ISN’T APPLIED
As of now we are able to see the route of 184.108.40.206 on R3 in RIB and FIB.
R3#sh ip route
Route for 220.127.116.11 is also received on R2 from R3.
R2#sh ip route 18.104.22.168
SCENARIO 2: TABLE-MAP IS APPLIED UNDER ROUTER BGP
Now we have configured table-map to deny the suppress route for 22.214.171.124 in RIB and FIB.
R1 sends the route to R3.
R1#sh ip bgp neighbors 126.96.36.199 advertised-routes
R3 doesn’t install the route in its RIB & FIB as the route-map tmap is configured to deny all the routes.
Note that under the route-map we can allow or deny the routes if required.
R3#sh ip route 188.8.131.52
R3#sh ip cef 184.108.40.206
R2#sh ip route 220.127.116.11 Related- Non-Exist-Map & BGP Advertise-Map
R2#sh ip route 18.104.22.168
Related- Non-Exist-Map & BGP Advertise-Map