The Internet consists of many self-administered and inter-connected AutonomousSystems(ASms). ASms exchangeinter-AS routing information with each other via the Border Gateway Protocol (BGP). Neighboring BGP routers located in different ASms share their inter-AS routing information via external BGP (eBGP), whereas two routers in the same AS share their inter-AS routing information via internal BGP (iBGP). From the paths received from its peers, each BGP router chooses the best path based on routing policies chosen locally at its own AS. Conflicting policies between different ASms may cause divergence problems in eBGP, i.e., permanent oscillations in the chosen path to the destination. On the other hand, divergence problems may also occur in iBGP. This is caused by the interaction of routereflection clustering, which is a technique to improve the scalability of iBGP, and other factors, such as intra-AS link costs, among others. In this paper, we provide a comprehensive solution that avo...