4

enter image description here

in above diagram neighbor relationship/peer relations are so

R1--->R2 
R1--->R3

R2 and R3 are not directly or even indirectly (through R1)peer

R2--->R4
R3--->R6

R4 and R6 are not connected so they are no peers

R4--->R5
R6--->R7
R5--->R7

no problem so far, everything works just fine, R2 sees both 55.55 networks of AS 2000 and 77.77 networks of AS 1000,through their just one and only exit interfaces!!

R2#show ip bgp

   Network          Next Hop             Metric LocPrf Weight Path
> 55.55.1.0/24     10.1.24.4             0 3000 2000 i
> 55.55.2.0/24     10.1.24.4             0 3000 2000 i
> 77.77.1.0/24     10.1.24.4             0 3000 2000 1000 i
> 77.77.2.0/24     10.1.24.4             0 3000 2000 1000 i

R3#sh ip bgp

   Network          Next Hop             Metric LocPrf Weight Path
> 55.55.1.0/24     10.1.36.6             0 3000 1000 2000 i
> 55.55.2.0/24     10.1.36.6             0 3000 1000 2000 i
> 77.77.1.0/24     10.1.36.6             0 3000 1000 i
> 77.77.2.0/24     10.1.36.6             0 3000 1000 i

but the problem is when I add a link between R2 and R3 and make them peer instead of seeing 2 path to each of 55.55 and 77.77 network they just see one of them like that(2 paths) and for the other one just on path I mean

R2(config-router)#do sh ip bgp

   Network          Next Hop            Metric LocPrf Weight Path
> 55.55.1.0/24     10.1.24.4             0 3000 2000 i
> 55.55.2.0/24     10.1.24.4             0 3000 2000 i
>i77.77.1.0/24     10.1.23.3             0    100   0 3000 1000 i
                   10.1.24.4             0 3000 2000 1000 i
>i77.77.2.0/24     10.1.23.3             0    100   0 3000 1000 i
                   10.1.24.4             0 3000 2000 1000 i

to my understanding R2 supposed to learn 55.55 networks through R3 as well I mean from this path R3-->R6-->R7-->R5 since these routers are peer and R6 also has got the routes to 55.55 network and R7 got those too and so on, why we do not see a path through that way? and also on R3

R3(config-router)#do sh ip bgp

   Network          Next Hop            Metric LocPrf Weight Path
>i55.55.1.0/24     10.1.23.2                0    100      0 3000 2000 i
                   10.1.36.6                0 3000 1000 2000 i
>i55.55.2.0/24     10.1.23.2                0    100      0 3000 2000 i
                   10.1.36.6                0 3000 1000 2000 i
> 77.77.1.0/24     10.1.36.6                0 3000 1000 i
> 77.77.2.0/24     10.1.36.6                0 3000 1000 i

and also R3 supposed to learn 77.77 networks through R2 as well I mean R2-->R4-->R5-->R7 but why this is not happening? BTW I know the best practice is to have full iBGP between routers in the AS and also I know that we'd better have direct link between those edge routers so that no need to state or overstate the obvious best practices just answer the question straight to the point thanks.

7

You don't say which hardware you're using but in general BGP will only choose one best path. The one you're seeing is what BGP on the respective router has chosen as the best path. If this path becomes unavailable the router will choose another path. For example if the link between R2 and R4 fails R2 will choose the path via R3->R6 and so on.

On Cisco devices you can see all available paths for a prefix by using show ip bgp 55.55.2.0/24.

Also if the router receives a better path from another iBGP peer then it will not send its suboptimal path to that router. This would explain why you only see one path at all. If you want to always announce the best external/eBGP path to other iBGP routers, you can (on Cisco) use the bgp advertise-best-external command.

Mind you, all this assumes that you have standard iBGP setup with BGP sessions over loopback IPs and all BGP next-hops are reachable (directly or via some sort if IGP).

Also Cisco has a good description of the BGP path selection process that might help you understand further why the routers chose this path.

Your Example

You establish the BGP Session between R2 and R3. What happens now?

R2 receives the following path information from R3:

  • 55.55.1.0/24 AS_PATH: 3000 1000 2000
  • 55.55.2.0/24 AS_PATH: 3000 1000 2000
  • 77.77.1.0/24 AS_PATH: 3000 1000
  • 77.77.2.0/24 AS_PATH: 3000 1000

R3 receives the following path information from R2:

  • 55.55.1.0/24 AS_PATH: 3000 2000
  • 55.55.2.0/24 AS_PATH: 3000 2000
  • 77.77.1.0/24 AS_PATH: 3000 2000 1000
  • 77.77.2.0/24 AS_PATH: 3000 2000 1000

R2 runs it's best path algorithm:

It has the shorter AS_PATH (3000 2000) for 55.55.1.0/24 & 55.55.2.0/24 so it will continue to use this path over the one received from R3 (3000 1000 2000).

For 77.77.1.0/24 & 77.77.2.0/24 it received a better path (3000 1000) from R3 so it will use this path. R2 will now send a withdrawal for both prefixes with its old best path (3000 2000 1000) to R3 because it's no longer the best path! The old best path from the eBGP peer is still present in R2s RIB but it's no longer the active path.

As soon as R3 receives the withdrawals it will remove the paths from its RIB.

R3 runs it's best path algorithm:

R3 does the same as R2 only for R3 its the other way round. It gets new best paths for 55.55.1.0/24 & 55.55.2.0/24 from R2 so it sends withdrawal for the old paths to R2.

As soon as R2 receives the withdrawals it will remove the paths from its RIB.

The BGP table on both routers has now settled in the state that you have shown.

| improve this answer | |
  • thanks for your helpful answer,Ok I know BGP will finally utilize only one path, let me put it this way Im not asking why duplicate path in mentioned diagram are not in global routing table! I'm asking why they are not present in BGP Table,I think all possible path got into BGP Table first then BGP choose one,but in this case we do not see those duplicate paths in BGP Table(not in router global RT),so why? – user7741 Jul 30 '14 at 15:05
  • Because the router where you're looking at the BGP table has the best path so the other router is not sending him his inferior path. As explained, try using the "bgp advertise-best-external" command (IF you use Cisco) and see if the path turns up. – Sebastian Wiesinger Jul 30 '14 at 17:57
  • we should have in BGP table as I said both paths, one listed as valid and preferred best and one just as valid, there is a difference between BGP Table and Route Table, what u saying is right about the BGP function about choosing just one path but the routers send their entire topology table(BGP table) to their neighbors, the full table, they send full table and let the router itself choose the best one based on the "BGP route/path selection criteria" routers do NOT send just their best path it's their entire table which is supposed to be sent, but in here I don't know what's going on,thx – user7741 Jul 30 '14 at 18:54
  • 1
    Believe me, the routers do not send their entire BGP table. They only send the best path for each prefix to their neighbors. This can be changed with the relatively new "Add Paths" BGP feature. Just google "bgp add path" – Sebastian Wiesinger Jul 30 '14 at 19:01
  • You came here for help so why don't you just try the bgp advertise-best-external command and see what happens? – Sebastian Wiesinger Jul 30 '14 at 19:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.