ASs for routing back the message. The number of the AS closest to the receiver’s AS is leftmost, as shown in the
following figure.
Figure 58: AS_PATH attribute
Usually a BGP router does not receive routes containing the local AS number to avoid routing loops.
NOTE:
The current implementation supports using the
neighbor allow-as-loop
command to
receive routes containing the local AS number.
The AS_PATH attribute can be used for route selection and filtering. BGP gives priority to the route with the
shortest AS_PATH length if other factors are the same. As shown in the above figure, the BGP router in AS50
gives priority to the route passing AS40 for sending data to the destination 8.0.0.0.
In some applications, you can apply a routing policy to control BGP route selection by modifying the AS_PATH
length.
By configuring an AS path filtering list, you can filter routes based on AS numbers contained in the AS_PATH
attribute.
NEXT_HOP
Different from IGP, the NEXT_HOP attribute may not be the IP address of a directly connected router. It involves
three types of values, as shown in the following figure.
Chapter 17 Border Gateway Protocol (BGP)
373