OcNOS-SP : Layer 3 Guide : Layer 3 Unicast Configuration Guide : BGP : Accumulated Interior Gateway Protocol
Accumulated Interior Gateway Protocol
Overview
This section includes step-by-step configuration of AIGP Metric Attribute for BGP It also contains an overview of the concepts of AIGP. AIGP is a non-transitive attribute that includes the accumulated IGP metric. BGP routers advertise this AIGP metric to neighbors in other ASes. This allows BGP routers to select the best path based on the end-to-end IGP metric.
Topology
The diagram depicts the topology for the configuration examples that follow.
Figure 1-41: Accumulated Interior Gateway Protocol
Base Configurations
R1
Loopback Interface:
 
#configure terminal
Enter configuration mode.
(config)#interface lo
Enter the Interface mode for the loopback interface.
(config-if)#ip address 1.1.1.1/32 secondary
Configure IP address on loopback interface.
(config-if)#commit
Commit the transaction
Interface Configuration:
 
(config)#interface xe15
Enter the Interface mode for xe15.
(config-if)# ip address 10.10.10.1/24
Configure IP address on the interface.
(config-if)#exit
Exit interface mode
(config)#interface xe13
Enter the Interface mode for xe13.
(config-if)# ip address 11.11.11.1/24
Configure IP address on the interface.
(config)#interface xe12
Enter the Interface mode for xe12.
(config-if)# ip address 50.50.50.2/24
Configure IP address on the interface.
(config-if)#commit
Commit the transaction.
 
OSPF Configuration:
 
(config)#router ospf 100
Enter the Router OSPF mode.
(config-router)#ospf router-id 1.1.1.1
Router-id configurations
(config-router)# network 1.1.1.1/32 area 0
Advertise loopback address in OSPF.
(config-router)#network 10.10.10.0/24 area 0
Advertise network address in OSPF.
(config-router)#network 11.11.11.0/24 area 0
Advertise network address in OSPF.
(config-router)#commit
Commit the transaction
 
R2
Loopback Interface:
 
#configure terminal
Enter configuration mode.
(config)#interface lo
Enter the Interface mode for the loopback interface.
(config-if)#ip address 2.2.2.2/32 secondary
Configure IP address on loopback interface.
(config-if)#commit
Commit the transaction
 
Interface Configuration:
 
(config)#interface ce4/4
Enter the Interface mode for ce4/4.
(config-if)# ip address 10.10.10.2/24
Configure IP address on the interface.
(config-if)#interface ce4/1
Enter the Interface mode for ce4/1.
(config-if)# ip address 12.12.12.1/24
Configure IP address on the interface.
(config-if)#interface ce3/2
Enter the Interface mode for ce3/2.
(config-if)# ip address 13.13.13.1/24
Configure IP address on the interface.
(config-if)#commit
Commit the transaction.
 
OSPF Configuration:
 
(config)#router ospf 100
Enter the Router OSPF mode.
(config-router)#ospf router-id 2.2.2.2
Router-id configurations
(config-router)# network 2.2.2.2/32 area 0
Advertise loopback address in OSPF.
(config-router)#network 10.10.10.0/24 area 0
Advertise network address in OSPF.
(config-router)#network 12.12.12.0/24 area 0
Advertise network address in OSPF.
(config-router)#network 13.13.13.0/24 area 0
Advertise network address in OSPF.
(config-router)#commit
Commit the transaction
 
R3
Loopback Interface:
 
#configure terminal
Enter configuration mode.
(config)#interface lo
Enter the Interface mode for the loopback interface.
(config-if)#ip address 3.3.3.3/32 secondary
Configure IP address on loopback interface.
(config-if)#commit
Commit the transaction
 
Interface Configuration:
 
(config)#interface xe4
Enter the Interface mode for xe4.
(config-if)# ip address 11.11.11.2/24
Configure IP address on the interface.
(config)#interface xe2
Enter the Interface mode for xe2.
(config-if)# ip address 12.12.12.2/24
Configure IP address on the interface.
(config-if)#commit
Commit the transaction.
 
OSPF Configuration:
 
(config)#router ospf 100
Enter the Router OSPF mode.
(config-router)#ospf router-I 3.3.3.3
Router-id configurations
(config-router)# network 3.3.3.3/32 area 0
Advertise loopback address in OSPF.
(config-router)#network 11.11.11.0/24 area 0
Advertise network address in OSPF.
(config-router)#network 12.12.12.0/24 area 0
Advertise network address in OSPF.
(config-router)#commit
Commit the transaction
 
R4
Loopback Interface:
 
#configure terminal
Enter configuration mode.
(config)#interface lo
Enter the Interface mode for the loopback interface.
(config-if)#ip address 4.4.4.4/32 secondary
Configure IP address on loopback interface.
(config-if)#commit
Commit the transaction
 
Interface Configuration:
 
(config)#interface xe12
Enter the Interface mode for xe21.
(config-if)# ip address 13.13.13.2/24
Configure IP address on the interface.
(config-if)#commit
Commit the transaction.
 
OSPF Configuration:
 
(config)#router ospf 100
Enter the Router OSPF mode.
(config-router)#ospf router-id 4.4.4.4
Router-id configurations
(config-router)# network 4.4.4.4/32 area 0
Advertise loopback address in OSPF.
(config-router)#network 13.13.13.0/24 area 0
Advertise network address in OSPF.
(config-router)#commit
Commit the transaction
BGP Configurations
R1
Route Map Configuration:
(config)# route-map map1 permit 10
Configure route-map map1 with sequence number 10.
(config-route-map)#set aigp-metric 100
Set aigp metric as 100.
(config-route-map)#commit
Commit the transaction
BGP Configuration:
 
(config)# router bgp 100
Enter the BGP configuration mode.
(config-router)# neighbor 3.3.3.3 remote-as 100
Configure neighbor
(config-router)# neighbor 3.3.3.3 update-source 1.1.1.1
Update loopback address as source
(config-router)# address-family ipv4 unicast
Enter address family mode.
(config-router)#network 50.50.50.0/24 route-map map1
Apply a route map to routes.
(config-router-af)#neighbor 3.3.3.3 activate
Activate the neighbor.
(config-router-af)#exit
Exit address family mode.
(config-router)#exit
Exit Router BGP mode
R2
BGP Configuration:
 
(config)# router bgp 200
Enter the BGP configuration mode.
(config-router)#neighbor 3.3.3.3 remote-as 100
Configure neighbor
(config-router)#neighbor 4.4.4.4 remote-as 200
Configure neighbor
(config-router)# neighbor 3.3.3.3 update-source 2.2.2.2
Update loopback address as source
(config-router)# neighbor 4.4.4.4 update-source 2.2.2.2
Update loopback address as source
(config-router)# neighbor 3.3.3.3 ebgp-multihop 2
Enable multihop on eBGP session.
(config-router)#address-family ipv4
Enter address family mode.
(config-router-af)#neighbor 3.3.3.3 activate
Activate the neighbor.
(config-router-af)#neighbor 4.4.4.4 activate
Activate the neighbor.
(config-router-af)#neighbor 3.3.3.3 aigp enable
Enable aigp for the neighbor.
(config-router-af)#neighbor 4.4.4.4 aigp enable
Enable aigp for the neighbor.
(config-router-af)#neighbor 4.4.4.4 next-hop-self
Configure next-hop-self for the R4 neighbor.
(config-router-af)#commit
Commit the transaction.
R3
BGP Configuration:
 
(config)# router bgp 100
Enter the BGP configuration mode.
(config-router)#neighbor 1.1.1.1 remote-as 100
Configure neighbor
(config-router)#neighbor 2.2.2.2 remote-as 200
Configure neighbor
(config-router)#neighbor 4.4.4.4 remote-as 200
Configure neighbor
(config-router)#neighbor 1.1.1.1 update-source 3.3.3.3
Update loopback address as source
(config-router)#neighbor 2.2.2.2 update-source 3.3.3.3
Update loopback address as source
(config-router)#neighbor 4.4.4.4 update-source 3.3.3.3
Update loopback address as source
(config-router)# neighbor 2.2.2.2 ebgp-multihop 2
Enable multihop on eBGP session.
(config-router)# neighbor 4.4.4.4 ebgp-multihop 2
Enable multihop on eBGP session.
(config-router)#address-family ipv4
Enter address family mode.
(config-router-af)#neighbor 1.1.1.1 activate
Activate the neighbor.
(config-router-af)#neighbor 2.2.2.2 activate
Activate the neighbor.
(config-router-af)#neighbor 4.4.4.4 activate
Activate the neighbor.
(config-router-af)#neighbor 2.2.2.2 aigp enable
Enable aigp for the neighbor.
(config-router-af)#neighbor 4.4.4.4 aigp enable
Enable aigp for the neighbor.
(config-router-af)#commit
Exit address family mode.
R4
BGP Configuration:
 
(config)# router bgp 200
Enter the BGP configuration mode.
(config-router)#neighbor 3.3.3.3 remote-as 100
Configure neighbor
(config-router)#neighbor 2.2.2.2 remote-as 200
Configure neighbor
(config-router)# neighbor 3.3.3.3 update-source 4.4.4.4
Update loopback address as source
(config-router)# neighbor 2.2.2.2 update-source 4.4.4.4
Update loopback address as source
(config-router)# neighbor 3.3.3.3 ebgp-multihop 2
Enable multihop on eBGP session.
(config-router)#address-family ipv4
Enter address family mode.
(config-router-af)#neighbor 3.3.3.3 activate
Activate the neighbor.
(config-router-af)#neighbor 2.2.2.2 activate
Activate the neighbor.
(config-router-af)#neighbor 3.3.3.3 aigp enable
Enable aigp for the neighbor.
(config-router-af)#neighbor 2.2.2.2 aigp enable
Enable aigp for the neighbor.
(config-router-af)#neighbor 2.2.2.2 next-hop-self
Configure next-hop-self for the R4 neighbor.
(config-router-af)#commit
Commit the transaction.
Validation
R3
R3#sh ip ospf neighbor
 
Total number of full neighbors: 2
OSPF process 100 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
1.1.1.1 1 Full/DR 00:00:37 11.11.11.1 xe4 0
2.2.2.2 1 Full/Backup 00:00:37 12.12.12.1 xe2 0
R3#sh ip bgp summary
BGP router identifier 3.3.3.3, local AS number 100
BGP table version is 23
1 BGP AS-PATH entries
0 BGP community entries
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
1.1.1.1 4 100 162 172 23 0 0 00:23:34 1
2.2.2.2 4 200 60 68 23 0 0 00:08:50 0
4.4.4.4 4 200 145 164 23 0 0 00:03:19 0
 
Total number of neighbors 3
 
Total number of Established sessions 3
R3#sh ip bgp
BGP table version is 23, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, a add-path, * valid, > best, i - internal,
l - labeled, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
Network Next Hop Metric LocPrf Weight Path
*>i 50.50.50.0/24 1.1.1.1 0 100 0 i
 
Total number of prefixes 1
R3#sh ip bgp 50.50.50.0
BGP routing table entry for 50.50.50.0/24
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Advertised to non peer-group peers:
2.2.2.2 4.4.4.4
Local
Nexthop:1.1.1.1 (metric 2) from 1.1.1.1 (Remote Id:1.1.1.1)
Origin IGP, metric 0, localpref 100, aigp metric 100 valid, internal, best, source safi: 1
Not advertised to any peer
Total AIGP metric 102
Last update: Wed Jun 22 06:41:17 2022
R4
R4#sh ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 100 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
2.2.2.2 1 Full/Backup 00:00:37 13.13.13.1 xe21 0
R4#sh ip bgp summary
BGP router identifier 4.4.4.4, local AS number 200
BGP table version is 4
2 BGP AS-PATH entries
0 BGP community entries
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 200 82 85 4 0 0 00:04:28 1
3.3.3.3 4 100 100 96 4 0 0 00:04:28 1
 
Total number of neighbors 2
 
Total number of Established sessions 2
R4#sh ip bgp
BGP table version is 4, local router ID is 4.4.4.4
Status codes: s suppressed, d damped, h history, a add-path, * valid, > best, i - internal,
l - labeled, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
Network Next Hop Metric LocPrf Weight Path
*> 50.50.50.0/24 3.3.3.3 0 100 0 100 i
* i 2.2.2.2 0 100 0 100 i
 
Total number of prefixes 1
R4#sh ip bgp 50.50.50.0
BGP routing table entry for 50.50.50.0/24
Paths: (2 available, best #1, table Default-IP-Routing-Table)
Advertised to non peer-group peers:
2.2.2.2
AS path:100
Nexthop:3.3.3.3 (metric 3) from 3.3.3.3 (Remote Id:3.3.3.3)
Origin IGP, metric 0, localpref 100, aigp metric 102 valid, external, best, source safi: 1
Not advertised to any peer
Total AIGP metric 105
Last update: Wed Jun 22 06:57:49 2022
 
AS path:100
Nexthop:2.2.2.2 (metric 2) from 2.2.2.2 (Remote Id:2.2.2.2)
Origin IGP, metric 0, localpref 100, aigp metric 104 valid, internal, source safi: 1
Not advertised to any peer
Total AIGP metric 106
Last update: Wed Jun 22 06:57:53 2022
 
R4#
Extended Community Attribute
Follow the base configuration as mentioned above.
R1
Route Map Configuration:
 
(config)# route-map map1 permit 10
Configure route-map map1 with sequence number 10.
(config-route-map)#set aigp-metric 100
Set aigp metric as 100.
(config)# route-map map2 permit 20
Configure route-map map2 with sequence number 20.
(config-route-map)#set aigp-metric igp-metric
Set aigp metric as igp-metric.
(config-route-map)#commit
Commit the transaction
BGP Configuration:
 
(config)# router bgp 100
Enter the BGP configuration mode.
(config-router)# neighbor 3.3.3.3 remote-as 100
Configure neighbor
(config-router)# neighbor 2.2.2.2 remote-as 100
Configure neighbor
(config-router)# neighbor 3.3.3.3 update-source 1.1.1.1
Update loopback address as source
(config-router)# neighbor 2.2.2.2 update-source 1.1.1.1
Update loopback address as source
(config-router)# address-family ipv4 unicast
Enter address family mode.
(config-router)#network 50.50.50.0/24
Advertise the network.
(config-router-af)#neighbor 3.3.3.3 activate
Activate the neighbor.
(config-router-af)#neighbor 2.2.2.2 activate
Activate the neighbor.
(config-router-af)#neighbor 3.3.3.3 route-map map1 out
Attach the route-map map1 for the neighbor 3.3.3.3 in out direction
(config-router-af)#neighbor 2.2.2.2 route-map map2 out
Attach the route-map map2 for the neighbor 2.2.2.2 in out direction
(config-router-af)#neighbor 3.3.3.3 aigp disable
Disable the aigp neighbor.
(config-router-af)#neighbor 2.2.2.2 aigp disable
Disable the aigp neighbor.
config-router-af)#neighbor 2.2.2.2 aigp send cost-community 10 poi igp-cost
Enable extended community attribute for the neighbor.
config-router-af)#neighbor 3.3.3.3 aigp send cost-community 10 poi pre-bestpath
Enable extended community attribute for the neighbor.
(config-router-af)#commit
Commit the transaction.
R2
BGP Configuration:
 
(config)# router bgp 100
Enter the BGP configuration mode.
(config-router)# neighbor 3.3.3.3 remote-as 100
Configure neighbor
(config-router)# neighbor 1.1.1.1 remote-as 100
Configure neighbor
(config-router)# neighbor 4.4.4.4 remote-as 200
Configure neighbor
(config-router)# neighbor 3.3.3.3 update-source 2.2.2.2
Update loopback address as source
(config-router)# neighbor 1.1.1.1 update-source 2.2.2.2
Update loopback address as source
(config-router)# neighbor 4.4.4.4 update-source 2.2.2.2
Update loopback address as source
(config-router)# neighbor 4.4.4.4 ebgp-multihop 2
Enable multihop on eBGP session.
(config-router)# address-family ipv4 unicast
Enter address family mode.
(config-router-af)#neighbor 3.3.3.3 activate
Activate the neighbor.
(config-router-af)#neighbor 1.1.1.1 activate
Activate the neighbor.
(config-router-af)#neighbor 4.4.4.4 activate
Activate the neighbor.
(config-router-af)#commit
Exit address family mode.
 
R3
BGP Configuration:
 
(config)# router bgp 100
Enter the BGP configuration mode.
(config-router)#neighbor 1.1.1.1 remote-as 100
Configure neighbor
(config-router)#neighbor 2.2.2.2 remote-as 100
Configure neighbor
(config-router)#neighbor 4.4.4.4 remote-as 200
Configure neighbor
(config-router)#neighbor 1.1.1.1 update-source 3.3.3.3
Update loopback address as source
(config-router)#neighbor 2.2.2.2 update-source 3.3.3.3
Update loopback address as source
(config-router)#neighbor 4.4.4.4 update-source 3.3.3.3
Update loopback address as source
(config-router)# neighbor 4.4.4.4 ebgp-multihop 2
Enable multihop on eBGP session.
(config-router)#address-family ipv4
Enter address family mode.
(config-router-af)#neighbor 1.1.1.1 activate
Activate the neighbor.
(config-router-af)#neighbor 2.2.2.2 activate
Activate the neighbor.
(config-router-af)#neighbor 4.4.4.4 activate
Activate the neighbor.
(config-router-af)#commit
Exit address family mode.
R4
BGP Configuration:
 
(config)# router bgp 200
Enter the BGP configuration mode.
(config-router)#neighbor 3.3.3.3 remote-as 100
Configure neighbor
(config-router)#neighbor 2.2.2.2 remote-as 100
Configure neighbor
(config-router)# neighbor 3.3.3.3 update-source 4.4.4.4
Update loopback address as source
(config-router)# neighbor 2.2.2.2 update-source 4.4.4.4
Update loopback address as source
(config-router)# neighbor 3.3.3.3 ebgp-multihop 2
Enable multihop on eBGP session.
(config-router)# neighbor 2.2.2.2 ebgp-multihop 2
Enable multihop on eBGP session.
(config-router)#address-family ipv4
Enter address family mode.
(config-router-af)#neighbor 3.3.3.3 activate
Activate the neighbor.
(config-router-af)#neighbor 2.2.2.2 activate
Activate the neighbor.
(config-router-af)#commit
Commit the transaction.
 
Validation
R4#show ip bgp summary
BGP router identifier 4.4.4.4, local AS number 200
BGP table version is 4
1 BGP AS-PATH entries
0 BGP community entries
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 100 164 157 4 0 0 00:02:43 1
3.3.3.3 4 100 177 194 4 0 0 00:00:28 1
 
Total number of neighbors 2
 
Total number of Established sessions 2
R4#show ip bgp
BGP table version is 4, local router ID is 4.4.4.4
Status codes: s suppressed, d damped, h history, a add-path, * valid, > best, i - internal,
l - labeled, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
Network Next Hop Metric LocPrf Weight Path
*> 50.50.50.0/24 2.2.2.2 0 100 0 100 i
* 3.3.3.3 0 100 0 100 i
 
Total number of prefixes 1
 
R4#show ip bgp 50.50.50.0
BGP routing table entry for 50.50.50.0/24
Paths: (2 available, best #1, table Default-IP-Routing-Table)
Advertised to non peer-group peers:
3.3.3.3
AS path:100
Nexthop:2.2.2.2 (metric 2) from 2.2.2.2 (Remote Id:2.2.2.2)
Origin IGP, metric 0, localpref 100 valid, external, best, source safi: 1
Extended Community:
cost(transitive)igp_metric:10:0
Not advertised to any peer
Last update: Wed Jun 22 17:57:32 2022
 
AS path:100
Nexthop:3.3.3.3 (metric 3) from 3.3.3.3 (Remote Id:3.3.3.3)
Origin IGP, metric 0, localpref 100 valid, external, source safi: 1
Extended Community:
cost(transitive)pre-bestpath:10:200
Not advertised to any peer
Last update: Wed Jun 22 17:59:46 2022
Last modified date: 10/16/2023