Lets assume we have 2 routers, rA and rB with network 192.168.0.0/16 and AS64512. Each router has 3 interfaces:
connection 1: rA connected to carrier A, rB connected to carrier B via BGP
connection 2: rA is connected to rB via a direct link
connection 3: rA and rB are connected to a layer 3 switch which does the inter-vlan routing
Now, when all interfaces are up and running, life is good. If one of the routers looses its connection to its carrier it is no problem because the BGP session will go down and that router will stop announcing the network and traffic will flow through the other router. Even if connection2 or connection 3 goes down, we can work around this failure by using an iGP of choice. But, what if connection 2 and connection 3 are both down (bad luck, human error etc) on lets say rA, it still has a connection with carrier A and is thus announcing the network 192.168.0.0/16 and traffic will be dropped.
Now, my question is, how can we prevent BGP from announcing routes when this is the case? I have read many books, looked at numerous examples but none seem to address this issue. Is there even a way or am I looking in the wrong direction? Or am I overlooking something here? Any help is very much appreciated!