I use BGP mutihop for BGP peering to my customers. In path between my BGP router and customer router I have usually 2 more routers with static routes for customers prefixes(these two routers are not included in BGP session). Problem is when customer put BGP session to shut my static routes still exists in my network and I can't reach customer prefixes through internet via his second provider. Does anyone have idea how to solve this problem?
Thanks in advance
The solution depends on what you are willing to run on those 2 intermediate routers (depending on their CPU, memory and your general setup).
For example, you could run iBGP between those 2 routers and the BGP router where your client BGP sessions terminate. You could filter the routes from BGP router towards those 2 and only allow customer prefixes (partial BGP routes instead of whole Internet routing table means a lot less memory requirements). This way the 2 routers will learn the customer prefixes from the main BGP router (which knows those only if BGP client session is up). You can then remove the static routes for client subnets and put a default route (suppose you already have such a route) in those 2 towards the main BGP router. When the client shuts the BGP session, routes will be removed from the 2 routers, default route will be used towards the main BGP router and from there on (hopefully) you have a proper BGP core that will forward packets towards the Internet and reach client via its secondary connection.