Seperti yang sudah kalian ketahui dan pernah saya jelaskan juga pada BGP Introduction bahwa BGP berbada dengan routing protocol lainnya, BGP tidak akan mengirim hello packet secara otomatis untuk establishment nya. BGP memerlukan peering session agar TCP port 179 yang digunakan BGP active dan mengirim hello packet. ada 2 peering method pada BGP :
- internal BGP (iBGP)
- external BGP (eBGP)
Example
internal BGP (eBGP)
Router_A(config)#router bgp 65530
Router_A(config-router)#network 1.1.1.1 mask 255.255.255.255
Router_A(config-router)#network 123.45.67.0 mask 255.255.255.252
Router_A(config-router)#neighbor 123.45.67.2 remote-as 65530
Router_B(config)#router bgp 65530Untuk advertise network pada BGP gunakan format
Router_B(config-router)#network 2.2.2.2 mask 255.255.255.255
Router_B(config-router)#network 123.45.67.0 mask 255.255.255.252
Router_B(config-router)#neighbor 123.45.67.1 remote-as 65530
network network-number [mask network-mask] [route-map route-map-name]Untuk peering session nya gunakan ip dan AS Number neighbor nya. Terlihat remote-as yang saya gunakan sama di kedua sisi router, yaitu 65530. Yang berarti disini saya melakukan iBGP peering.
neighbor ip-address remote-as autonomous-system-numbersetelah melakukan peering, BGP akan melakukan proses peer session establishment sampai akhir nya BGP established.
Router_A#
*Jan 4 14:20:51.627: %BGP-5-ADJCHANGE: neighbor 123.45.67.2 Up
Router_B#Jika sudah muncul notice seperti di atas berarti BGP sudah established, bisa kita verifikasi dengan
*Jan 4 14:20:48.391: %SYS-5-CONFIG_I: Configured from console by console
Router_A#show ip bgp summaryDari hasil verif di atas terlihat Neighbor 123.45.67.2 dengan remote-as 65530 sudah established 54sec yang lalu dan menerima 2 prefix dari neighbor nya. Untuk informasi yang lainnya bisa di lihat sendiri.
BGP router identifier 1.1.1.1, local AS number 65530
BGP table version is 4, main routing table version 4
3 network entries using 432 bytes of memory
4 path entries using 320 bytes of memory
2/2 BGP path/bestpath attribute entries using 272 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1024 total bytes of memory
BGP activity 3/0 prefixes, 4/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
123.45.67.2 4 65530 7 6 4 0 0 00:00:54 2
BGP juga memiliki table routing nya sendiri. Sedikit berbeda dengan table routing biasanya. dalam table routing BGP memiki informasi tambahan seperti attribute, path, metric.
Router_A#show ip bgpDari table routing di atas terlihat BGP yang running di router A sudah menerima prefix dari neighbornya, coba kita verifikasi dengan test ping apakah network tersebut sudah reachable atau belum
BGP table version is 4, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 0.0.0.0 0 32768 i
*>i 2.2.2.2/32 123.45.67.2 0 100 0 i
* i 123.45.67.0/30 123.45.67.2 0 100 0 i
*> 0.0.0.0 0 32768 i
Router_A#ping 2.2.2.2Untuk menampilkan information TCP dan BGP connection ke neighbor nya
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/11/16 ms
Router_A#traceroute 2.2.2.2
Type escape sequence to abort.
Tracing the route to 2.2.2.2
VRF info: (vrf in name/id, vrf out name/id)
1 123.45.67.2 4 msec 12 msec *
Router_A#show ip bgp neighborsOutput yang di tampilkan dari show ip bgp neighbor cukup lengkap, seperti neighbor, remote as, type BGP, BGP version dan lainnya. Untuk output yang jauh lebih lengkap lagi bisa kalian coba sendiri.
BGP neighbor is 123.45.67.2, remote AS 65530, internal link
BGP version 4, remote router ID 2.2.2.2
BGP state = Established, up for 00:03:36
Last read 00:00:16, last write 00:00:22, hold time is 120, keepalive interval is 30 seconds
Configured hold time is 120, keepalive interval is 30 seconds
Minimum holdtime from neighbor is 0 seconds
Neighbor sessions:
1 active, is not multisession capable (disabled)
Neighbor capabilities:
Route refresh: advertised and received(new)
Four-octets ASN Capability: advertised and received
Address family IPv4 Unicast: advertised and received
Enhanced Refresh Capability: advertised and received
Multisession Capability:
Stateful switchover support enabled: NO for session 1
--More--
external BGP (eBGP)
Dari segi configurasi tidak berbada jauh dengan peering iBGP, kita cukup ubah remote-as nya sesuai BGP AS number mana yang akan kita peering.
Router_A(config)#router bgp 65531
Router_A(config-router)#network 1.1.1.1 mask 255.255.255.255
Router_A(config-router)#network 123.45.67.0 mask 255.255.255.252
Router_A(config-router)#neighbor 123.45.67.2 remote-as 65532
Router_B(config)#router bgp 65532Jika sudah muncul notice seperti sebelum nya, berarti BGP sudah established.
Router_B(config-router)#network 2.2.2.2 mask 255.255.255.255
Router_B(config-router)#network 123.45.67.0 mask 255.255.255.252
Router_B(config-router)#neighbor 123.45.67.1 remote-as 65531
Router_A(config)#
*Jan 4 14:33:40.267: %BGP-5-ADJCHANGE: neighbor 123.45.67.2 Up
Router_B(config-router)#Coba kita verifikasi kembali BGP peering session nya.
*Jan 4 14:33:39.775: %BGP-5-ADJCHANGE: neighbor 123.45.67.1 Up
Router_A#show ip bgp summaryOke BGP peering sudah established, bisa di lihat remote-as nya 65532 dari local AS 65531 yang berarti ini adalah eBGP. Coba kita lihat prefix apa saja yang kita dapat.
BGP router identifier 1.1.1.1, local AS number 65531
BGP table version is 4, main routing table version 4
3 network entries using 432 bytes of memory
4 path entries using 320 bytes of memory
2/2 BGP path/bestpath attribute entries using 272 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1048 total bytes of memory
BGP activity 3/0 prefixes, 4/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
123.45.67.2 4 65532 20 19 4 0 0 00:07:00 2
Router_A#show ip bgpBisa di lihat kita mendapat 2 prefix yang path nya melewati AS 65532. Coba kita verifikasi dengan ping, apakah network nya reachable atau tidak.
BGP table version is 4, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 0.0.0.0 0 32768 i
*> 2.2.2.2/32 123.45.67.2 0 0 65532 i
* 123.45.67.0/30 123.45.67.2 0 0 65532 i
*> 0.0.0.0 0 32768 i
Router_A#ping 2.2.2.2Ping success, coba kita verif BGP neighbor nya.
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/11/16 ms
Router_A#traceroute 2.2.2.2
Type escape sequence to abort.
Tracing the route to 2.2.2.2
VRF info: (vrf in name/id, vrf out name/id)
1 123.45.67.2 4 msec 12 msec *
Router_A#show ip bgp neighborsoutput yang di keluarkan ada tulisan "external link" yang berarti neighbor nya menggunakan AS number yang berbeda, selebihnya bisa kalian coba sendiri.
BGP neighbor is 123.45.67.2, remote AS 65532, external link
BGP version 4, remote router ID 2.2.2.2
BGP state = Established, up for 00:07:57
Last read 00:00:06, last write 00:00:27, hold time is 120, keepalive interval is 30 seconds
Configured hold time is 120, keepalive interval is 30 seconds
Minimum holdtime from neighbor is 0 seconds
Neighbor sessions:
1 active, is not multisession capable (disabled)
Neighbor capabilities:
Route refresh: advertised and received(new)
Four-octets ASN Capability: advertised and received
Address family IPv4 Unicast: advertised and received
Enhanced Refresh Capability: advertised and received
Multisession Capability:
Stateful switchover support enabled: NO for session 1
--More--



0 comments:
Posting Komentar