Routers in the network run the risk of being overwhelmed by huge amounts of routing information when configured for the Border Gateway Protocol (BGP). Therefore, you want to filter the routing information exchanged with the BGP peer. Permit default routes to be learned and deny all other BGP updates. The size of the local routing table can be controlled without losing IP connectivity to remote networks. This is useful when, based on the existence of other routes, the default route learned from the BGP neighbor is conditionally advertised by it.
To resolve this issue, create a prefix list to permit only default routes and use this list to filter routes learned from BGP neighbors.
To create the prefix list to permit only default routes, issue the ip prefix-list command in global configuration mode. Use the permit keyword and specify the network to be permitted as 0.0.0.0/0.
To filter BGP updates learned from a BGP neighbor as per the configured prefix list, issue the neighbor prefix-list command in router configuration mode. To specify that filtering is applied to incoming advertisements, use the in keyword.