06-05-2024 04:48 AM
There's a scenario where a /16 public IP pool has been advertised (via BGP) on the Internet in multiple /21 chunks. The /16 prefix is defined on router R1 (as a single prefix) from which IP addresses are being assigned to end users via DHCP.
R1 has an uplink to router R2 which has multiple /21 (chunks of the /16 prefix configured on R1) static routes pointing to R1.
R2 has an uplink to router R3 which is the Internet Gateway. R2 advertises /21 routes to R3 via BGP which in turn advertises those /21 routes on the Internet.
R1(/16 prefix) <-----> R2(Multiple /21 static routes pointing to R1) <-----> R3(Receiving /21 chunks of /16 prefix defined on R1 from R2 via BGP and then advertising those /21 prefixes on the Internet.
I'm wondering:
Why /21?
Why not advertise the whole /16 prefix as one prefix?
Or why not use any other prefix length like /22, /23 or /24?
Is it a recommended practice to advertise /21 chunks on the Internet?
Please guide.
Solved! Go to Solution.
06-05-2024 05:36 AM
Hello @hbf
It is better to have an aggregation network prefix (dynamic way). When viable component routes that match the aggregate network prefix enter the BGP table, then the aggregate prefix is created. The originating router sets the next hop to Null0 as a discard route for the aggregated prefix for loop prevention.
The downfall of "ip route x.x.x.x/16 null0" (static way) is that the summary route is always advertised, even if the networks are not available.
06-05-2024 04:55 AM - edited 06-05-2024 05:00 AM
You are correct
You need
Ip route x.x.x.x/16 null0
Then advertise this /16 via bgp
Because bgp not advertise any prefix not found in rib
MHM
06-05-2024 05:36 AM
Hello @hbf
It is better to have an aggregation network prefix (dynamic way). When viable component routes that match the aggregate network prefix enter the BGP table, then the aggregate prefix is created. The originating router sets the next hop to Null0 as a discard route for the aggregated prefix for loop prevention.
The downfall of "ip route x.x.x.x/16 null0" (static way) is that the summary route is always advertised, even if the networks are not available.
06-05-2024 08:26 AM
Hello @hbf ,
>>
Why not advertise the whole /16 prefix as one prefix?
Or why not use any other prefix length like /22, /23 or /24?
>> Is it a recommended practice to advertise /21 chunks on the Internet?
The choice of /21 has been a design / configuration choice just to reflect the DHCP scopes on R2.
Usually it is not possible to advertise prefixes longer then /24.
As explained by M02@rt37 and @MHM Cisco World you can on R2 advertise the whole /16 prefix instead.
this is a good choice if R2 -R3 is the only exit point to the internet. If there are other exit points the choice to advertise /21 prefixes could have a reason in an attempt to load share over multiple links / eBGP peers.
Hope to help
Giuseppe
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide