# Internal BGP (Border Gateway Protocol) explained

**URL:** <https://forum.networklessons.com/t/internal-bgp-border-gateway-protocol-explained/1129>\
**Category:** Lessons Discussion\
**Created:** [December 27, 2016, 4:13pm UTC](https://forum.networklessons.com/t/internal-bgp-border-gateway-protocol-explained/1129 "2016-12-27T16:13:05Z")\
**Posts on this page:** 1\
**Showing post:** 183

<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:** [May 28, 2020, 10:12am UTC](https://forum.networklessons.com/t/internal-bgp-border-gateway-protocol-explained/1129/183 "2020-05-28T10:12:56Z")

</div>

Hello Maruti

This is a good question, and is important in order to understand the relationship between IGPs and BGP. Think about it this way. BGP is used to route traffic **between AS’es** while IGPs are used to route traffic **within AS’es**.

Now the next question that usually comes up is “since we’re using iBGP within an AS, why configure OSPF as well?”. Actually, iBGP within an AS **is not used to route the traffic within the AS** , but is used to **share internal routes with the BGP routers on the edge of the AS so that they can advertise them with other BGP routers in other AS’es via eBGP**.

So in order for iBGP to share these routes with all iBGP routers within an AS, routing capabilities between all BGP enabled routers within the AS via an IGP must be established.

Remember that an IGP is always better to use within an AS rather than BGP. You can find out more about why at the following post:

> [@Which protocol should use BGP vs OSPF?](https://forum.networklessons.com/t/which-protocol-should-use-bgp-vs-ospf/1398/2):
>
> Hello David Right of the bat I can tell you that OSPF would be better to use than BGP. Actually, any internal gateway protocol such as OSPF or EIGRP would be preferable to BGP. Why then does Microsoft and other large companies use BGP? It all has to do with size. Here’s a little bit of an explanation: As you know, BGP is used on the Internet and it is very good at routing BETWEEN autonomous systems. (An autonomous system is a network or group of networks under a common administration and …

I hope this has been helpful!

Laz

---

_[View the full topic](https://forum.networklessons.com/t/internal-bgp-border-gateway-protocol-explained/1129)._
