BGP Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

PDF

BGP Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

Table policy

Want to summarize with AI?

Log in

Describes configuring traffic index values on routes to support policy accounting and selectively drop routes from the routing table based on match criteria.


Table policy is a feature that

  • configures traffic index values on routes as BGP installs them in the global routing table

  • supports the BGP policy accounting feature, and

  • provides the ability to drop routes from the Routing Information Base (RIB) based on match criteria.

Table policy operational details

You enable this feature using the table-policy command. BGP policy accounting uses traffic indices set on BGP routes to track various counters. The ability to drop routes from the RIB is useful in applications such as Remotely Triggered Blackhole (RTBH) filtering to mitigate denial-of-service attacks, or to enforce specific security policies by preventing routes to unwanted destinations from being installed in the local forwarding table.

However, use this feature with caution. It can easily lead to a scenario where BGP advertises routes to neighbors but does not install them in its global routing table and forwarding table. This results in traffic destined for those routes being silently dropped.


Apply policy when updating routing table

Apply a routing policy to routes being installed into the routing table and configure a route policy for BGP neighbors.

This task outlines the steps to configure a policy that influences which routes BGP installs into the global routing table using the table-policy command. It also includes an example of how to define a general route policy and apply it to BGP neighbors for inbound and outbound routes.

Procedure

1.

Configure the BGP routing process, specifying the autonomous system number and the address family.

Example:

Router# configure
Router(config)# router bgp 120.6
Router(config-bgp)# address-family ipv4 unicast
2.

Apply the routing policy to routes being installed into the routing table.

Example:

Router(config-bgp-af)# table-policy tbl-plcy-A
Router(config-bgp)# exit
Router(config)# commit
3.

Configure a pass-all route policy that accepts and advertises all routes without modifications.

Example:

Router(config)# route-policy pass-all
Router(config-rpl)# pass
Router(config-rpl)# end-policy
Router(config)# commit
4.

Apply the pass-all policy to a BGP neighbor.

Example:

Router(config)# router bgp 1
Router(config-bgp)# neighbor 192.168.40.24
Router(config-bgp-nbr)# remote-as 21
Router(config-bgp-nbr)# address-family ipv4 unicast
Router(config-bgp-nbr-af)# route-policy pass-all in
Router(config-bgp-nbr-af)# route-policy pass-all out
Router(config-bgp-nbr-af)# commit
5.

Verify the BGP neighbor summary.

Example:

Router# show bgp all all summary

Address Family: IPv4 Unicast
============================

BGP router identifier 10.0.0.1, local AS number 1 BGP generic scan interval 60 secs
BGP main routing table version 41 BGP scan interval 60 secs
BGP is operating in STANDALONE mode.

Process	RecvTblVer	bRIB/RIB SendTblVer
Speaker	41	41	41

Neighbor	Spk	AS MsgRcvd MsgSent	TblVer InQ OutQ Up/Down St/PfxRcd
10.0.101.1	0	1	919	925	41	0	0 15:15:08	10
10.0.101.2	0	2	0	0	0	0	0 00:00:00 Idle	

This command displays eBGP neighbors that do not have both an inbound and outbound policy for every active address family.

The specified policies are applied to routes being installed into the routing table, and to BGP neighbors for inbound and outbound route advertisements.