BGP FIB Install (Selective Route Download)
The BGP—Selective Route Download feature allows a network administrator to selectively download some or none of the BGP routes into the Routing Information Base (RIB). The primary application for this feature is 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. The feature thereby helps to maximize resources available and to improve routing scalability and convergence on the dedicated route reflector.
With RFC 4456, the concept of route reflection was defined; this would allow configuring designated one or more BGP routers in iBGP network as route reflectors. BGP relaxes the re-advertising restriction on these route reflectors, allowing them to accept and propagate IBGP routes to their clients.
The role of a dedicated route reflector (RR) is to propagate BGP updates without participating in the actual forwarding of transit traffic. That means the RR does not need to have all BGP routes downloaded into its RIB or FIB. It is beneficial for the RR to preserve its resources by not processing and storing those routes.
By default, BGP routes are downloaded to the RIB. To save resources on a dedicated route reflector, such downloading can be reduced or prevented by configuring a table map. A table map is so named because it controls what is put into the BGP routing table.
By reducing the route installation in the dedicated route reflectors, we can maximize availability of resources and improve routing scalability and convergence.
A new command ‘table map’ is being introduced to achieve this. A table map controls what is put into the BGP routing table. When configured it would reduce or prevent downloading routes to RIB.
Table map command references ‘route map’ rules available in BGP to control the routes going into the BGP routing table.
Table-map command can be used in two ways:
• When a simple table-map command is given (without filter option), the route map referenced in the table-map command shall be 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 option ‘filter’ is given in the table map command, the route map referenced is used to control whether a BGP route is to be downloaded to the IP RIB (hence the filter). A BGP route is not downloaded to the RIB if it is denied by the route map.
Topology
Below topology explains about BGP FIB Install functionality
Figure 1-35: BFP FIB Install Topology
Configuration
R1
#configure terminal | Enter the Configure mode. |
(config)#interface xe3/1 | Enter interface mode. |
(config-if)#ip address 20.1.1.1/24 | Configure IP address for interface |
(config-if)#exit | Exit interface mode |
(config)# router bgp 100 | Assign the ASN value (100) to the BGP router. |
(config-router)#neighbor 20.1.1.2 remote-as 100 | Configure neighbor in IBGP |
(config-router)#address-family ipv4 unicast | Enter address-family ipv4 unicast mode |
(config-router-af)#redistribute static | Redistribute static routes to advertise to its neighbor |
(config-router-af)#neighbor 20.1.1.2 activate | Activate the neighbor |
(config-router-af)#exit-address-family | Exit address-family mode |
(config-router)#exit | Exit Router mode and enter Configure mode |
(config)#ip route 1.1.1.0/24 xe3/1 | Configure static route. |
(config)#ip route 2.2.2.0/24 xe3/1 | Configure static route. |
(config)#ip route 3.3.3.0/24 xe3/1 | Configure static route. |
(config)#ip route 4.4.4.0/24 xe3/1 | Configure static route. |
(config)#ip route 5.5.5.0/24 xe3/1 | Configure static route. |
(config)#ip route 6.6.6.0/24 xe3/1 | Configure static route. |
(config)#commit | Commit the candidate configuration to the running configuration. |
R2
#configure terminal | Enter the Configure mode. |
(config)#interface xe3/1 | Configure IP address for interface |
(config-if)#ip address 20.1.1.2/24 | Configure IP address for interface |
(config-if)#exit | Exit from interface mode and enter into Configure mode |
(config)#router bgp 100 | Assign the ASN value (100) to the BGP router. |
(config-router)#neighbor 20.1.1.1 remote-as 100 | Configure neighbor iBGP. |
(config-router)#address-family ipv4 unicast | Enter address-family ipv4 unicast mode |
(config-router-af)#redistribute static | Redistribute the static routes. |
(config-router-af)#neighbor 20.1.1.1 activate | Activate the neighbor |
(config-router-af)#exit-address-family | Exit address-family mode |
(config-router)#exit | Exit the BGP Router mode and return to the Configure mode. |
(config)#ip access-list 1 | Login to Configure access-list parameters |
(config-ip-acl)#permit ipip 2.2.2.0 0.0.0.225 any | Configure access-list by allowing only one route to install in FIB table. |
(config-ip-acl)#exit | Exit assess list mode |
(config)# route-map test permit 1 | Configure route-map to match access-list |
(config-route-map)# match ip address 1 | Match the above configured access-list 1 |
(config-route-map)#exit | Exit from route-map Configure mode and enter into Configure mode |
(config)#router bgp 100 | Enter into BGP router mode |
(config-router)# address-family ipv4 unicast | Enter address-family ipv4 unicast mode |
(config-router-af)# table-map test filter | Apply table-map with route-map created and with filter option |
(config-router-af)#exit-address-family | Exit address family mode |
(config-router)#commit | Commit the candidate configuration to the running configuration. |
Validation
Table-map with Filter Option
Verify BGP neighborship is up between R1 and R2. Before applying table-map in R2, all routes will be installed in FIB table, as in below output.
R1
#show ip bgp summary
BGP router identifier 20.1.1.1, local AS BGP table version is 3
1 BGP AS-PATH entries
0 BGP community entries
number 100
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Dow
n State/PfxRcd
20.1.1.2 4 100 5
6 3
0
0
00:01:31
0
Total number of neighbors 1
Total number of Established sessions 1
#show ip bgp
BGP table version is 1, local router ID is 192.168.52.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, l - labeled, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.0/24 0.0.0.0 0 100 32768 ?
*> 2.2.2.0/24 0.0.0.0 0 100 32768 ?
*> 3.3.3.0/24 0.0.0.0 0 100 32768 ?
*> 4.4.4.0/24 0.0.0.0 0 100 32768 ?
*> 5.5.5.0/24 0.0.0.0 0 100 32768 ?
*> 6.6.6.0/24 0.0.0.0 0 100 32768 ?
Total number of prefixes 6 #
#show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,
ia - IS-IS inter area, E - EVPN, v - vrf leaked
* - candidate default
IP Route Table for VRF "default"
S 1.1.1.0/24 [1/0] is directly connected, eth1, 00:06:54
S 2.2.2.0/24 [1/0] is directly connected, eth1, 00:06:35
S 3.3.3.0/24 [1/0] is directly connected, eth1, 00:06:26
S 4.4.4.0/24 [1/0] is directly connected, eth1, 00:06:17
S 5.5.5.0/24 [1/0] is directly connected, eth1, 00:06:09
S 6.6.6.0/24 [1/0] is directly connected, eth1, 00:06:01
C 20.1.1.0/24 is directly connected, eth1, 00:07:32 C 127.0.0.0/8 is directly connected, lo, 00:08:21
C 192.168.52.0/24 is directly connected, eth0, 00:08:17
Gateway of last resort is not set #
R2
#show ip bgp
BGP table version is 1, local router ID is 192.168.52.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, l - labeled, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.0/24 0.0.0.0 0 100 32768 ?
*> 2.2.2.0/24 0.0.0.0 0 100 32768 ?
*> 3.3.3.0/24 0.0.0.0 0 100 32768 ?
*> 4.4.4.0/24 0.0.0.0 0 100 32768 ?
*> 5.5.5.0/24 0.0.0.0 0 100 32768 ?
*> 6.6.6.0/24 0.0.0.0 0 100 32768 ?
Total number of prefixes 6 #
#show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,
ia - IS-IS inter area, E - EVPN, v - vrf leaked
* - candidate default
IP Route Table for VRF "default"
B 1.1.1.0/24 [200/0] via 20.1.1.1, eth1, 00:13:44
B 2.2.2.0/24 [200/0] via 20.1.1.1, eth1, 00:13:44
B 3.3.3.0/24 [200/0] via 20.1.1.1, eth1, 00:13:44
B 4.4.4.0/24 [200/0] via 20.1.1.1, eth1, 00:13:44
B 5.5.5.0/24 [200/0] via 20.1.1.1, eth1, 00:13:44
B 6.6.6.0/24 [200/0] via 20.1.1.1, eth1, 00:13:44
C 20.1.1.0/24 is directly connected, eth1, 00:14:12 C 127.0.0.0/8 is directly connected, lo, 00:25:26
C 192.168.52.0/24 is directly connected, eth0, 00:25:23
Gateway of last resort is not set #
Table-map With Filter Option
Now verify after applying table-map with filter option, only one route will be installed in FIB table according to route-map and access-list configured, BGP table remains same, table-map effect will be seen only for FIB table.
After applying table-map, clear BGP with "clear ip bgp table-map."
(config)#router bgp 100
(config-router)#address-family ipv4-unicast
(config-router-af)#table-map test filter
(config-router-af)#end
#clear ip bgp table-map
#show ip bgp
BGP table version is 2, local router ID is 192.168.52.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, l - labeled, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*>i 1.1.1.0/24 20.1.1.1 0 100 0 ?
*>i 2.2.2.0/24 20.1.1.1 0 100 0 ?
*>i 3.3.3.0/24 20.1.1.1 0 100 0 ?
*>i 4.4.4.0/24 20.1.1.1 0 100 0 ?
*>i 5.5.5.0/24 20.1.1.1 0 100 0 ?
*>i 6.6.6.0/24 20.1.1.1 0 100 0 ?
Total number of prefixes 6 #
#show ip bgp summary
BGP router identifier 192.168.52.5, local AS number 100 BGP table version is 2
1 BGP AS-PATH entries
0 BGP community entries
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/ PfxRcd
20.1.1.1 4 100 40 39 2 0 0 00:18:33
6
Total number of neighbors 1
Total number of Established sessions 1 #
#show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,
ia - IS-IS inter area, E - EVPN, v - vrf leaked
* - candidate default
IP Route Table for VRF "default"
B 2.2.2.0/24 [200/0] via 20.1.1.1, eth1, 00:00:26
C 20.1.1.0/24 is directly connected, eth1, 00:19:01 C 127.0.0.0/8 is directly connected, lo, 00:30:15
C 192.168.52.0/24 is directly connected, eth0, 00:30:12
Gateway of last resort is not set
Table-map Without Filter Option
Remove filter option while applying table-map as below in R2
#configure terminal | Enter the Configure mode. |
(config)#router bgp 100 | Enter into BGP router mode |
(config-router)# address-family ipv4 unicast | Enter address-family ipv4 unicast mode |
(config-router-af)# table-map test | Apply table-map with route-map created and with filter option |
(config-router-af)#exit-address-family | Exit address family mode |
(config-router)#commit | Commit the candidate configuration to the running configuration. |
#show running-config bgp
!
router bgp 100 redistribute static
neighbor 20.1.1.1 remote-as 100 table-map test
!
address-family ipv4 unicast
neighbor 20.1.1.1 activate
exit-address-family
!
#clear ip bgp table-map
#show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,
ia - IS-IS inter area, E - EVPN, v - vrf leaked
* - candidate default
IP Route Table for VRF "default"
B 1.1.1.0/24 [200/0] via 20.1.1.1, eth1, 00:00:04
B 2.2.2.0/24 [200/0] via 20.1.1.1, eth1, 00:00:04
B 3.3.3.0/24 [200/0] via 20.1.1.1, eth1, 00:00:04
B 4.4.4.0/24 [200/0] via 20.1.1.1, eth1, 00:00:04
B 5.5.5.0/24 [200/0] via 20.1.1.1, eth1, 00:00:04
B 6.6.6.0/24 [200/0] via 20.1.1.1, eth1, 00:00:04
C 20.1.1.0/24 is directly connected, eth1, 00:31:16 C 127.0.0.0/8 is directly connected, lo, 00:42:30
C 192.168.52.0/24 is directly connected, eth0, 00:42:27
Gateway of last resort is not set #
Note: Same can be tried with IPV6 VRF–v4 and VRF–v6 address-families and this feature is not supported for VPNV4 address-family