eBGP / iBGP configuration questions

Hi everyone!

I have two BGP routers (bgp1 and bgp2) with one eBGP peer on each and iBGP in between. Currently I use different BGP instances for eBGP and iBGP. Routes learned with iBGP instance got a distance of 200 and eBGP have 20. This results in eBGP routes being preferred even if AS_PATH is longer..

Question 1: Should I use the same BGP instance for both eBGP and iBGP?

  • if YES: OK.
  • if NO: Should I modify the route distance in routing filters? Is value 20 appropriate?

Question 2: Routes advertised by iBGP have an unreachable gateway (by default config), since bgp1 can’t talk to eBGP peer on bgp2. If I update this with “nexthop-choice=force self”, the routes become available. Is this the correct way of doing this?

  • if YES: OK.
  • if NO: Please point me in the right direction

Thanks for your answers!

Question 1: Should I use the same BGP instance for both eBGP and iBGP?

Yes, you can use one instance, when you have one AS number, there is no need for second instance
Even if you will use one instance still the distance will be 20 for eBPG and 200 for iBGP, but I’m not sure about behaviour and which route will be used, you should try it.

Question 2: Routes advertised by iBGP have an unreachable gateway (by default config), since bgp1 can’t talk to eBGP peer on bgp2. If I update this with “nexthop-choice=force self”, the routes become available. Is this the correct way of doing this?

Yes, iBGP by default don’t change the next hop IP address. There are 2 ways how to fix it :

  • next-hop self choice
  • add a static route to gateways IP address and change scope/target scope values accordingly, so the route will be used as a helper for creation of recursive next-hop resolving.

Thanks Alexcherry.

Regarding 1:

  • I have read that if I use the same instance, route selection will work differently (distance will be ignored, which would be better in my case). Below quote is available here:

Best path algorithm compares routes received by a single BGP instance. Routes installed by different BGP instances are compared by the general algorithm, i.e. route distances are compared and the route with lower distance is preferred.

  • Do different instances bind to different CPU cores? Would splitting/merging instances impact performance?

Regarding 2:

  • What would be “best practice”?
  • Considering performance, is either preferred?

Thanks again!

Performance will be the same. Instances are not split among cores.

/routing bgp instance set default cpu=18

:wink:

You had me going there for a second :slight_smile: