Configuring BGP best-external route at address-family level

Perform the following task to store the best external route (in addition to the best route) and advertise it to internal peers under the IPv4 unicast address family.

  1. From privileged EXEC mode, enter global configuration mode.
    device# configure terminal
    
  2. Enable BGP routing.
    device(config)# router bgp
    
  3. Enter IPv4 unicast address family command mode.
    device(config-bgp)# address-family ipv4 unicast
    
  4. Configure the storage and advertisement, to internal peers, of the best external route.
    device(config-bgp-ipv4u)# advertise-best-external
    
  5. Return to privileged EXEC mode.
    device(config-bgp-ipv4u)# end
    
  6. Verify the configuration.
    device# show ip bgp
    
    Total number of BGP Routes: 4
    Status codes: s suppressed, d damped, h history, * valid, > best, i internal, S stale, x best-external
    Origin codes: i - IGP, e - EGP, ? - incomplete
        Network            Next Hop        MED        LocPrf     Weight Path
    *>i 110.110.110.0/24   50.50.50.10                150        0      i
    *x  110.110.110.0/24   20.20.20.10                100        0      200 i
    *   110.110.110.0/24   30.30.30.10                100        0      300 i
    *   110.110.110.0/24   40.40.40.10                100        0      400 i
    

The following example shows how to store the best external route and advertise it to internal peers, under the IPv4 unicast address family.

device# configure terminal
device(config)# router bgp
device(config-bgp)# address-family ipv4 unicast
device(config-bgp-ipv4u)# advertise-best-external