Got it

BGP Fundamentals 08 Introduction to BGP Path Attributes part 3

Latest reply: May 27, 2021 17:56:20 906 5 3 0 1

Authorized reprint by author zhushigeng (Vinsoney)


4) AS_PATH type 1: AS_SET

 

100755o7x67t4ega76xttt.png

 

R3 summarizes the specific routes sent from R1 and R2 (by adding the keyword as_set to the aggregate command). In this way, the BGP summary route generated on R3 inherits the AS_PATH attributes of the specific routes. Check the packets obtained on R4. The AS_PATH value in the summary route is 300 {100,200}, and the AS_PATH attribute of the summary route contains two segments. The AS_PATH whose segment is 300 is of the AS_SEQ type, and the AS_PATH whose segment is {100200} is of the AS_SET type. Therefore, the AS_PATH attribute whose type is AS_SEQ identifies the origin of the summary route and is an ordered AS list. The AS_PATH attribute whose type is AS_SET identifies the AS numbers of the specific routes before summarization. The AS_SET type is a random list but can be used to prevent loops.

100755ifn6ztwuo3ulfimt.png

 

5) Using the route-policy command to modify AS_PATH

[Example 1]

http://image.hw3static.com/hi/showimage-15226975-432623-a39f56a04e081bb4a03ecbbab5000b59.jpg

As shown in the preceding figure, R1 updates the BGP route 10.0.1.0/24 to R2. When no policy is deployed, R2 receives the route with the AS-PATH value being 100. If you want to modify the AS-PATH value of the route, for example, insert an AS number 999, you can run the apply as-path 999 additive command in the Route-Policy view. Note that the routing policy is configured on R1 for routes to be advertised to R2. Before R1 updates the 10.0.1.0/24 route, AS-PATH is empty. Then, the AS number 999 is inserted to AS_PATH before the route is advertised to the EBGP peer R2. When the route is sent to R2, the AS number 100 of R1 is added to the front of the AS_PATH value. Therefore, the final AS_PATH value of the route is 100 999.

Note that the AS_PATH attribute is very important for BGP, because BGP functions such as loop prevention rely heavily on this attribute. The route-policy command can be used to modify the AS_PATH value when required, but any policy for AS_PATH must be executed with caution. In the preceding example, it is meaningless to add the AS number 999 to the AS_PATH attribute because this AS number does not exist. To increase the length of AS-PATH, you can add the AS number 100 instead of 999.

Example 2

http://image.hw3static.com/hi/showimage-15226981-432623-c89b962357690f10aa90a4c11f46b534.jpg

In the example shown in the preceding figure, the routing policy is configured on R2 for incoming routes, and the apply as-path 999 additive command is run to insert the AS number 999 to the AS_PATH attribute.

The result is different from that in example 1.

As the policy is deployed on R2, the AS-PATH value of the route updated by R1 to R2 is 100. After R2 receives the route, R2 adds the AS number 999 to the front of the AS-PATH value because the routing policy is configured for incoming routes. As a result, the AS-PATH value of route 10.0.1.0/24 in the BGP table of R2 is 999 100.

 

[Example 3]

http://image.hw3static.com/hi/showimage-15226985-432623-f4d7078160d84e05b560756c2b397bf9.jpg

What if you do not want to insert the AS number into the AS-PATH, but want to overwrite the AS-PATH? To achieve this purpose, you can run the apply as-path overwrite command in the Route-Policy view. In the example shown in the preceding figure, a routing policy is configured on R2 for routes to be imported from R1. When R1 updates the route 10.0.1.0/24 to R2, the AS-PATH attribute value of the route is 100. After the policy is deployed on R2, the AS-PATH value of the route is replaced with 999. As a result, in the BGP table of R2, the AS-PATH value of route 10.0.1.0/24 is 999.

 


The post is synchronized to: BGP - From junior to expert

Thank you
View more
  • x
  • convention:

Great sharing
View more
  • x
  • convention:

Well post
View more
  • x
  • convention:

Nice info.
View more
  • x
  • convention:

andersoncf1
MVE Author Created May 27, 2021 17:56:20

Thanks for sharing. This is important
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.