The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This document describes what Accumulated Interior Gateway Protocol (AIGP) metric in Border Gateway Protocol (BGP) is and its use cases.
Cisco recommends that you have knowledge of these topics:
This document is not restricted to specific software and hardware versions.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If our network is live, make sure that you understand the potential impact of any command.
This section provides an overview of the AIGP metric and some important considerations regarding its use.
As you know, IGP stands for Interior Gateway Protocol and represents a group of routing protocols that run within a single administrative domain. IGP make a path-selection decision based on metric value.
BGP is designed to provide routing over a large number of independent Autonomous Systems (AS) with limited or no coordination among respective administrations. It does not make its path-selection decisions through the use of a metric. However, there are deployments in which a single administration runs several contiguous BGP networks. In such cases, it can be desirable within that single administrative domain, for BGP to select paths based on a metric, just as an IGP would do.
The AIGP metric (defined via RFC7311) is an Optional Non-transitive BGP Path Attribute. The value field of the AIGP Attribute is defined as a set of Type/Length/Value elements (TLVs). The BGP AIGP TLV contains the Accumulated IGP Metric.
Note: BGP routers that do not support the optional non-transitive attributes (for example, AIGP) must delete such attributes and must not pass them to other BGP peers. AIGP metric is not intended to be transitive between completely distinct autonomous systems (only across internal AS boundaries).
Today, there are many networks which are in a single administrative domain, which are subdivided into multiple ASNs for various reasons. There could be many possible reasons for that:
In networks like these, it can be useful to allow BGP to make its decisions based on the IGP metric, so that BGP chooses the shortest end-to-end path between two nodes, even if the nodes are in two different ASNs.
For example: ABC network, which is subdivided into two BGP ASNs, ASN 1 and ASN 2. They are peering at ASBR and the link IGP costs are representing bandwidth. The goal here is to have an end-to-end optimal path between PE11 and PE21.
Note:
PE11#sh bgp ipv4 unicast 10.0.21.21/32
BGP routing table entry for 10.0.21.21/32, version 20
Paths: (2 available, best #2, table default)
Not advertised to any peer
Refresh Epoch 3
2
192.168.0.12 (metric 211) from 192.168.11.11 (192.168.11.11)
Origin IGP, metric 0, localpref 100, valid, internal
Originator: 192.168.0.12, Cluster list: 192.168.11.11
rx pathid: 0x1, tx pathid: 0
Refresh Epoch 3
2
192.168.0.11 (metric 201) from 192.168.11.11 (192.168.11.11)
Origin IGP, metric 0, localpref 100, valid, internal, best
Originator: 192.168.0.11, Cluster list: 192.168.11.11
rx pathid: 0x0, tx pathid: 0x0
With AiGP enabled in the topology (on PE11, PE32, ASBR1x, ASBR2x, RR1, RR2), PE11 now chooses the path with the lowest end-to-end IGP cost.
PEx, ASBRx, RRn:
AIGP capability configuration:
router bgp ASN
neighbor <NBR_IP> aigp
!
Note: BGP peering drops and re-establishes to negotiate this new capability. So, it is advised to perform it in a maintenance window.
Advertise AIGP metric for a prefix.
PE21:
route-map SET_AIGP permit 10
set aigp-metric igp-metric
!
router bgp 2
address-family {ipv4|ipv6} unicast
network 10.0.21.21 mask 255.255.255.255 route-map SET_AIGP
!
PE11#sh bgp ipv4 unicast 10.0.21.21/32
BGP routing table entry for 10.0.21.21/32, version 21
Paths: (2 available, best #2, table default)
Not advertised to any peer
Refresh Epoch 3
2
192.168.0.11 (metric 201) from 192.168.11.11 (192.168.11.11)
Origin IGP, aigp-metric 501, metric 0, localpref 100, valid, internal
Originator: 192.168.0.11, Cluster list: 192.168.11.11
rx pathid: 0x1, tx pathid: 0
Refresh Epoch 3
2
192.168.0.12 (metric 211) from 192.168.11.11 (192.168.11.11)
Origin IGP, aigp-metric 201, metric 0, localpref 100, valid, internal, best
Originator: 192.168.0.12, Cluster list: 192.168.11.11
rx pathid: 0x0, tx pathid: 0x0
In a large Service Provider Core network, the Transport Network is usually sub-divided into different IGP domains, stitched together using BGP Labeled Unicast to provide end-to-end Labeled Switched Path (LSP). Border routers perform Next Hop Self (NHS) in BGP LU AF.
IGP/LDP carries the prefix/label information only in the local area/domain. Then, BGP carries the prefix/label to all the remote areas/domains by redistributing the routes into BGP at area boundaries. The routes/labels are then advertised using LSPs. The next hop for the route is changed at each ABR to local router which removes the need to leak IGP routes across area/domain boundaries.
In this topology diagram, there is a single BGP domain divided into 2 IGP domains (CORE and Access-1). The number shown beside each link represents the IGP cost/metric of that link.
Challenge: Downwards traffic from PS-Core to eNB/gNB (connected to CSR15) is taking an Asymmetric and Sub-Optimal path as compared to upward traffic from eNB/gNB (connected to CSR15) towards PS-Core, which is causing Latency issues in Mobility traffic.
Upstream traffic - CSR15 to SAR150
RP/0/0/CPU0:CSR15#traceroute mpls ipv4 10.0.2.150/32 so 10.0.2.15
Tracing MPLS Label Switched Path to 10.0.2.150/32, timeout is 2 seconds
Codes: '!' - success, 'Q' - request not sent, '.' - timeout,
'L' - labeled output interface, 'B' - unlabeled output interface,
'D' - DS Map mismatch, 'F' - no FEC mapping, 'f' - FEC mismatch,
'M' - malformed request, 'm' - unsupported tlvs, 'N' - no rx label,
'P' - no rx intf label prot, 'p' - premature termination of LSP,
'R' - transit router, 'I' - unknown upstream index,
'X' - unknown return code, 'x' - return code 0
Type escape sequence to abort.
0 10.15.102.15 MRU 1500 [Labels: explicit-null/16150 Exp: 0/0]
L 1 10.15.102.102 MRU 1500 [Labels: 16150 Exp: 0] 0 ms !!!! AGG102
. 2 * !!!! P112 does not have a route to CSR15
! 3 10.112.150.150 20 ms !!!! SAR150
Downstream traffic - SAR150 to CSR15
RP/0/0/CPU0:SAR150#traceroute mpls ipv4 10.0.2.15/32 source 10.0.2.150
Tracing MPLS Label Switched Path to 10.0.2.15/32, timeout is 2 seconds
Codes: '!' - success, 'Q' - request not sent, '.' - timeout,
'L' - labeled output interface, 'B' - unlabeled output interface,
'D' - DS Map mismatch, 'F' - no FEC mapping, 'f' - FEC mismatch,
'M' - malformed request, 'm' - unsupported tlvs, 'N' - no rx label,
'P' - no rx intf label prot, 'p' - premature termination of LSP,
'R' - transit router, 'I' - unknown upstream index,
'X' - unknown return code, 'x' - return code 0
Type escape sequence to abort.
0 10.101.150.150 MRU 1500 [Labels: explicit-null/16015 Exp: 0/0]
L 1 10.101.150.101 MRU 1500 [Labels: 16015 Exp: 0] 10 ms !!! AGG101
L 2 10.11.101.11 MRU 1500 [Labels: 16015 Exp: 0] 10 ms !!! CSR11
L 3 10.11.12.12 MRU 1500 [Labels: 16015 Exp: 0] 10 ms !!! CSR12
L 4 10.12.13.13 MRU 1500 [Labels: 16015 Exp: 0] 20 ms !!! CSR13
L 5 10.13.14.14 MRU 1500 [Labels: explicit-null Exp: 0] 30 ms !!! CSR14
! 6 10.14.15.15 30 ms !!! CSR15
The goal here is to have an end-to-end optimal path between SAR routers and CSR routers. BGP Labeled Unicast (RFC 3107) is being used to compute the distance from SAR to CSR routers. The bandwidth available on each of the core links is mapped to IGP cost, hence BGP must carry this cost correctly between each of the PEs. This functionality is achieved by using the AiGP.
Seamless MPLS Network with AIGP
Note:
AiGP Path Attribute capability must be agreed upon between the BGP peers. AiGP metrics are only included in prefix advertisements between AiGP-enabled peers. AIGP capability is configured for an individual BGP peer and a specific BGP address family.
router bgp ASN
neighbor <NBR_IP>
address-family ipv4 unicast
aigp [disable]
AIGP metric is a 32-bit (0 to 4,294,967,295) value. It can be set during redistribution, route origination via network statement or during receipt of a prefix with a route map/route-policy.
route-policy AIGP_POLICY
set aigp-metric igp-cost
end-policy
!
router bgp ASN
address-family {ipv4|ipv6} unicast
network <NETWORK/MASK> route-policy AIGP_POLICY
or
redistribute {ospf|isis} {process-id} route-policy AIGP_POLICY metric VALUE
!
Note:
CSR15:
! Additional config lines related to AIGP are marked in RED color
route-policy SID($SID)
set label-index $SID
set aigp-metric igp-cost
end-policy
!
router bgp 1
address-family ipv4 unicast
network 10.0.2.15/32 route-policy SID(15)
neighbor-group RR
address-family ipv4 labeled-unicast
aigp
!
!
!
Note: A similar configuration on all the respective BGP peering devices has been done.
Downstream traffic - SAR150 to CSR15
RP/0/0/CPU0:SAR150#sh bgp ipv4 labeled-unicast 10.0.2.15/32
BGP routing table entry for 10.0.2.15/32
Versions:
Process bRIB/RIB SendTblVer
Speaker 411 411
Local Label: 16015
Last Modified: Oct 24 11:05:26.796 for 00:00:04
Paths: (2 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local
10.0.2.102 (metric 200) from 10.0.2.100 (10.0.2.15)
Received Label 16015
Origin IGP, metric 0, localpref 100, aigp metric 20, valid, internal, best, group-best, labeled-unicast
Received Path ID 1, Local Path ID 1, version 410
Originator: 10.0.2.15, Cluster list: 10.0.2.100, 10.0.2.102
Total AIGP metric 220
Label-Index: 15
Path #2: Received by speaker 0
Not advertised to any peer
Local
10.0.2.101 (metric 180) from 10.0.2.100 (10.0.2.15)
Received Label 16015
Origin IGP, metric 0, localpref 100, aigp metric 60, valid, internal, backup, add-path, labeled-unicast
Received Path ID 8, Local Path ID 7, version 411
Originator: 10.0.2.15, Cluster list: 10.0.2.100, 10.0.2.101
Total AIGP metric 240
Label-Index: 15
RP/0/0/CPU0:SAR150#traceroute mpls ipv4 10.0.2.15/32 so 10.0.2.150
Tracing MPLS Label Switched Path to 10.0.2.15/32, timeout is 2 seconds
Codes: '!' - success, 'Q' - request not sent, '.' - timeout,
'L' - labeled output interface, 'B' - unlabeled output interface,
'D' - DS Map mismatch, 'F' - no FEC mapping, 'f' - FEC mismatch,
'M' - malformed request, 'm' - unsupported tlvs, 'N' - no rx label,
'P' - no rx intf label prot, 'p' - premature termination of LSP,
'R' - transit router, 'I' - unknown upstream index,
'X' - unknown return code, 'x' - return code 0
Type escape sequence to abort.
0 10.112.150.150 MRU 1500 [Labels: 16102/16015 Exp: 0/0]
L 1 10.112.150.112 MRU 1500 [Labels: explicit-null/16015 Exp: 0/0] 10 ms !!! P112
L 2 10.102.112.102 MRU 1500 [Labels: explicit-null Exp: 0] 10 ms !!! AGG102
! 3 10.15.102.15 20 ms !!! CSR15
Upstream traffic - CSR15 to SAR150
RP/0/0/CPU0:CSR15#traceroute mpls ipv4 10.0.2.150/32 source 10.0.2.15
Tracing MPLS Label Switched Path to 10.0.2.150/32, timeout is 2 seconds
Codes: '!' - success, 'Q' - request not sent, '.' - timeout,
'L' - labeled output interface, 'B' - unlabeled output interface,
'D' - DS Map mismatch, 'F' - no FEC mapping, 'f' - FEC mismatch,
'M' - malformed request, 'm' - unsupported tlvs, 'N' - no rx label,
'P' - no rx intf label prot, 'p' - premature termination of LSP,
'R' - transit router, 'I' - unknown upstream index,
'X' - unknown return code, 'x' - return code 0
Type escape sequence to abort.
0 10.15.102.15 MRU 1500 [Labels: explicit-null/16150 Exp: 0/0]
L 1 10.15.102.102 MRU 1500 [Labels: 16150 Exp: 0] 10 ms !!! AGG102
. 2 * !!! P112 does not have a route to CSR15
! 3 10.112.150.150 30 ms !!! SAR150
A device that is running the Border Gateway Protocol (BGP) can also be configured to ignore the AIGP metric during the best path selection process between two paths when one path does not have the AIGP metric. Using the bgp bestpath aigp ignore
command in router configuration mode. To return the device to default operation, use the no form of this command.
[no] bgp bestpath aigp ignore
By default, BGP always prefers a path with the AIGP metric. When there are two paths, one with the AIGP metric and the other without, then executing the bgp bestpath aigp ignore
command results in BGP performing best path computation as if neither path has the AIGP metric.
BGP AIGP attribute is certainly developed to solve certain niche use cases but it must be used cautiously.
Revision | Publish Date | Comments |
---|---|---|
1.0 |
13-Dec-2023 |
Initial Release |