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

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

Fundamental BGP "network x.x.x.x" command question

I am really confused about a sample BGP config I set up with Dynamips.  I set up 4 routers, all in a straight line so say you have R1 at the top, connected to R2, connected to R3, then finally R4.  Each one obviously shares a common network between himself and his neighbor, and there are no redundanct connections.

So something like this:

R1  Loopback  10.10.1.1 255.255.0.0

R1  S1/0 172.16.1.1 255.255.0.0

R2 S1/0 172.16.1.2  255.255.0.0

R2 s1/1 172.17.1.2  255.255.0.0

R3 S1/0 172.17.1.3 255.255.0.0

R3 S1/1 172.18.1.3 255.255.0.0

R4 S1/0 172.18.1.4 255.255.0.0

Now, R1 BGP config looks like this:

BGP 1001

  Network 10.10.0.0 255.255.0.0

  Network 172.16.0.0 255.255.0.0

  Neighbor 172.16.1.2 remote_as 2001

  Neighbor 172.16.1.2 timers 12 20

no synchronization

bgp log-neighbor-changes

no auto-summary 

Likewise each router has BGP configured and is advertising only the networks it has attached (i.e. the 172.x nets).

How is it then, when I get to R4 and everythign is converged, and I look at the routing table, there is a route for  10.10.0.0 in there, allowing me to ping and trace the loop back on R1?   (similarly R1 contains routes to various 172 networks, allowing it to find R4 interfaces and all those in between).

This indicates a misunderstanding somewhere of what BGP network statment does.  I thought  In internal protocols like OSPF and EIGRP the "network" command basically indicated which interface would participate, and in BGP it indicated which networks to advertise.  So if I don't include 10.10.0.0 in all the BGP configs on each router, how is that path passed along to R4?  Or is it the case that the network command just "adds" to the list of what BGP knows about, and everthing gets passed along (baring filters)...

So confused....

Everyone's tags (3)
3 ACCEPTED SOLUTIONS

Accepted Solutions
Hall of Fame Super Silver

Re: Fundamental BGP "network x.x.x.x" command question

Hello Suelange,

the network command for net 10.10/16 on R1 is enough to have it propagated all down to R4 over the eBGP sessions

if you do show ip bgp 10.10.0.0 on R4

you will see something

like

10.10.0.0    via R3 next-hop   1003 1002 1001 i

to be noted with no auto-summary an exact match is needed with the subnet mask configured on the interface to have BGP to advertise

R2,R3 don't need to have a network statement for 10.10/16 to propagate it downstream to R4

Hope to help

Giuseppe

Re: Fundamental BGP "network x.x.x.x" command question

In your case, you are advertising the 10.10.0.0/16 network on R1. If all of these are eBGP connections (all different AS), then the other routers will seamlessly pass the route to all of their ebgp neighbors. If all of these routers were in the same AS (iBGP), then R1 would advertise to R2, but R3 and R4 would not have the route unless you had confederations or RR configured.

In short, what you're seeing is normal. When you advertise a route in bgp, all peers will pass the route unless you have route-maps that deny it, filter lists, etc.

HTH,

John

HTH, John *** Please rate all useful posts ***
Hall of Fame Super Silver

Fundamental BGP "network x.x.x.x" command question

The original poster correctly points out a key difference between the Interior routing protocols like OSPF and EIGRP and the Exterior routing protocol of BGP. In the IGPs the network statement only identifies the interfaces to participate and the decision about what to advertise is separate from the network statement.

In BGP the network statement does identify what network prefixes should be advertised. But the original poster has an overly restrictive assumption about how that is implemented. They seem to assume that every router should have a network statement for every network to advertise. But that is impractical for large networks. What they need to understand is that the network statement is only to control what local networks should be advertised. The other part of BGP advertisement is that any route that you learn from an EBGP neighbor will be advertised to any other EBGP neighbor.

So once R1 advertises to R2 then network 10.0.0.0 is advertised to all other External peers without needing any additional network statements.

HTH

Rick

3 REPLIES
Hall of Fame Super Silver

Re: Fundamental BGP "network x.x.x.x" command question

Hello Suelange,

the network command for net 10.10/16 on R1 is enough to have it propagated all down to R4 over the eBGP sessions

if you do show ip bgp 10.10.0.0 on R4

you will see something

like

10.10.0.0    via R3 next-hop   1003 1002 1001 i

to be noted with no auto-summary an exact match is needed with the subnet mask configured on the interface to have BGP to advertise

R2,R3 don't need to have a network statement for 10.10/16 to propagate it downstream to R4

Hope to help

Giuseppe

Re: Fundamental BGP "network x.x.x.x" command question

In your case, you are advertising the 10.10.0.0/16 network on R1. If all of these are eBGP connections (all different AS), then the other routers will seamlessly pass the route to all of their ebgp neighbors. If all of these routers were in the same AS (iBGP), then R1 would advertise to R2, but R3 and R4 would not have the route unless you had confederations or RR configured.

In short, what you're seeing is normal. When you advertise a route in bgp, all peers will pass the route unless you have route-maps that deny it, filter lists, etc.

HTH,

John

HTH, John *** Please rate all useful posts ***
Hall of Fame Super Silver

Fundamental BGP "network x.x.x.x" command question

The original poster correctly points out a key difference between the Interior routing protocols like OSPF and EIGRP and the Exterior routing protocol of BGP. In the IGPs the network statement only identifies the interfaces to participate and the decision about what to advertise is separate from the network statement.

In BGP the network statement does identify what network prefixes should be advertised. But the original poster has an overly restrictive assumption about how that is implemented. They seem to assume that every router should have a network statement for every network to advertise. But that is impractical for large networks. What they need to understand is that the network statement is only to control what local networks should be advertised. The other part of BGP advertisement is that any route that you learn from an EBGP neighbor will be advertised to any other EBGP neighbor.

So once R1 advertises to R2 then network 10.0.0.0 is advertised to all other External peers without needing any additional network statements.

HTH

Rick

16635
Views
5
Helpful
3
Replies