Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

BGP:Understanding the difference between 'network' vs 'aggregate'

Folks, can you please clarify the question in blue below.

Goal:Imagine I want to advertise network 155.4.0.0/16 to AS 54. I have two functional routers like this:

BB1 (AS 54) ---------------  R6 (AS 100)

If I do 'aggregate-address' on R6 like shown below, I go to BB1 and do 'show ip route 155.4.0.0 255.255.0.0' on BB1 and see the route is learned - OK.

#R6

router bgp 100

(...)

aggregate-address 155.4.0.0 255.255.0.0

Then I attempted to use the 'network' statement to advertise such route instead. I did:

#R6

router bgp 100

(...)

network 155.4.0.0 mask 255.255.0.0

I observe that BB1 does not learn the 155.4.0.0 route.

Question:
What am I missing?
I expected that when I advertised the 155.4.0.0/16 prefix on R6 via the 'network' statement, BB1 could learn that as well. It did not.

From reading the documentation is not clear to me the justification for this behavior. 

Rack4R6#show run | s eigrp 100

router eigrp 100

network 155.4.0.0

no auto-summary

Rack4R6#

Rack4R6#show run | s bgp

router bgp 100

no synchronization

bgp log-neighbor-changes

network 155.4.0.0

network 155.4.146.0 mask 255.255.255.0

neighbor 54.4.1.254 remote-as 54

neighbor 155.4.146.1 remote-as 100

neighbor 155.4.146.1 next-hop-self

no auto-summary

Rack4R6#show ip route 54.4.1.254

Routing entry for 54.4.1.0/24

  Known via "connected", distance 0, metric 0 (connected, via interface)

  Routing Descriptor Blocks:

  * directly connected, via Serial0/0/0

      Route metric is 0, traffic share count is 1

2 ACCEPTED SOLUTIONS

Accepted Solutions
Hall of Fame Super Silver

Re: BGP:Understanding the difference between 'network' vs 'aggre

Hello Marlon,

when you have "no auto-summary" the network command requires an exact match in IP routing table.

aggregate-address command creates an aggregate when at least one component route is in the BGP table by a network or by redistribution of an IGP.

it is a form of route summarization. Before aggregate-address command was introduced the only way to create an aggregate address was:

ip route 155.4.0.0 255.255.0.0 null0

router bgp xx

network 155.4.0.0 netmask 255.255.0.0

the aggregate created in this way is never withdrawned, with aggregate-address command when last component route disappears the aggregate is removed.

Hope to help

Giuseppe

Hall of Fame Super Blue

Re: BGP:Understanding the difference between 'network' vs 'aggre

news2010a wrote:

Folks, can you please clarify the question in blue below.

Goal:Imagine I want to advertise network 155.4.0.0/16 to AS 54. I have two functional routers like this:

BB1 (AS 54) ---------------  R6 (AS 100)

If I do 'aggregate-address' on R6 like shown below, I go to BB1 and do 'show ip route 155.4.0.0 255.255.0.0' on BB1 and see the route is learned - OK.

#R6

router bgp 100

(...)

aggregate-address 155.4.0.0 255.255.0.0

Then I attempted to use the 'network' statement to advertise such route instead. I did:

#R6

router bgp 100

(...)

network 155.4.0.0 mask 255.255.0.0

I observe that BB1 does not learn the 155.4.0.0 route.

Question:
What am I missing?
I expected that when I advertised the 155.4.0.0/16 prefix on R6 via the 'network' statement, BB1 could learn that as well. It did not.

From reading the documentation is not clear to me the justification for this behavior. 

Rack4R6#show run | s eigrp 100

router eigrp 100

network 155.4.0.0

no auto-summary

Rack4R6#

Rack4R6#show run | s bgp

router bgp 100

no synchronization

bgp log-neighbor-changes

network 155.4.0.0

network 155.4.146.0 mask 255.255.255.0

neighbor 54.4.1.254 remote-as 54

neighbor 155.4.146.1 remote-as 100

neighbor 155.4.146.1 next-hop-self

no auto-summary

Rack4R6#show ip route 54.4.1.254

Routing entry for 54.4.1.0/24

  Known via "connected", distance 0, metric 0 (connected, via interface)

  Routing Descriptor Blocks:

  * directly connected, via Serial0/0/0

      Route metric is 0, traffic share count is 1

Marlon

If you do a "sh ip route" on R6 is there a routing entry for the 155.4.0.0/16 network. There has to be a matching route in the IGP table when you use a "network" statement under BGP or it will not be advertised.

Aggregate is slightly different in that there does not have to be a match but rather as long as one of the subnets with 155.4.0.0/16 is the routing table it will be advertised.

So it sounds like that your are missing a router.

On R1 try adding this -

ip route 155.4.0.0 255.255.0.0 Null0

and see if it is then advertised out. Note that i'm assuming this is a lab setup ?.

Jon

3 REPLIES
Hall of Fame Super Silver

Re: BGP:Understanding the difference between 'network' vs 'aggre

Hello Marlon,

when you have "no auto-summary" the network command requires an exact match in IP routing table.

aggregate-address command creates an aggregate when at least one component route is in the BGP table by a network or by redistribution of an IGP.

it is a form of route summarization. Before aggregate-address command was introduced the only way to create an aggregate address was:

ip route 155.4.0.0 255.255.0.0 null0

router bgp xx

network 155.4.0.0 netmask 255.255.0.0

the aggregate created in this way is never withdrawned, with aggregate-address command when last component route disappears the aggregate is removed.

Hope to help

Giuseppe

Hall of Fame Super Blue

Re: BGP:Understanding the difference between 'network' vs 'aggre

news2010a wrote:

Folks, can you please clarify the question in blue below.

Goal:Imagine I want to advertise network 155.4.0.0/16 to AS 54. I have two functional routers like this:

BB1 (AS 54) ---------------  R6 (AS 100)

If I do 'aggregate-address' on R6 like shown below, I go to BB1 and do 'show ip route 155.4.0.0 255.255.0.0' on BB1 and see the route is learned - OK.

#R6

router bgp 100

(...)

aggregate-address 155.4.0.0 255.255.0.0

Then I attempted to use the 'network' statement to advertise such route instead. I did:

#R6

router bgp 100

(...)

network 155.4.0.0 mask 255.255.0.0

I observe that BB1 does not learn the 155.4.0.0 route.

Question:
What am I missing?
I expected that when I advertised the 155.4.0.0/16 prefix on R6 via the 'network' statement, BB1 could learn that as well. It did not.

From reading the documentation is not clear to me the justification for this behavior. 

Rack4R6#show run | s eigrp 100

router eigrp 100

network 155.4.0.0

no auto-summary

Rack4R6#

Rack4R6#show run | s bgp

router bgp 100

no synchronization

bgp log-neighbor-changes

network 155.4.0.0

network 155.4.146.0 mask 255.255.255.0

neighbor 54.4.1.254 remote-as 54

neighbor 155.4.146.1 remote-as 100

neighbor 155.4.146.1 next-hop-self

no auto-summary

Rack4R6#show ip route 54.4.1.254

Routing entry for 54.4.1.0/24

  Known via "connected", distance 0, metric 0 (connected, via interface)

  Routing Descriptor Blocks:

  * directly connected, via Serial0/0/0

      Route metric is 0, traffic share count is 1

Marlon

If you do a "sh ip route" on R6 is there a routing entry for the 155.4.0.0/16 network. There has to be a matching route in the IGP table when you use a "network" statement under BGP or it will not be advertised.

Aggregate is slightly different in that there does not have to be a match but rather as long as one of the subnets with 155.4.0.0/16 is the routing table it will be advertised.

So it sounds like that your are missing a router.

On R1 try adding this -

ip route 155.4.0.0 255.255.0.0 Null0

and see if it is then advertised out. Note that i'm assuming this is a lab setup ?.

Jon

Community Member

Re: BGP:Understanding the difference between 'network' vs 'aggre

Ah!!! so then the aggregate-address is different that it dispenses that IGP match condition - although I realize I must advertise one prefix (i.e.155.4.146.0/24) in order to make it work.

Thanks very much. That makes more sense now. From reading the documentation that was not obvious to me.

Yes, this is a lab so we are good making changes.

5964
Views
0
Helpful
3
Replies
CreatePlease to create content