9 Replies Latest reply: Oct 2, 2011 11:39 AM by Brian RSS

    BGP Active state

    sg4rb0sss

      Hey guys,

       

      I always get questions on bgp active state incorrect.   I get a quesion on BGP asking why a neighbor is in the Active state, with the answers of:

       

      A. The router will not accept connections from the peer.

      B. The router has sent out an active TCP connection request to the peer

      C. The router is listening on its server port for connection requests from the peer

      D. BGP can exchange routing information in this state.

       

      According to the answer book, the answer is C.  What I would like to know is why B is incorrect?  In the official CCIE R&S guide, there is a table on page 378 showing that in the Active state, the router listens for a TCP session & Initiates a TCP session, making both B and C correct.  So I don't understand.

       

      Cheers,
      Stephen

        • 1. Re: BGP Active state
          Conwyn

          Hi Stephen

           

          My guess is the "active tcp" part of the sentence. What does that mean?

           

          Regards Conwyn

          • 2. Re: BGP Active state
            sg4rb0sss

            hmm , yeh i was thinking that.  Origionally I took it for granted that it meant that its actively attempting to make a TCP session between the neighbor and itself.

            • 3. Re: BGP Active state
              cadetalain

              Hi,

              Per RFC4271,

              a) idle stae

              b) connect state

              c)active state

              d)established state

               

              Alain.

              • 4. Re: BGP Active state
                Brian

                I think you forgot two states.

                 

                Per RFC-4271,

                a) idle state

                b) connect state

                c) active state

                d) opensent state

                e) openconfirm state

                f) established state

                 

                In regards to the answer I agree with "C".  Per the RFC,

                 

                Active State:

                 

                      In this state, BGP FSM is trying to acquire a peer by listening for, and accepting, a TCP connection.

                 

                 

                Hope this helps.

                 

                Brian

                 

                • 5. Re: BGP Active state
                  cadetalain

                  Hi Brian,

                   

                  No I didn't forget those states. I was putting a state name for each proposition in the question 

                   

                  Alain.

                  • 6. Re: BGP Active state
                    Ganesh

                    Hello brain,

                    would you please clarify me that if we are using BGP in our enterprise network then is there necessary to configure the default route ???? I am so confused..!

                     

                    And is there any condition that we are using BGP and still we need to configure static route for the outside network ??

                    And if there is any documentation that could explain the "next-hop self" concept then plzzz share

                    • 7. Re: BGP Active state
                      cadetalain

                      Hi,

                      For next-hop-self:

                      There are 2 types of BGP peerings: eBGP and iBGP, the former is between routers in the same AS and the latter is between routers in different ASes.

                      By default eBGP peers when advertising a prefix always change the next-hop to their update-source address but iBGP peers do not.

                      So if your edge router receives an eBGP update, the next-hop is the IP address of the other BGP peer which is connected to your router.Then when your border router advertises this same prefix to its iBGP peer it doesn't change the next-hop but this next-hop is not known by any IGP in your AS so it is unreachable.

                      The first condition for a BGP prefix to be advertised is the next-hop must be reachable otherwise the prefix is not considered as a best route and not advertised by BGP and not installed in the routing table.

                      To remedy to this situation there is many solutions including the next-hop-self command telling the router to set the next-hop as its update-source towards the iBGP peer and so this next-hop is then reachable in the AS.

                      Hope this answers your question.

                      For default-route question we need more infos: iBGP only or also eBGP, which other IGP if any.

                       

                      Alain.

                      • 8. Re: BGP Active state
                        Ganesh

                        thanks man!

                        • 9. Re: BGP Active state
                          Brian

                          Aloha Ganesh,

                           

                          You probably should have started a new thread.  My apologies to Stephen.  However, since you already received one reply, let me try and answer your questions.

                           

                          (Q1) Would you please clarify me that if we are using BGP in our enterprise network then is there necessary to configure the default route ????

                           

                          Not always, that depends on if the network is directly connected to you or not.  In the case when it is not directly connected to you, then you must have either static route to this network or be learned via an IGP.

                           

                          When you advertise a network in BGP using the "network" command under the BGP process, you must have an exact match for the network in the IP routing table for BGP to advertise the network.  This can be learned via any IGP (OSPF, EIGRP, RIP, etc) or be a static route.  One of the easiest methods is to use a static route to null 0.  For example, you wish to advertise the following network under BGP,

                          172.16.25.0/24.

                           

                          int s0/0
                          description EBGP PEER TO AS-65002
                          ip add 192.168.1.1 255.255.255.252
                          !
                          router bgp 65001
                          network 172.16.25.0 mask 255.255.255.0
                          neighbor 192.168.1.2 remote-as 65002
                          !
                          ip route 172.16.25.0 255.255.255.0 null 0


                          (Q2) And is there any condition that we are using BGP and still we need to configure static route for the outside network ??

                           

                          Yes, when you are acting as a "transit AS" for a third party AS, then you will need to have a static route to the external outside AS or it must redistribute the external BGP routes into IGP.  Not recommended for the complete BGP table.

                           

                          (Q3) And if there is any documentation that could explain the "next-hop self" concept then plzzz share.

                           

                          IMHO the best source is the Cisco Press book, Routing TCP/IP Volume II, by Jeff Doyle.  It covers BGP really well and you will find some very nice examples.  You can also search Cisco's website for "BGP next-hop self command" .  As cadetalain has pointed out, you use "next-hop-self" command on iBGP peers only, as this is the "default" behavior for eBGP peers.

                           

                          Hope this helps.

                           

                          Brian

                           

                          Message was edited by: Brian