Search code examples
tcpbgp

BGP Neighbor both Initiating connection


I'm new to this forum and this is my first question in this forum, Not sure if this is the right forum to ask for . I applied for a networking job and i got my first call today..

The interviewer was asking a question which i could not answer. thought of getting advice from experts. I tried to search in google but could not get the correct answer.

  1. I have two neighbors and both of them are trying to initiate a connection. what will happen during this case?

    My understanding is : when we configure neighbor, it tries to initiate a TCP Connection, what if both will send this message? are there any preference given or something like that??

  2. From BGP Idle state, guy who is initiating connection will go to Active and who will receive that active message will go into connect state.

    Question was: can it go from Connect -> Active why? why can't we go directly from Connect to Idle and why to Active?


Solution

  • The best community for this question is "Network Engineering"

    #1 Section 6.8 of RFC 4171 describes how BGP connection collisions are resolved: the BGP connection initiated by the BGP speaker with the highest BGP identifier wins.

    #2 The state machine is described in section 8.2 of RFC 4171 and in this blog. In summary:

    • Idle means that the session is not trying to establish an outgoing connection and not accepting an incoming connection.
    • Connect means that the session has initiated an attempt to establish an outgoing connection (sent a SYN) and is waiting for the connection to complete (waiting for SYN ACK).
    • Active means that the session has not initiated an outgoing connection and is waiting for the other side the initiate the connection (waiting for a SYN)
    • Normally, if the outgoing connection fails, we want to still accept an incoming connection. That is why normally we go from Connect to Active (and not Idle) when the outgoing connection fails.