R1:
R1(config)#interface gigabitEthernet 0/0
R1(config-if)#description **Connected to R2**
R1(config-if)#ip address 1.1.1.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#
R1(config)#interface gigabitEthernet 0/1
R1(config-if)#description **LAN**
R1(config-if)#ip address 10.1.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#
R2:
R2(config)#interface gigabitEthernet 0/0
R2(config-if)#description **Connected to R1**
R2(config-if)#ip address 1.1.1.2 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#
R2(config)#interface gigabitEthernet 0/1
R2(config-if)#description **LAN**
R2(config-if)#ip address 10.2.2.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#
Sekarang, mari beralih ke bagian eBGP. Kita perlu mengkonfigurasi nomor AS, dan kemudian kita perlu menambahkan IP peer bgp kita dan itu nomor AS sebagai tetangga kita, seperti di bawah ini.
R1: R1(config)#router bgp 100 R1(config-router)#neighbor 1.1.1.2 remote-as 200 R2: R2(config)#router bgp 200 R2(config-router)#neighbor 1.1.1.1 remote-as 100
Setelah mengkonfigurasi di atas, Anda akan melihat pesan log di layar CLI akan keluar output
*Des 29 17:09:26.053: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Up
Artinya, kita telah berhasil mengkonfigurasi eBGP. Kita dapat memverifikasi dengan menggunakan perintah “show ip bgp summary”.
R1#show ip bgp summary BGP router identifier 10.1.1.1, local AS number 100 BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 1.1.1.2 4 200 17 17 1 0 0 00:12:31 0 R1#
Jika kita ingin melihat lebih detail tentang peer bgp kita, kita bisa menggunakan “show ip bgp neighbours {neighbour_IP}”.
R1#show ip bgp neighbors 1.1.1.2 BGP neighbor is 1.1.1.2, remote AS 200, external link BGP version 4, remote router ID 10.2.2.1 BGP state = Established, up for 00:03:44 Last read 00:00:39, last write 00:00:48, hold time is 180, keepalive interval is 60 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
ini jelas menunjukkan bahwa ebgp peer kami dengan 1.1.1.2 dalam status "Established" (pelajari tentang status bgp dari ciscopress) dan hingga 00:03:44 terakhir.
Meskipun bgp peer kita aktif, tetapi kita tidak akan dapat menjangkau Network 10.2.2.0/24 dari R1. Itu karena masih belum menemukan Network di router mana pun. Jadi mari kita konfigurasikan juga
R1: R1(config)#router bgp 100 R1(config-router)#network 10.1.1.0 mask 255.255.255.0 R2: R2(config)#router bgp 200 R2(config-router)#network 10.2.2.0 mask 255.255.255.0
Jika kita menggunakan perintah "show ip bgp summary" sekali lagi, kita akan melihat 1 prefiks telah diterima.
R1#show ip bgp summary
BGP router identifier 10.1.1.1, local AS number 100
BGP table version is 3, main routing table version 3
2 network entries using 288 bytes of memory
2 path entries using 160 bytes of memory
2/2 BGP path/bestpath attribute entries using 304 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 776 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1.1.1.2 4 200 13 13 3 0 0 00:08:46 1
Kita dapat memeriksa prefiks mana yang telah kita advertise dan di terima dengan menggunakan perintah di bawah ini.
show ip bgp neighbors 1.1.1.2 advertised-routes show ip bgp neighbors 1.1.1.2 received-routes
Mari kita periksa, apa yang telah kita advertised
R1#show ip bgp neighbors 1.1.1.2 advertised-routes
BGP table version is 3, local router ID is 10.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
*> 10.1.1.0/24 0.0.0.0 0 32768 i
Total number of prefixes 1
Sekarang, waktunya untuk mengecek rute yang diterima. Namun, jika kita tidak memiliki konfigurasi "soft reconfiguration inbound" di router kita maka muncul pesan kesalahan
R1#show ip bgp neighbors 1.1.1.2 received-routes % Inbound soft reconfiguration not enabled on 1.1.1.2
Ini akan berhasil sekarang. Mari kita verifikasi.
R1#show ip bgp neighbors 1.1.1.2 received-routes
BGP table version is 3, local router ID is 10.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
*> 10.2.2.0/24 1.1.1.2 0 0 200 i
Total number of prefixes 1
Terakhir, lakukan ping dari network 10.1.1.0/24 ke network 10.2.2.0/24.
PC-1> ping 10.2.2.10 84 bytes from 10.2.2.10 icmp_seq=1 ttl=62 time=28.496 ms 84 bytes from 10.2.2.10 icmp_seq=2 ttl=62 time=6.338 ms 84 bytes from 10.2.2.10 icmp_seq=3 ttl=62 time=5.665 ms 84 bytes from 10.2.2.10 icmp_seq=4 ttl=62 time=4.681 ms 84 bytes from 10.2.2.10 icmp_seq=5 ttl=62 time=39.395 ms
Selesai, Untuk konfigurasi eBGP telah berhasil. Untuk lain waktu saya akan bahas lebih dalam lagi mengenai BGP ini
Referensi https://www.letsconfig.com
Post a Comment