Route Aggregation in BGP ||
- sukeshtandon
- Sep 13, 2018
- 3 min read
Updated: Sep 17, 2018
Methods for advertising aggregated prefixes with problems.
The AS_SET attribute.
Methods for advertising aggregated prefixes with problems
Why Aggregate?
-- A bgp update message has to carry all the routes , but if we aggregate them it reduces the size of BGP updates.This contributes to network resource conservation
-- This also reduces the size of the BGP tables
-- Contributes to overall internet scalability
--"HIDES" individual prefix instabilities
How to inject Aggregate Routes
Method 1 :: Static Route
-- Configure static route for aggregate address
-- Always use null interface for next hop.
-- inject aggregate into BGP with network statement.
When a packet that has been forwarded to the aggregate address arrives at the router, its destination address should match with one of the more specific routes and be forwarded to the correct destination.
If a more specific route does not exist, for example if the prefix has flapped, it will be forwarded to the null interface and dropped.
Method 2:: aggregate-address statement
-- A member of the aggregate must be in the BGP table.
--Provides more configuration options than the static route method. (For more information see IOS guide)
LAB

R1
ip route 172.16.0.0 255.255.0.0 null 0
router bgp 65520
network 172.16.0.0
R4
router bgp 64950
aggregate-address 192.168.0.0 255.255.0.0
Lets go back to R1
R1#sh ip bgp
BGP table version is 5, local router ID is 10.1.1.1
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,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.5.0.0/16 10.1.1.2 0 65501 64950 ?
*> 172.16.0.0 0.0.0.0 0 32768 i
*> 192.168.0.0/16 10.1.1.2 0 65501 64950 i
*> 192.168.1.0 10.1.1.2 0 65501 64950 ?
The problem is that we still have route for 192.168.1.0 also. Even though we did aggregate it on R4.
router bgp 64950
aggregate-address 192.168.0.0 255.255.0.0 summary-only
So to Supress more SPECIFIC ROUTES
Now again on R1
R1#sh ip bgp
BGP table version is 6, local router ID is 10.1.1.1
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,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.5.0.0/16 10.1.1.2 0 65501 64950 ?
*> 172.16.0.0 0.0.0.0 0 32768 i
*> 192.168.0.0/16 10.1.1.2 0 65501 64950
Aggregare Attributes
ATOMIC_AGGREGATE
--Indicates that the prefix is an aggregate and not to an actual destination
-- Formed when an aggregate includes at least one AS number of the aggregated prefixes
-- No practical use in modern networks.
AGGREGATOR
-- AS number and Router ID of the router originating the aggregate
-- Can be useful for troubleshooting aggregate routes
Notice the output of the two subnets that were configured.


The subnet which was aggregated on R1 doesn't contain the atomic-aggregate and aggragate attribute. Both are sub-part of path attributes
Subnet which was aggregated using aggregate-address summary only has atomic-aggregate and aggragate attribute in it.
atomic-aggregate - keyword is present
aggregate attribute - aggregated by 64590 is present (the entire line)
THE AS_SET Attribute
Potential Problems with Aggregation
Aggregation reduces route information (precise)
-- Best path to destination might not be chosen from multiple aggregate routes.
Potential misconfiguration
--Could result in misrouted packets
--Ensure that the configured aggregate correctly represents the aggregated prefixes
Potential for inter-AS loops
-- AS_PATH SET prevents this
THE AS_PATH SET Attribute
AS_PATH is normally an ordered sequence of AS numbers
--AS_PATH SEQUENCE
AS_SET is an unordered sequence of AS numbers
-- includes all AS numbers of all prefixes belonging to aggregate
--Same loop prevention rules as AS_PATH SEQUENCE
*Drop received routes that include local AS number
--Prevents looping to constituent AS behind aggregation point
LAB

Assuming neighborship is established between R5 and R2.
and R5 will advertise using aggregate command.
We will then aggregate the addresses from 65515 and 65520 to 172.16.0.0/12
R5#aggregate-address 172.17.0.0 255.255.0.0 summary-only
Now we will aggregate both the subnets
-------------------------------------------

R3(config-router)#router bgp 65501
R3(config-router)#aggregate-address 172.16.0.0 255.240.0.0 summary-only
We are not using AS_SET as we want to see the differences..


But lets see what is at R3 at this point

Lets now configure it with AS_SET command and compare the differnce.
R3(config-router)#router bgp 65501
aggregate-address 172.16.0.0 255.240.0.0 summary-only as-set
Now lets check the ouput at R4

Problems in AS_PATH SET
AS_SET is rarely used in practice
-- and when it is used , frequently used incorrectly
Loss of origin data can cause operational problems
--new security practices cannot authenticate route origin
--Loss of path information causes traffic engineering problems
Current recommendation is not to use AS_SET
--RFC 6472
Comentarios