cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2055
Views
14
Helpful
5
Replies

iBGP sessions - What does it mean?

jaighobahi
Level 1
Level 1

Hello Everyone,

I am here again with an issue that many would consider trivia.  However, for someone like me who doesn't know the answer, it is not trivia.  I am reading a book that says if you want to have a full iBGP mesh, you would need n(n-1)/2 iBGP sessions.

The n-1 is quite obvious, but the n(n-1)/2 is not.  So, I ask:

1.  What exactly is an iBGP peer session?

2.  What is the theory behind the formula?

Thanks.

5 Replies 5

Peter Paluch
Cisco Employee
Cisco Employee

Hello,

Do not worry about asking things that may appear trivial. Very often, it is difficult to understand those "trivial" things because they represent the foundation, and to understand the foundation, you have to adopt a certain mindset which is not easy. Once you get into it, though, all further learning will become easier.

1.  What exactly is an iBGP peer session?

It is a BGP session between two BGP speakers in the same autonomous system.

2.  What is the theory behind the formula?

The N*(N-1) formula tells you how many BGP neighbors are configured for mutual communication - each of the N routers has N-1 neighbors configured. However, a BGP peering is a session between exactly two routers. Each two neighbors form a single peering. Therefore, out of N*(N-1) configured, there are N*(N-1)/2 pairs representing a BGP session, hence the formula.

Best regards,

Peter

Thank you Sir.  The answer was short, but precise.  You may not understand how much weight you have just lifted off me.

You would have noticed that I haven't been marking answers as correct.  The reason is that if I knew the correct answer, I would not ask the question in the first place.  The answer clears my doubts, but I leave it to the experts to say whether it is correct or not.

Hello,

You are very much welcome. And your approach to (not) marking answers as correct is completely understandable and very logical - if you are a Star Trek fan then you understand what I mean by calling this a beautiful example of Vulcan logic My respect!

Best regards,

Peter

Hello both,

First question was answered and I think that there are no further questions about that.

Second question was also answered but maybe some example will help.

Jaighobahi, as Peter said iBGP session is session between two peering routers in same AS. Between iBGP peers exist BGP split horizont rule which is saying that no iBGP learned route will be advertised to other iBGP peer. This is a problem cause if this rule is applied some routers will not know about some routes which can cause problems, but this rule is important to disable creating routing loops.

To defeat BGP split split horizont rule you can configure:

- iBGP full mesh - each iBGP peer will have iBGP sessions with every other iBGP peer

- bgp route reflector

- bgp confederations

iBGP full mesh ->

Lets say that have 4 routers in our AS connected in ring topology.

- N*(N-1)/2

- letter N in formula represent number of routers in AS, so N=4.

- each router peer with N-1 routers, so N-1=3 => each iBGP peer has 3 iBGP sessions

R1 <-> R2     R2 <-> R1     R3 <->R1     R4 <-> R1

R1 <-> R3     R2 <-> R3     R3 <->R2     R4 <-> R2

R1 <-> R4     R2 <-> R4     R3 <->R4     R4 <-> R3

- it means that there is N*(N-1) iBGP "unidirectional" sessions*** in our AS, N*(N-1)=12

- BUT session R1<->R2 is same session as session R2<->R1 and so on, so we have to divide number 12 by two [iBGP session is bidirectional, two unidirectional sessions R1 -> R2 and R2 -> R1] => N*(N-1)/2 = 6 iBGP sessions if you have 4 routers in AS

*** sorry for this expression, but I realy did not know how to call them, it is not official term.....

I hope that this helped to clear your doubts about Peter's explanation.

Best Regards

Please rate all helpful posts and close solved questions

Best Regards Please rate all helpful posts and close solved questions

"...session R1<->R2 is same session as session R2<->R1 and so on...."  Really nice explanation.  Thanks Mr. Blau.

Review Cisco Networking for a $25 gift card