cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2828
Views
5
Helpful
8
Replies

BGP aggregate address?

2020-10-27 16_10_11-TEST1 - TEST1 - Remote Desktop Connection.png

 

I'm using the above topology in GNS3 and I'm trying to use the aggregate address command on the edge routers to advertise all of the 192.168.0.0 networks but I'm running into something I don't understand.  

 

If I do it this way

Edge1#sh run | s bgp
router bgp 65000
 bgp log-neighbor-changes
 no bgp default ipv4-unicast
 neighbor AS65000 peer-group
 neighbor AS65000 remote-as 65000
 neighbor AS65000 update-source Loopback1
 neighbor 10.0.0.1 remote-as 65222
 neighbor 10.5.5.2 peer-group AS65000
 neighbor 10.5.5.3 peer-group AS65000
 neighbor 10.5.5.4 peer-group AS65000
 neighbor 172.16.0.1 remote-as 65111
 !
 address-family ipv4
  network 192.168.0.0 mask 255.255.0.0
  aggregate-address 192.168.0.0 255.255.0.0
  neighbor 10.0.0.1 activate
  neighbor 10.5.5.2 activate
  neighbor 10.5.5.3 activate
  neighbor 10.5.5.4 activate
  neighbor 172.16.0.1 activate
  auto-summary
 exit-address-family

Then ISP 1 doesn't get any of the 192.168.x.x routes...but if I change the network statement to not include the mask and just say "network 192.168.0.0" then the routes propagate to ISP1.  

 

Why?

1 Accepted Solution

Accepted Solutions

I figured this out myself.  I had to advertise at least one route on Edge 1 that was in 192.168.0.0/16 so I advertised the /30 for 192.168.0.0/30.  Once I did that the summary route appeared on ISP1.  BGP needs at least one network that is part of the summer to be in the BGP table for the aggregate address to work.

View solution in original post

8 Replies 8

....

Hello,

 

odd, since you don't even need the 'network 192.168.0.0 mask 255.255.0.0' statement at all, The aggregate address should be enough to propagate the 192.168.0.0/16 and all more specific networks. What does the topology table of the Edge and the ISP routers look like (show ip bgp topology *) ?

Yeah I thought the aggregate address command would advertise the routes by itself as well which made me double confused.  Here's the info:

ISP1#sh ip bgp top *
For address family: IPv4 Unicast

BGP table version is 18, local router ID is 172.16.4.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *   10.0.1.0/24      172.16.0.2                             0 65000 65222 i
 *>                   4.2.2.2                  0             0 65222 i
 *   10.0.2.0/24      172.16.0.2                             0 65000 65222 i
 *>                   4.2.2.2                  0             0 65222 i
 *   10.0.3.0/24      172.16.0.2                             0 65000 65222 i
 *>                   4.2.2.2                  0             0 65222 i
 *   10.0.4.0/24      172.16.0.2                             0 65000 65222 i
 *>                   4.2.2.2                  0             0 65222 i
 *>  172.16.1.0/24    0.0.0.0                  0         32768 i
 *>  172.16.2.0/24    0.0.0.0                  0         32768 i
 *>  172.16.3.0/24    0.0.0.0                  0         32768 i
 *>  172.16.4.0/24    0.0.0.0                  0         32768 i




EDGE1#sh ip bgp top *
For address family: IPv4 Unicast

BGP table version is 31, local router ID is 10.5.5.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *   10.0.1.0/24      172.16.0.1                             0 65111 65222 i
 * i                  10.0.0.5                 0    100      0 65222 i
 *>                   10.0.0.1                 0             0 65222 i
 *   10.0.2.0/24      172.16.0.1                             0 65111 65222 i
 * i                  10.0.0.5                 0    100      0 65222 i
 *>                   10.0.0.1                 0             0 65222 i
 *   10.0.3.0/24      172.16.0.1                             0 65111 65222 i
 * i                  10.0.0.5                 0    100      0 65222 i
 *>                   10.0.0.1                 0             0 65222 i
 *   10.0.4.0/24      172.16.0.1                             0 65111 65222 i
 * i                  10.0.0.5                 0    100      0 65222 i
 *>                   10.0.0.1                 0             0 65222 i
     Network          Next Hop            Metric LocPrf Weight Path
 * i 172.16.1.0/24    10.0.0.5                 0    100      0 65222 65111 i
 *                    10.0.0.1                               0 65222 65111 i
 *>                   172.16.0.1               0             0 65111 i
 * i 172.16.2.0/24    10.0.0.5                 0    100      0 65222 65111 i
 *                    10.0.0.1                               0 65222 65111 i
 *>                   172.16.0.1               0             0 65111 i
 * i 172.16.3.0/24    10.0.0.5                 0    100      0 65222 65111 i
 *                    10.0.0.1                               0 65222 65111 i
 *>                   172.16.0.1               0             0 65111 i
 * i 172.16.4.0/24    10.0.0.5                 0    100      0 65222 65111 i
 *                    10.0.0.1                               0 65222 65111 i
 *>                   172.16.0.1               0             0 65111 i

Friend,

I see network 172.16.x.0/24 in one edge and it get it from isp,

You inject this route in isp with network commands.

Now in edge config same prefix 172.16.0.0/16 not 172.168.0.0/16

Do that and see reuslt.

You must get new prefix 172.16.0.0/16 in edge.

I figured this out myself.  I had to advertise at least one route on Edge 1 that was in 192.168.0.0/16 so I advertised the /30 for 192.168.0.0/30.  Once I did that the summary route appeared on ISP1.  BGP needs at least one network that is part of the summer to be in the BGP table for the aggregate address to work.

Hello,

 

that doesn't sound right. As long as there are more specific routes in the topology table, the aggregate command should be enough to announce the aggregate as well as all more specific routes. You don't need to announce a specific network.

 

What does the topology/routing table of the Edge router look like ? 

I went through other posts on here about "aggregate address" and that's what someone said.  I tried it and it worked.  I posted the topology of Edge1 in my initial post.  

 

https://community.cisco.com/t5/routing/bgp-aggregate-address/td-p/776007

 

Check the last post on the above thread by Jon Marshall

I think your "network" statement is in error.  Try adding either of these statements (or both?) into BGP's IPv4 address family:

network 192.168.0.0 mask 255.255.255.252

network 192.168.0.16 mask 255.255.255.248

 

The network statement only populates prefixes into the routers BGP database, if that prefix exists in the router's routing table.  You don't have 192.168.0.0/16 in your routing table (according to PacketTracer's display, anyway), so the network statement isn't putting anything into BGP.

 

Note, BGP almost always requires a route-map to work the way you want it to work.  If you want to only advertise the summary address and not the more-specific prefixes, you need to apply a route-map on the neighbor relationship.  If you're ok with the ISPs learning the more-specific addresses also, then knock yourself out.

 

Alternately:

You can add a static route to interface null0.  This is known as black-hole routing, and doing this on the summary address makes that static route an "anchor route."  If you add that static route, then 192.168.0.0/16 gets populated into the router's routing table, and the network statement puts the summary address into the BGP database.  In this case, you also don't need the aggregate-address command.  Note that the more-specific routes will always win, even over a static route.

 

weylin

Review Cisco Networking for a $25 gift card