As Ryota notes the use of aggregate route for this application. The other option is the generate route.
With the aggregate route the larger prefix is available for advertising if any subnet of this is active in the table.
With the generate route the advertisement can be made even when the routes are no longer currently active. this can be especially good if nat options prevent subnets from actually existing. Or if subnets come and go depending on time but you want the upstream advertisement active regardless.
KB article with overview of the configurations.
https://supportportal.juniper.net/s/article/M-MX-T-How-to-advertise-aggregated-and-generated-routes-into-BGP-ISP?language=en_US
------------------------------
Steve Puluka BSEET - Juniper Ambassador
IP Architect - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP - Retired)
http://puluka.com/home------------------------------
Original Message:
Sent: 04-19-2025 00:19
From: JOHN MUNOZ
Subject: Advertising /24 but subnetting interfaces?
Forgive the noob question, it's been many years since my CCNA courses.
We just got a /24 ip block. Our ISPs are able to provide us BGP and the smallest network they will advertise is a /24. As a start we created a DMZ interface and assigned the whole /24 on it. I'm exporting that route to the ISP and they are able to successfully see it. I'd like to be able to use smaller subnets within that block for other purposes though. (/30's to peer with other services, /29's to some of our other sites, etc)
Is it possible for me to be able to break up this IP block but still advertise the full /24 to our ISP to be able to maintain BGP with them?
------------------------------
JOHN MUNOZ
------------------------------