Although you can certainly manipulate the route's metric to influence the routing decision, BGP does provide other, more preferred methods for route control. For instance, metric, or MED, is actually the 6th value examined in the routing decision process. Its far more common to manipulate the weight or local preference to influence a routing decision since its close to the top and will have little or no chance of being overridden by something higher in the decision process.
Also, just wanted to make sure you understood that BGP does NOT use metric the same way a IGP, like OSPF, does. For bgp, in the traditional sense, the metric is merely a differentiator when you have two direct connections (as in AS connections) to a remote AS.
As for an example, if it were me, I would do something like the following:
ip prefix-list branchx permit 10.x.x.x/24
route-map local-pref permit 10
match ip add prefix branchx
set local-pref 200
route-map local-pref permit 20
router bgp yyyyy
neighbor zz.zz.zz.zz route-map local-pref in
Alternativly, you could also just set the weight, it really depends on your topology, your downstream neighbors, if any, and how many routers your trying to manipulate.
We are pleased to announce availability of Beta software for 16.6.3.
16.6.3 will be the second rebuild on the 16.6 release train targeted
towards Catalyst 9500/9400/9300/3850/3650 switching platforms. We are
looking for early feedback from customers befor...
Introduction Featured Speakers Luis Espejel is the Telecommunications
Manager of IENova, an Oil & Gas company. Currently he works with Cisco
IOS® and Cisco IOS XE platforms, and NX to some extent. He has also
worked as a Senior Engineer with the Routing P...
In this session you can learn more about Layer 3 multicast and the best
practices to identify possible threats and take security measures. It
provides an overview of basic multicast, the best security practices for
use of this technology, and recommendati...