Controlling BGP Route
There are many ways in controlling BGP Routes. In this post, I will discuss by using 4 method, which are:
1. Weight (cisco proprietary)
2. Local Preference
3. Metric
4. AS-Path Prepend
1. Weight
Topology:
Weight is Cisco Proprietary. It’s used to control outbound traffic. Weight is not propagated to the other BGP router, which mean that this configuration only affect local router. Path with higher weight wins.
2. Local Preference
Topology:
Local Preference is used to control outbound traffic. Local preference is propagated to the other BGP router in the same AS, which mean that local preference affect within the same AS. Default local preference is 100, and the path with higher local preference wins.
3. Metric
Topology:
Metric is used to control inbound traffic. This information will be exchanged inter-AS, but only for the peer BGP router. which mean in the topology in the left image, Router A will advertise the AS 100 Prefix to the other BGP peer with metric 0. Path with higher metric wins.
4. Prepend Path
Topology:

AS-Path Prepend is used to control inbound traffic. It will be exchanged inter-AS. Use the local AS to prepend, unless there will be loop detection.

