PacketLab
BGP · Introduction

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.

R1 originates · R2 receivesIllustrative topology
AS 65010AS 65020192.0.2.0/30Gi1 · .1Gi1 · .2R1Lo0: 10.255.0.1/32R2Lo0: 10.255.0.2/32
Solid line: a physical link carrying eBGP. Loopbacks are /32 interfaces. The experiment advertises R1’s loopback; R2’s loopback is not originated.
This is a legacy IPv4 command behavior, not a requirement of BGP. Automatic summarization is disabled by default in current versions of the example command family. The experiment needs an image that supports 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
end

R2

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
end

Without 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-family
R1# 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 table

The 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-family
R1# 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, best
R2# 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 i

The 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

ItemValue in the experiment
Connected prefix on R110.255.0.1/32
Classful advertisement10.0.0.0/8
Other addresses coveredFor 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-family
R2# 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 i
R2# 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 GigabitEthernet1

After 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
end

R2

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
end

Key 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.

BGP Auto-summary Quiz

Six questions · four options each · select one answer per question. Submit all answers to see your score and explanations.

1. With auto-summary disabled, R1 has only 10.255.0.1/32. Does network 10.0.0.0 originate a /8?
2. Which prefix appears after the legacy classful experiment is enabled?
3. What is the historical classful boundary for an address beginning with 10?
4. Does advertising 10.0.0.0/8 prove R1 can deliver traffic to 10.99.0.1?
5. Which command explicitly originates only the loopback host prefix in the final configuration?
6. What should you assume about auto-summary on an arbitrary router platform?
Behavior references

BGP origination and auto-summary behavior · Automatic summarization command reference · Router-symbol attribution.