# How to Read the BGP Table

**URL:** https://forum.networklessons.com/t/how-to-read-the-bgp-table/1234
**Category:** Lessons Discussion
**Created:** [December 29, 2016, 5:32pm UTC](https://forum.networklessons.com/t/how-to-read-the-bgp-table/1234 "2016-12-29T17:32:52Z")
**Posts on this page:** 14
**Page:** 4

<div class="post-metadata">

### Author: ![aronnericchiuto](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aronnericchiuto](https://forum.networklessons.com/u/aronnericchiuto)
#### Post date: [August 12, 2023, 2:50pm UTC](https://forum.networklessons.com/t/how-to-read-the-bgp-table/1234/61 "2023-08-12T14:50:37Z")

</div>

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

Great explanation!

---

<div class="post-metadata">

### Author: ![kanu.rattan](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/k/a8b319/32.png) [@kanu.rattan](https://forum.networklessons.com/u/kanu.rattan)
#### Post date: [June 17, 2024, 8:50am UTC](https://forum.networklessons.com/t/how-to-read-the-bgp-table/1234/62 "2024-06-17T08:50:50Z")

</div>

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

---

<div class="post-metadata">

### Author: ![davidilles](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/davidilles/32/9686_2.png) [@davidilles](https://forum.networklessons.com/u/davidilles)
#### Post date: [June 17, 2024, 9:13am UTC](https://forum.networklessons.com/t/how-to-read-the-bgp-table/1234/63 "2024-06-17T09:13:35Z")

</div>

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

 ![bgp-as1-as2-as3-as41](https://forum.networklessons.com/uploads/default/original/2X/5/51d59e95a9a87465a45abf43880b655007ff19a9.png)  
 ![obrázok](https://forum.networklessons.com/uploads/default/original/2X/2/2c99115f34f8327631af634ce5c4ac45ba1031fe.png)

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](https://forum.networklessons.com/uploads/default/original/2X/6/6487587a44ce5d24ead5265427cafefa8085a5ca.png)  
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

---

<div class="post-metadata">

### Author: ![kanu.rattan](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/k/a8b319/32.png) [@kanu.rattan](https://forum.networklessons.com/u/kanu.rattan)
#### Post date: [June 17, 2024, 10:35am UTC](https://forum.networklessons.com/t/how-to-read-the-bgp-table/1234/64 "2024-06-17T10:35:17Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)
#### Post date: [June 18, 2024, 5:31am UTC](https://forum.networklessons.com/t/how-to-read-the-bgp-table/1234/65 "2024-06-18T05:31:59Z")

</div>

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](https://notes.networklessons.com/routing-how-the-routing-table-is-populated).

I hope this has been helpful!

Laz

---

<div class="post-metadata">

### Author: ![kanu.rattan](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/k/a8b319/32.png) [@kanu.rattan](https://forum.networklessons.com/u/kanu.rattan)
#### Post date: [June 18, 2024, 6:39am UTC](https://forum.networklessons.com/t/how-to-read-the-bgp-table/1234/67 "2024-06-18T06:39:40Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)
#### Post date: [June 19, 2024, 6:10am UTC](https://forum.networklessons.com/t/how-to-read-the-bgp-table/1234/68 "2024-06-19T06:10:51Z")

</div>

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:

> **[Introduction to Route Summarization](https://networklessons.com/rip/introduction-route-summarization)**
>
> Summarization (route aggregation or supernetting) means we advertise a single summary route that represents multiple networks. This lesson explains it all.

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

---

<div class="post-metadata">

### Author: ![kanu.rattan](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/k/a8b319/32.png) [@kanu.rattan](https://forum.networklessons.com/u/kanu.rattan)
#### Post date: [June 19, 2024, 10:11am UTC](https://forum.networklessons.com/t/how-to-read-the-bgp-table/1234/69 "2024-06-19T10:11:55Z")

</div>

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

---

<div class="post-metadata">

### Author: ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)
#### Post date: [June 24, 2024, 12:27pm UTC](https://forum.networklessons.com/t/how-to-read-the-bgp-table/1234/70 "2024-06-24T12:27:12Z")

</div>

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

---

<div class="post-metadata">

### Author: ![rtsask](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/r/e5b9ba/32.png) [@rtsask](https://forum.networklessons.com/u/rtsask)
#### Post date: [October 12, 2025, 5:53pm UTC](https://forum.networklessons.com/t/how-to-read-the-bgp-table/1234/71 "2025-10-12T17:53:47Z")

</div>

Hello Rene,

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

```auto
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?

```

---

<div class="post-metadata">

### Author: ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)
#### Post date: [October 13, 2025, 4:35am UTC](https://forum.networklessons.com/t/how-to-read-the-bgp-table/1234/72 "2025-10-13T04:35:24Z")

</div>

Hello Rouzbeh

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

```auto
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](https://networklessons.com/bgp/bgp-attributes-and-path-selection) 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

---

<div class="post-metadata">

### Author: ![ishtiaqahmed811](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/i/7ea924/32.png) [@ishtiaqahmed811](https://forum.networklessons.com/u/ishtiaqahmed811)
#### Post date: [November 24, 2025, 2:32am UTC](https://forum.networklessons.com/t/how-to-read-the-bgp-table/1234/73 "2025-11-24T02:32:16Z")

</div>

[https://networklessons.com/cisco/ccie-enterprise-infrastructurehow-to-read-the-bgp-table](https://networklessons.com/cisco/ccie-enterprise-infrastructurehow-to-read-the-bgp-table)

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?

```auto
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

```

---

<div class="post-metadata">

### Author: ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)
#### Post date: [November 26, 2025, 5:28am UTC](https://forum.networklessons.com/t/how-to-read-the-bgp-table/1234/74 "2025-11-26T05:28:51Z")

</div>

Hello Ishtiaqahmed811

> [@BGP output](https://forum.networklessons.com/t/bgp-output/58750/1):
>
> I want to know if both the paths have the same AS numbers

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.

> [@BGP output](https://forum.networklessons.com/t/bgp-output/58750/1):
>
> on what basis it has selected the best path via R3?

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

---

<div class="post-metadata">

### Author: ![ishtiaqahmed811](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/i/7ea924/32.png) [@ishtiaqahmed811](https://forum.networklessons.com/u/ishtiaqahmed811)
#### Post date: [November 26, 2025, 6:24am UTC](https://forum.networklessons.com/t/how-to-read-the-bgp-table/1234/75 "2025-11-26T06:24:10Z")

</div>

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

[Previous page](https://forum.networklessons.com/t/how-to-read-the-bgp-table/1234.md?page=3)
