Network Statement for OSPF to BGP

Answered Question
Jun 3rd, 2008

Hello,

I will try my best in describing as to where my confusion is. Kindly assist.


I have 4 Router's


R1--->IBGP<---R2--->OSPF<---R3.


Let's say, i have 192.168.4.0/24 on R2 from R3 through OSPF and in order to inject it in BGP. On R2 i have put a network statement " network 192.168.4.0 255.255.255.0. So in this way i get it injected into BGP the ospf route.


Okay now, what i am trying to do is I am planning to shut downt the R-3, and i will be received the same network from 192.168.4.0/24 from R1 to R2 through IBGP.


I cannot test the scenario in Lab, but in Production i have to make these changes, My argument is in order for 192.168.4.0/24 to work if i am learning from R1 through IBGP to R2 i have to remove the "NETWORK STATEMENT". Because i have got customers connected on R-2 (BGP-Connection) who would need 192.168.4.0/24. I simply receive this through IBGP from R1 and in Customer Route-maps i put this network and it will get advertised to them. Can someone kindly confirm if my assessment is right. If wrong, can someone guide me.


Thanks alot,

Hassan...

Correct Answer by Giuseppe Larosa about 8 years 9 months ago

Hello Hassan,

I thought it was this way.


From a practical point of view you can remove the network statement on R2 at any time because R2 is going to receive the prefix from R1.


Your migration steps could be:


a) remove network statement on R2's BGP

b) shut ospf link between R2 and R3

c) add a network statement for the prefix on R1


I just tried to clarify that once the prefix has been removed from the IP routing table of R2 that network statement under BGP plays no role anymore and R2 can accept the prefix from R1.

You are right when you state that you don't need the network statement on R2's BGP process in order to have the prefix sent out an eBGP session to the customer router. (this is part of BGP powerful charasteristics)


If you are not doing a migration but a new installation, you simply don't need the network command on R2.


hope to help

Giuseppe


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Giuseppe Larosa Tue, 06/03/2008 - 10:28

Hello Hassan,

About your question:

you shouldn't need to remove the network 192.168.4.0 command under router R2 in order to have the iBGP network to converge.

After you shut down the interface on R3 to R2 the OSPF adjacency R3-R2 will be lost on R2 and the network 192.168.4.0/24 will be removed from R2's OSPF database, from R2's IP routing table and then R2 will withdraw its iBGP advertisement of IP prefix 192.168.4.0/24.

(BGP advertises a prefix only if it is found in the IP routing table)

Then R2 is ready to accept a new iBGP advertisement of 192.168.4.0/24 coming from R1 (if any !!!)


Take care that if R1 is in its turn learning the prefix via iBGP from another router it will not advertise it to R2 without a special configuration (iBGP split horizon rule)using the iBGP route reflector concept. (or BGP confederations)

If R1 learns the prefix in another way via an eBGP session or via a network command or a redistribution into BGP it will advertise it to R2.


At the end of the migration, for cleaning the configuration, you can remove the network statement on R2.


However, you have spoken of four routers, how is connected R4 to the other routers ?


hope to help

Giuseppe

shassan655 Tue, 06/03/2008 - 10:42

Hello Giuseppe ,


R1 is learning the 192.168.4.0/24 through a network statement, because R1 is connected with R4 on OSPF link.


Actually, my whole confusion is, why would i need a Network statement in R-2 under BGP when R1 is sending me the route 192.168.4.0/24 through IBGP. Once received this network i simply forward the network to my other EBGP customers connected on my R2.


Kindly correct me if i am wrong.


Thanks,

Hassan...




Correct Answer
Giuseppe Larosa Tue, 06/03/2008 - 10:59

Hello Hassan,

I thought it was this way.


From a practical point of view you can remove the network statement on R2 at any time because R2 is going to receive the prefix from R1.


Your migration steps could be:


a) remove network statement on R2's BGP

b) shut ospf link between R2 and R3

c) add a network statement for the prefix on R1


I just tried to clarify that once the prefix has been removed from the IP routing table of R2 that network statement under BGP plays no role anymore and R2 can accept the prefix from R1.

You are right when you state that you don't need the network statement on R2's BGP process in order to have the prefix sent out an eBGP session to the customer router. (this is part of BGP powerful charasteristics)


If you are not doing a migration but a new installation, you simply don't need the network command on R2.


hope to help

Giuseppe


shassan655 Tue, 06/03/2008 - 11:03

Hello Giuseppe,


Thanks for the reply....One last clarification, if i leave the network statement in R-2 for 192.168.4.0/24 affter shutting down the OSPF on R2, and i started to learn this network from R1. But when i send it to customer on R2 through EBGP, could that create any problem or not.


Thanks..Hassan

Giuseppe Larosa Tue, 06/03/2008 - 11:22

Hello Hassan,

the network statement on R2 shouldn't create any problem however if you have already removed it you are sure it cannot cause anything.


In production networks it is wise to use the safer procedure.

Of course in a lab to understand BGP you could wait to see that the network command on R2 is meaningless after shutting the link between R2 and R3.


best regards

Giuseppe


p.s. thanks for having rated my answer

Actions

This Discussion