BGP Attributes: AS_PATH and MED:
.
AS_PATH Attribute:
It is a BGP attribute
Shortest length of AS_PATH is preferred when weight and local preference is same
It can be used to influence both inbound and outbound traffic
With AS_PATH prepending, we can make the AS_PATH longer for a path that is less preferred. Ideally, the local AS is prepended
Example:
In below example, we own AS-1 and both our routers ‘a’ and ‘b’ are advertising net-X to downstream neighbor...But, we want the downstream neighbor to choose ‘b’ .
Since I can’t change Weight in router ‘c’ which is not owned by me and I cant use local-pref since it is in a different AS