(article yang lama akan coba gw update disini…dan gw coba jelasin in english…biar gaya)
Today we learn about how to configure basic BGP configuration such as,
- e-BGP
- i-BGP (with loopback)
- BGP Full Mesh
- peer-group
- BGP authentication
- And BGP Summarization
And the topology we use throughout this article is like this
Note: IP Scheme is 192.168.XX.X..where XX is the combined number of routers, such as R2 and R3 would be 192.168.23.2 and 23.3
We use OSPF as IGP (Internal) Protocol in AS 1
I already assume you have good understanding how to configure basic IP Configuration on Cisco Router here…
I’m trying to explain step-by-step…including error, note, important detail that I learn when configuring basic BGP Configuration
================================================
Configuring e-BGP
e-BGP (external BGP) = Connecting different BGP AS (Autonomous System)
We configure R1 and R5
Wait a little longer (10-20s)…BGP Convergence is verrrry slooow
To see list of BGP neighbor, we could use show ip bgp summary
to perform eBGP WITHOUT connecting directly…we must use eBGP-multihop (we’ll talk about it in the next parts)
================================================
Configuring i-BGP
i-BGP (internal BGP) = Connecting BGP within AS
We Configure R1 and R3
If R1 peering within AS (i-BGP), we must check wether route to destination peer is exist within routing table (show ip route)
of course…how would R1 know how to deliver BGP Packet (request for Peering with R3) if He doesnt know where to send the packet ?!? *face palm*
So…one of the differences between e-BGP and i-BGP is i-BGP peering routers are not necessary to be directly connected
Configuring i-BGP with Loopback
The question is…if the physical link down…would it be down too with the BGP Peering right ?!?
There are 2 answers: add another physical link to BGP neighborship table, or (the easiest one)…add loopback IP
Because Loopback Interface is never down (remember…this interface is virtual), Loopback Interface will be down if the Router itself down
As long as the routers know how to send packet to loopback IP (acquired via IGP such as OSPF), the neighborship and peering will be fine
To configure i-BGP with loopback, delete neighborship with physical interface first (no neighbor [physical IP] remote-as [AS Number])
the keyword is update-source [interface]
Lets verify the list of the neighbors
=====================================================
BGP Full Mesh
Now…R1 peering with R5 (e-BGP) and R1 peering with R3 (i-BGP)
The next task is…will R3 reach R5 without extra configuration ?!?
Both R3 and R5 connect to R1. To reach R5 (or R3), R1 must advertise the route to both Routers, lets see if R1 advertise rute 10.10.15.1 to R3 (show ip bgp)
The rules of advertising rute is same like i-BGP peering…He must know the route to it/destination
When we see the configuration above, maybe one or two of us will ask the same question
Why 23.0 use mask…why 34.0 not ?!? the answer is…it doesnt matter, it still same result
If we only advertise network WITHOUT mask…BGP will assume that route is classfull (and 192.168.34.0 is classful right ?!? C Class IP)
Note…if we use network 0.0.0.0 mask 0.0.0.0 (some of you will do it because of laziness…JUST ADD ALL !! haha)
The result is not what you are thinking…the router will advertise DEFAULT ROUTE !!! (just think of it…0.0.0.0 0.0.0.0 is default route right ?!?)
So…the way we handle advertised route in BGP is different than IGP such as OSPF
Now lets see if R3 (also R5 will get the same result) get the advertised route…
Lets ping
Ping to R5 10.10.15.5 success, but will it be the same if R3 ping to one of R5 loopback IP such as 5.5.5.5 ?!?
Why is this happen ?? when R3 ping to 10.10.15.5 which is R5, R1 know where to route the packet (directly connected, exist in R1’s routing table)
But when R3 ping to R5 5.5.5.5 loopback IP, lets see R1 routing table
Now we know the problem (5.5.5.5 doesnt exist in R1’s Routing table)…so what is the solution ?!?
Because R1 doesnt know how to route the packet…we must add static route to R5 loopback ip, then see if that static route exist in routing table, advertise using BGP, check using show ip bgp
Lets check on R3…will it be able to ping loopback ip on R5 ?!?
Unreachable…the packets stop on R2 (23.2) and R4 (34.4)
Why is this happen ?!? because R2 and R4 doesnt know where to route the packets !!! (of course…they doesnt know where the F*** 5.5.5.5 is !!!)
The solution ?!? make R2 (and R4) run BGP too (5.5.5.5 acquired via BGP right ?!?)
“To make sure a proper BGP implementation, we must configure all router to run BGP? is it like another route protocol?”
yes, just like EIGRP and OSPF, BGP is another type of routing protocol right ?!? but this protocol is more suitable in ISP environment
Note: same config apply ro R4, R3, R1
Let see…
But..there is some question…i-BGP peering doesnt need to be directly connected, but now we connect all of them
Isn’t it waste of energy and time ?!?! yes…this is what we called i-BGP Full Mesh
So…imagine if there is more than 4 router…
The formula is n(n-1)/2..where N = sum of all router
So..if there is 25 router..it would be 600 peerings !!!
To overcome this complicated BGP Behavior…BGP has features called Route-Reflector and Route Confederation (later we’ll configure them)
=========================================
BGP Peer-Group
Imagine you type all this…
To reduce that repetition…BGP has feature called Peer-Group
Let me show you the example
============================================================================
BGP Authentication
Its quite simple (lets keep it simple though wkwkwk)
BGP Default authentication is using MD5
===========================================================================
BGP Summarization
BGP auto-summarization is off by default
BGP Summarize route using aggregate command
Lets advertise loopbacks IP from R5
Lets see on R1
dont worry about 5.0.0.0 below 3.3.3.3, I’m advertised static route into BGP remember…thats why that network exist
To reduce routing table and bgp “show ip bgp” table, on R5 we must use route aggregation
Lets see the effect on R1
Whoops…nothing change…except there is “*> “…a blank network
So…we must add a little command here (summary-only)
And the effect…
Yuppp…it works…
See the last line…S 5.0.0.0 [1/0]…its static (S)…not BGP (B), why ?!? because Static Route AD (Administrative Distance) is better than BGP
So…can it be pinged ?!?…yes, sure it can
Thats all folks for today…part 2 coming soon (BGP Route Modification with Path Attributes) insya Allah
Jan 18, 2017 @ 08:49:27
Mas kalau konfigurasi iBGP,sebelumnya harus udah dikonfig pakai routing protocol lain ya?
Feb 01, 2017 @ 15:25:46
iya…minimal static route
Feb 24, 2017 @ 14:34:28
alesannya knpa ya?? bisa di jelasin knpa musti ada routeing protocol lain.
Mar 04, 2017 @ 12:33:06
klo topologinya komplek (which is BGP often implemented), untuk ngirim packet BGP hello-nya harus minta protocol lain anterin
karena antar BGP speaker belum tentu directly connected…
Jul 17, 2017 @ 10:56:06
mau nanya mas, di contoh kan dalam AS 1 ada 4 router (R1,R2,R3 dan R4). Kalau misalnya hanya ada 2 router (R1 dan R2) saja apa perlu di static route? karena kan itu sudah directly connected? mohon pencerahannya thx
Jul 17, 2017 @ 11:04:40
oiya tambahan pertanyaan lagi mas, itu saat config iBGP nya tidak di set router-id ya di R2,R3 dan R4 nya?
Aug 02, 2017 @ 18:02:36
iya
Aug 02, 2017 @ 18:02:20
klo direct connected ga perlu…jadi anggepannya kek PC langsung konek ke PC lain
Mar 23, 2020 @ 09:06:15
Mas Miftah, BTW untuk ngonfig sampai iBGP di atas apakah pakai packet tracer juga?
Denger2 packet tracer ga support untuk iBGP. Thx
Mar 31, 2020 @ 02:41:46
memang belum support
Apr 03, 2020 @ 16:43:57
So di atas pakai apa mas? GNS3?
Apr 13, 2020 @ 19:02:01
iya