The Accumulated Interior Gateway Protocol Metric (AIGP) attribute is an optional non-transitive Border Gateway Protocol (BGP) path attribute. The attribute type code assigned by the Internet Assigned Numbers Authority (IANA) for the AIGP attribute is 26.
Routing protocols, such as IGPs that have been designed to run within a single administrative domain, generally assign a metric to each link, and then choose the path with the smallest metric as the optimal path between two nodes. BGP, designed to provide routing over a large number of independent administrative domains, does not select paths based on metrics. If a single administrative domain runs several contiguous BGP networks, it is desirable for BGP to select paths based on metrics, just as an IGP does. The AIGP attribute enables BGP to select paths based on metrics.
An AIGP administrative domain is a set of autonomous systems (ASs) in a common administrative domain. The AIGP attribute takes effect only in an AIGP administrative domain. Figure 1
shows the networking diagram of AIGP application.
Figure 1 AIGP application networking
AIGP Attribute Origination
The AIGP attribute can be added to a route only through a route-policy. You can configure a BGP route to add an AIGP value when routes are imported, received, or sent. If no AIGP value is configured, BGP routes do not contain AIGP attributes.
AIGP Attribute Delivery
BGP does not allow the AIGP attribute to leak out of an AIGP administrative domain boundary onto the Internet. If the AIGP attribute of a route changes, BGP sends Update packets for BGP peers to update information about this route. In a scenario in which A, a BGP speaker, sends a route that carries the AIGP attribute to B, its BGP peer:
- If B does not support the AIGP attribute or does not have the AIGP capability enabled for a peer, B ignores the AIGP attribute and does not transmit the AIGP attribute to other BGP peers.
- If B supports the AIGP attribute and has the AIGP capability enabled for a peer, B can modify the AIGP attribute of the route only after B has set itself to be the next hop of the route. To modify the AIGP attribute of the route, B complies with the following rules:
- If the BGP peer relationship between A and B is established over an IGP route, or a static route that does not require recursive next hop resolution, B uses the IGP or static route metric value plus the received AIGP attribute value as the new AIGP attribute value of the received route and sends the new AIGP attribute along with the route to other BGP peers.
- If the BGP peer relationship between A and B is established over a BGP route, or a static route that requires recursive next hop resolution, route recursion occurs when B sends data to A. Each route recursion requires a pre-existing route. B uses the sum of metric values for recursive routes along the path from B to A plus the received AIGP attribute value as the new AIGP attribute value of the received route and sends the new AIGP attribute along with the route to other BGP peers.
Role of the AIGP Attribute in BGP Route Selection
If multiple active routes exist between two nodes, BGP will make a route selection decision. If BGP cannot determine the optimal route based on PrefVal, Local_Pref, and Route-type, BGP compares the AIGP attributes of these routes. BGP route selection rules are as follows:
- If BGP cannot determine the optimal route based on Route-type, BGP compares the AIGP attributes. If this method still cannot determine the optimal route, BGP proceeds to compare the AS_Path attributes.
- The priority of a route that carries the AIGP attribute is higher than the priority of a route that does not carry the AIGP attribute.
- If all routes carry the AIGP attribute, the route with the smallest AIGP attribute value plus the IGP metric value of the recursive next hop is preferred over the other routes.
The AIGP attribute is used to select the optimal route in an AIGP administrative domain.
The AIGP attribute can be transmitted between BGP unicast peers as well as between BGP VPNv4/VPNv6 peers. Transmitting the AIGP attribute between BGP VPNv4/VPNv6 peers allows L3VPN traffic to be transmitted along the path with the smallest AIGP attribute value.
On the inter-AS VPN Option B network shown in Figure 2, BGP VPNv4 peer relationships are established between PE1 and ASBRs 1 and 2; BGP VPNv4 peer relationships are also established between PE2 and ASBRs 3 and 4. Two paths with different IGP costs exist between PE1 and PE2. If you want the PEs to select a path with a lower IGP cost to carry traffic, you can enable the AIGP capability in the BGP VPNv4 address family view and configure a route policy to add the same AIGP initial value to BGP VPNv4 routes. Take PE1 as an example. After this configuration, PE1 receives two BGP VPNv4 routes destined for CE2 from ASBR1 and ASBR2, and the BGP VPNv4 route sent by ASBR1 has a lower AIGP value. If higher-priority route selection conditions of the routes are the same, PE1 preferentially selects the BGP VPNv4 route with a lower AIGP value so that traffic can be transmitted over the PE1 -> ASBR1 -> ASBR3 -> PE2 path.
Figure 2 Applying AIGP in inter-AS VPN Option B scenarios
After the AIGP attribute is configured in an AIGP administrative domain, BGP selects paths based on metrics, just as an IGP. Consequently, all devices in the AIGP administrative domain use the optimal routes to forward data.