BGP Auto-summary
Recognize legacy classful origination, see how it changes a network statement, then return to explicit prefix-and-mask advertisements.
Two-router lab
R1 and R2 form eBGP. R1 has a connected 10.255.0.1/32 loopback, but no 10.0.0.0/8 route. Start with no originated BGP prefixes.
auto-summary; unsupported platforms should use explicit prefixes. Outputs are illustrative, not recorded router tests.Baseline configuration · auto-summary explicitly disabled
R1
hostname R1
ip cef
interface Loopback0
ip address 10.255.0.1 255.255.255.255
exit
interface GigabitEthernet1
ip address 192.0.2.1 255.255.255.252
no shutdown
exit
router bgp 65010
bgp router-id 10.255.0.1
no bgp default ipv4-unicast
neighbor 192.0.2.2 remote-as 65020
address-family ipv4 unicast
no auto-summary
neighbor 192.0.2.2 activate
exit-address-family
endR2
hostname R2
ip cef
interface Loopback0
ip address 10.255.0.2 255.255.255.255
exit
interface GigabitEthernet1
ip address 192.0.2.2 255.255.255.252
no shutdown
exit
router bgp 65020
bgp router-id 10.255.0.2
no bgp default ipv4-unicast
neighbor 192.0.2.1 remote-as 65010
address-family ipv4 unicast
no auto-summary
neighbor 192.0.2.1 activate
exit-address-family
endWithout auto-summary
On R1, try a classful network statement without a mask. For an address beginning with 10, the historical class A boundary is /8. This command requests 10.0.0.0/8, not the /32 interface prefix.
router bgp 65010
address-family ipv4 unicast
network 10.0.0.0
exit-address-familyR1# show ip route 10.255.0.1
Routing entry for 10.255.0.1/32
Known via "connected", distance 0, metric 0
* directly connected, via Loopback0
R1# show ip bgp 10.0.0.0/8
% Network not in tableThe installed /32 is not an exact match for the requested /8. With automatic summarization disabled, that classful network statement does not originate a route.
Enable auto-summary
Leave the classful network statement in place and enable the legacy behavior on R1.
router bgp 65010
address-family ipv4 unicast
auto-summary
exit-address-familyR1# show ip bgp 10.0.0.0/8
BGP routing table entry for 10.0.0.0/8
Paths: (1 available, best #1, table default)
Local
0.0.0.0 from 0.0.0.0 (10.255.0.1)
Origin IGP, metric 0, localpref 100, weight 32768, valid, sourced, local, bestR2# show ip bgp 10.0.0.0/8
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/8 192.0.2.1 0 0 65010 iThe installed component /32 now satisfies the legacy classful origination rule, so R1 originates the covering /8 and R2 learns it. The enabling command alone does not export every connected route: this experiment also needs the classful network statement and a matching component route.
What the summary hides
| Item | Value in the experiment |
|---|---|
| Connected prefix on R1 | 10.255.0.1/32 |
| Classful advertisement | 10.0.0.0/8 |
| Other addresses covered | For example, 10.99.0.1 is inside the /8 but has no route on R1. |
A broad advertisement does not create real reachability for all covered destinations. R2 can direct traffic for uncovered addresses toward R1, where the component /32 does not provide a route to deliver it. A discard summary, if installed by the image, only drops such traffic. Summarization reduces prefix detail, but it must represent a deliberate forwarding design.
This behavior is different from explicitly creating an aggregate prefix. It also does not mean every route learned from an eBGP or iBGP neighbor is automatically rewritten into a classful summary.
Return to explicit prefixes
Remove the experimental classful statement, disable auto-summary, and originate only the installed host prefix.
router bgp 65010
address-family ipv4 unicast
no network 10.0.0.0
no auto-summary
network 10.255.0.1 mask 255.255.255.255
exit-address-familyR2# show ip bgp 10.255.0.1/32
Network Next Hop Metric LocPrf Weight Path
*> 10.255.0.1/32 192.0.2.1 0 0 65010 iR2# show ip bgp 10.0.0.0/8
% Network not in table
R2# show ip route 10.255.0.1
Routing entry for 10.255.0.1/32
Known via "bgp 65020", distance 20, metric 0
* 192.0.2.1, via GigabitEthernet1After the updates converge, R2 has the intended /32 and no exact /8 entry. An explicit subnet-and-mask network statement still requires its exact installed route; auto-summary is not a substitute for planning aggregates.
Final configurations
Explicit /32 origination · no auto-summary
R1
hostname R1
ip cef
interface Loopback0
ip address 10.255.0.1 255.255.255.255
exit
interface GigabitEthernet1
ip address 192.0.2.1 255.255.255.252
no shutdown
exit
router bgp 65010
bgp router-id 10.255.0.1
no bgp default ipv4-unicast
neighbor 192.0.2.2 remote-as 65020
address-family ipv4 unicast
no auto-summary
neighbor 192.0.2.2 activate
network 10.255.0.1 mask 255.255.255.255
exit-address-family
endR2
hostname R2
ip cef
interface Loopback0
ip address 10.255.0.2 255.255.255.255
exit
interface GigabitEthernet1
ip address 192.0.2.2 255.255.255.252
no shutdown
exit
router bgp 65020
bgp router-id 10.255.0.2
no bgp default ipv4-unicast
neighbor 192.0.2.1 remote-as 65010
address-family ipv4 unicast
no auto-summary
neighbor 192.0.2.1 activate
exit-address-family
endKey Takeaways
- Auto-summary is legacy IPv4 classful behavior; it is disabled by default in current versions of the example command family.
- Without auto-summary, a network statement needs an exact installed prefix-and-mask match.
- On supporting software, a classful network statement plus auto-summary can originate the major network when a component subnet exists.
- A covering advertisement can attract traffic for addresses that the originating router cannot deliver.
- Finish with explicit prefix-and-mask origination and verify the peer has the intended prefix rather than an unwanted broad summary.