What is iBGP?
Internal BGP
iBGP (Internal BGP) is a BGP session between routers in the same autonomous system, used to share externally learnt routes inside the network.
BGP is one protocol, but it behaves differently depending on whether the neighbour is in your AS. Over iBGP, a router does not add its ASN to the AS_PATH and, by default, does not change the NEXT_HOP, so a route learnt from an external neighbour still points at that neighbour's address when it reaches the rest of the network. Attributes such as LOCAL_PREF travel only over iBGP, which is how a whole AS agrees on an exit point. Because the AS_PATH doesn't grow inside the AS, it can't detect loops there, so iBGP has its own rule: a route learnt from one iBGP peer is never advertised to another iBGP peer. The consequence is that every iBGP router must peer with every other, a full mesh of n(n-1)/2 sessions, unless you use route reflectors or confederations.
In practice iBGP sessions run between loopback addresses, with an IGP such as OSPF carrying those loopbacks, so a session survives the loss of any single link. Two mistakes are classic. The first is the unchanged next hop: inner routers receive routes pointing at an external address they have no route to, so the routes are unusable until the edge router sets next-hop-self or the IGP carries the edge links. The second is expecting routes to pass along a chain of iBGP peers, which the split-horizon rule prevents. Compare eBGP, and see route reflectors for how large networks avoid the full mesh. The BGP Fundamentals lesson explains iBGP scaling, and Edge and core builds iBGP between loopbacks on real routers.
Lessons that use iBGP
- BGP FundamentalsTeaches this term · Intermediate · 75 min
How the Border Gateway Protocol glues the internet together: autonomous systems, sessions, path attributes, best-path selection, iBGP scaling and a hands-on eBGP lab with real FRR configuration.
- Edge and core: building out a VyOS networkIntermediate · 60 min
Split one BGP router into edge routers that face the outside world and a core that carries traffic inside: loopbacks, OSPF for infrastructure, iBGP between loopbacks, next-hop-self, and what happens when a link fails. Built and broken on three real VyOS routers.
- Route reflectors on VyOSIntermediate · 30 min
Replace an iBGP full mesh with route reflectors: see iBGP refuse to pass routes on, turn on reflection, read ORIGINATOR_ID and CLUSTER_LIST, confirm the reflector stays out of the forwarding path, and survive taking one reflector down.
- BGP on loopbacks vs interface addressesIntermediate · 45 min
Why BGP sessions between loopbacks survive link failures and use parallel links, and what they need to work: an IGP or static routes, update-source, the eBGP connected check, and BFD. Every failure is reproduced on two real VyOS routers.
- OSPF FundamentalsBeginner · 70 min
The link-state IGP that runs inside most networks: neighbour adjacencies, LSA flooding, SPF, costs, DR/BDR, areas and LSA types, a hands-on FRR lab, and how OSPF underpins BGP.
- Debugging BGP: every session state, reproducedIntermediate · 60 min
Break a working BGP lab a dozen ways and learn to read each failure: Idle, Connect, Active and OpenSent, max-prefix, firewalls, wrong AS, TTL, hold timers, missing policy and unreachable next hops, all with real FRR output and packet captures.
- BGP communities, prepending and RTBHIntermediate · 45 min
Tag routes with large communities, steer inbound traffic with AS-path prepending (and see why providers' local preference limits it), and stop a DDoS at your provider's edge with remotely triggered blackholing. Built on VyOS with two transit providers, including the two RTBH mistakes the lab made first.