Routing basics
To announce routes to external partners, we use the Border Gateway Protocol (BGP). Using this, the routers connect and create a session, and announce network prefixes.
In the example above, the router C2 announces the prefix 2001:db8:2000::/64 through 2001:db8:1000::2. The router C3 announces the networks connected to the router and not shown in the picture to router C2. Then, C3 announces networks that are not directly connected to the router, but reachable through other routers connected to router C3 and so forth.
Routing preferences
When multiple routers are connected to one router, it makes sense to announce which router is preferred.
One way to do it is to set a local preference of the router in the BGP configuration. The router with the highest preference is selected. The drawback is that our side decides which router is preferred and not the other side, although they might have the need to change the value during maintenance.
The second option to select one router over the other is to send a Multi-Exit Discriminator (MED) value. If both routers have the same preference based on other values, the one with the lowest MED value is selected. The MED value is transmitted through Border Gateway Protocol.