BGP Aggregate AS-SET

Hello Narad

According to RFC4271, the AS_PATH is an attribute that is composed of a sequence of AS path segments. Found within the update packet, there are the following fields:

  • path segment type - This can be a value of 1 which indicates AS_SET or 2 which indicates AS_SEQUENCE
  • path segment length - contains the number of ASes in the path segment value field
  • path segment value - one or more AS numbers, each encoded as a 2 octet length field.

So, sometimes the AS_SET is used, sometimes the AS_SEQUENCE is used. What’s the difference and when is each one used? Well, again according to the RFC:

  • AS_SET: unordered set of ASes a route in the UPDATE message has traversed
  • AS_SEQUENCE: ordered set of ASes a route in the UPDATE message has traversed

When is each type used? Well, under “normal” circumstances, AS_SEQUENCE is used, because it is useful and often necessary to know the order in which the ASes have been traversed. However, in the event you are using the aggregate-address command as is the case here in this lesson, then the ASes cannot and should not be displayed in order. They require an “unordered” format. This is further described in the 5.1.2 AS_PATH section of the RFC.

In this case, it will behave in the same manner as seen in the lesson. For example, if R2 sends an AS_PATH of 2 2 2, then the resulting BGP table of R4 would be:

R4#show ip bgp 
BGP table version is 11, local router ID is 192.168.14.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
              t secondary path, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>   172.16.0.0       192.168.14.1             0             0 1 {2 2 2,3} i

I hope this has been helpful!

Laz