We split a /24 into two /25 segments:
eth 1/1 - 22.214.171.124/25
eth 1/2 - 126.96.36.199/25
eth 1/3 - 188.8.131.52 - ISP link
So the whole /24 lives on the router, but split. When I advertise 184.108.40.206/24 to ISP, it doesn't show up as and advertised route. Is there a way to advertise the /24? Rollup them up into a /24?
That configuration is fine. When you say the route doesn't show up, do you mean in the global BGP table? Do you already have BGP established with active routes? If so, and you are trying to advertise a more specific route than your carrier has built in their prefix list, it will be rejected. You'll need to contact your carrier to have your BGP session modified. Example - if your carrier built:
ip prefix-list filterlist seq 10 permit 10.0.0.0/23
and you tried to advertise either of the /24s, the routes would be rejected.
If they changed the filter to:
ip prefix-list filterlist seq 10 permit 10.0.0.0/23 le 24
then the /24s would be accepted. This is usually an option on a BGP form. Talk to your carrier Sales Engineer, they should be able to get this set up for you.
Hi Ben, hi Dave,
Please allow me to join.
Ben, very insightful and spot-on response. Rated as deserved!
Dave, a couple of additional thoughts. You did not include your routing protocol configuration so we can only guess that it is BGP and how it is possibly configured. It is always helpful to add the configuration snippet - it helps very much to understand your setup.
I do not know if you inject the two /25 networks into your BGP using the network command or using redistribution. Regarding the network command in BGP, this one needs to exactly match a route in your network before it can be injected into BGP. If you have split the /24 network into two /25 subnets, that is fine, but that also means that you cannot specify the original /24 network using the network command and expect it to be advertised in BGP - because such a network does not exist in your routing table, only the two /25 networks do. You would need to configure aggregation in BGP to advertise a single /24 prefix back to your ISP.
However, there is a simple trick you can do. Let me give you an example config for it first:
ip route 220.127.116.11 255.255.255.0 null0 ! router bgp ... network 18.104.22.168 mask 255.255.255.0
Here, you define a static route covering the whole /24 prefix you have been assigned, and pointing to Null0, and then inject this prefix into BGP using a single network command, without any additional redistribution, filtering, or summarization. This will work nicely because of multiple reasons:
In essence, this approach is very similar to aggregation using the aggregate-address command in BGP, but in terms of BGP operation, it is simpler (no need to reevaluate the aggregate prefix and its attributes every time a component subnet changes).
My two cents...
if you need to advertise only the /24 you can follow Peter's suggestions.
Now, the new default setting for BGP is no auto-summary this means that BGP network command requires an exact match to trigger a BGP advertisement.
So in your case the alternate way to achieve the desired behaviour is:
a) Advertise component routes in BGP with correct mask 255.255.255.128 = /25
router bgp <yourAS>
network 22.214.171.124 255.255.255.128
network 126.96.36.199 255.255.255.128
This will add the component routes to the BGP table because the netmask is an exact match for 188.8.131.52/25 and 184.108.40.206/25.
However, the ISP would like to see an aggregate route like 220.127.116.11/24
b) Create an aggregate address and add the keyword summary-only
you add the following lines
router bgp <your-AS>
aggregate-address 18.104.22.168 255.255.255.0 summary-only
The main difference with the static route to null0 is the following:
the aggregate-address will be advertised only if at least one of the two component routes is alive and present in the BGP table.
the static route to null0 will be always advertised, but if one of the component routes is not alive packets with a destination address within that component will be silently dropped by null0 that is a waste bin.
Hope to help