How to Read the BGP Table

Thanks a lot Laz, I had the same doubt as Renuka’s.

Great explanation!

1 Like

HI
Could you please explain difference between routing table and bgp table.

Hello Kanu R.

Not sure if you’ve covered other routing protocols but if you didn’t, I heavily recommend it.

Every protocol maintains some sort of table or database that contains everything that protocol knows about (OSPF - LSDB, EIGRP - Topology Table).

If you take a look at Rene’s lesson


You can see that the BGP table contains information about the networks that BGP knows about, how to reach them, and what are the path attributes for each possible path. It also displays whether the route is valid, invalid, suppressed, and so on. For example, the > symbol indicates that this path is considered the best by the BGP’s Path Selection process.

So yes, the BGP table contains information about networks that BGP knows about along with the path attributes and possible paths to reach those networks.

Now, when it comes to the routing table. The routing table is the place where the best path to reach the network is installed.
obrázok
So although BGP had two possible paths (one over 192.168.12.2 and one over 192.168.13.3) to reach 4.4.4.4/32, it considered the path over 192.168.12.2 the best (as indicated by the > symbol) and this was installed into the routing table. The routing table is then used to make forwarding decisions.

So in summary, the BGP table contains information about every network BGP knows about and about every possible path to reach them while the routing table contains the best path/route to reach the specific prefix. So the best route in the BGP table is grabbed and installed into the routing table which is then used to make forwarding decisions.

The routing table can have routes from many different sources, it doesn’t have to be just BGP.

If anything is still unclear, please let me know.

David

1 Like

Thanks .Now it is clear to me. one more question: how can we find out behind networks in route summarization. let’s say if we have a summarized route .

172.16.0.0 /13

how to calculate in decimal behind networks in it.or any calculator from where we can find it.

Hello Kanu

As usual, @davidilles has answered this question very well!! If I could summarize, the BGP table is a construct that contains information about all BGP routes that a router has learned about. Using specific rules (comparing BGP attributes etc), the BGP table displays the best path for each destination. That best path is then used as a candidate to be installed in the routing table.

To learn more about the process by which the routing table is populated, take a look at this NetworkLessons note.

I hope this has been helpful!

Laz

1 Like

Thank you for the clarification!
Answer of below query is still pending.

how can we find out behind networks in route summarization. let’s say if we have a summarized route .

172.16.0.0 /13

how to calculate in decimal behind networks in it.or any calculator from where we can find it.

Hello Kanu

When we have a summary route like the one you shared in your post, we usually calculate it based on the networks that we have behind it. The following lesson describes how to create such a summary route:

However, if you are given a summary route of 172.6.0.0/13, for example, and you need to find out what specific networks this summary route serves, there is no way to do this. The only way you can find out these networks is to examine the addressing scheme of the network in question.

Remember, the configured summary route is derived from the networks found behind the router, and not the other way around.

I hope this has been helpful!

Laz

ok ,you mean to say there is no way to find out no. of networks behind 1 summary route.

Hello Kanu

Yes that is correct. The only way to find out what routes are being included in that summary is to go into all the routers and see the networks that have been configured to be advertised.

Now that I think about it, another workaround would be to remove any summarization, and see what routes are being advertised. Whether or not you can do that depends upon where the summarization is applied and if that device belongs to your authority or belongs to another organization. Does that make sense?

I hope this has been helpful!

Laz

Hello Rene,

when you do R1#show ip bgp 4.4.4.4, why the best path is showing as:

192.168.12.2 from 192.168.12.2 (192.168.24.2)
      Origin IGP, localpref 100, valid, external, best

which is riuter 2 why best path is not selected from router 3?

Hello Rouzbeh

The full output for the BGP entry you are referring to is this:

R1#show ip bgp 4.4.4.4
BGP routing table entry for 4.4.4.4/32, version 2
Paths: (2 available, best #2, table Default-IP-Routing-Table)
  Advertised to update-groups:
        1
  3 4
    192.168.13.3 from 192.168.13.3 (192.168.34.3)
      Origin IGP, localpref 100, valid, external
  2 4
    192.168.12.2 from 192.168.12.2 (192.168.24.2)
      Origin IGP, localpref 100, valid, external, best

The BGP path selection algorithm in this case would find that all attributes are a tie except for the second to last one, which is the Router ID. This states that a BGP router will prefer the path via the neighbor with the lowest BGP router ID.

In the output above, you can see the router ID of each neighbor in the brackets. The best path is the one with the lower router ID. (192.168.24.2) which is R2 is preferred over (192.168.34.3) which is R3. Does that make sense?

I hope this has been helpful!

Laz

Output: I want to know if both the paths have the same AS numbers, on what basis it has selected the best path via R3? I am guessing on the basis of the highest router id of R3 than R2?

R1#show ip bgp
BGP table version is 2, local router ID is 192.168.13.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*  4.4.4.4/32       192.168.13.3                           0 3 4 i
*>                  192.168.12.2                           0 2 4 i

Hello Ishtiaqahmed811

You can see the AS path for each one is “3 4”. The rightmost value in the AS path is the originating AS. So in your case, both routes originated in AS 4.

I believe you are correct that it is the highest router ID. However, the BGP table doesn’t give enough information to confirm this. You would have to issue the show ip bgp 4.4.4.4 command to see the router IDs of both routers and to determine this. Does that make sense?

I hope this has been helpful!

Laz

Thank you so much for your response. Very helpful input.

1 Like