Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| networking:cisco:bgp-basic [2026/02/04 22:11] – [Syntax] ilyasa | networking:cisco:bgp-basic [2026/02/04 22:27] (current) – [Cisco : Border Gateway Protocol [U]] ilyasa | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| {{indexmenu_n> | {{indexmenu_n> | ||
| - | ====== Cisco : Border Gateway Protocol | + | ====== Cisco : Border Gateway Protocol ====== |
| * **Apa itu BGP?** | * **Apa itu BGP?** | ||
| Border Gateway Protocol (BGP) adalah protokol routing yang menjadi tulang punggung komunikasi di Internet. BGP bertugas mengelola lalu lintas antar jaringan atau Autonomous System (AS), dengan memilih jalur terbaik untuk mengirimkan data ke tujuan tertentu. Dengan BGP, router dapat bertukar informasi tentang rute mana yang lebih efisien dan andal untuk mencapai jaringan lain, memungkinkan Internet berfungsi secara global. | Border Gateway Protocol (BGP) adalah protokol routing yang menjadi tulang punggung komunikasi di Internet. BGP bertugas mengelola lalu lintas antar jaringan atau Autonomous System (AS), dengan memilih jalur terbaik untuk mengirimkan data ke tujuan tertentu. Dengan BGP, router dapat bertukar informasi tentang rute mana yang lebih efisien dan andal untuk mencapai jaringan lain, memungkinkan Internet berfungsi secara global. | ||
| Line 12: | Line 12: | ||
| |'' | |'' | ||
| |.'' | |.'' | ||
| - | |'' | + | |'' |
| |'' | |'' | ||
| Line 23: | Line 23: | ||
| ===== Topologi ===== | ===== Topologi ===== | ||
| - | {{ : | + | {{ : |
| - | < | + | < |
| - | * **R11 : Konfigurasi IP** | + | * **R1 : Setting Interface** |
| - | < | + | < |
| - | R11(config)# | + | interface |
| - | R11(config-if)# | + | ip address 192.168.1.1 255.255.255.0 |
| - | R11(config-if)# | + | no shutdown |
| - | R11(config-if)# | + | |
| - | R11(config)# | + | |
| - | R11(config-if)# | + | |
| - | R11(config-if)# | + | |
| - | </ | + | |
| - | * **R12 : Konfigurasi IP** | + | |
| - | <code js> | + | |
| - | R12(config)# | + | |
| - | R12(config-if)# | + | |
| - | R12(config-if)# | + | |
| - | </ | + | |
| - | * **R21 : Konfigurasi IP** | + | |
| - | <code js> | + | |
| - | R21(config)# | + | |
| - | R21(config-if)# | + | |
| - | R21(config-if)# | + | |
| - | R21(config-if)# | + | |
| - | R21(config)# | + | |
| - | R21(config-if)# | + | |
| - | R21(config-if)# | + | |
| - | </ | + | |
| - | * **R22 : Konfigurasi IP** | + | |
| - | <code js> | + | |
| - | R22(config)# | + | |
| - | R22(config-if)# | + | |
| - | R22(config-if)# | + | |
| - | </ | + | |
| - | * **R31 : Konfigurasi IP** | + | |
| - | <code js> | + | |
| - | R31(config)# | + | |
| - | R31(config-if)# | + | |
| - | R31(config-if)# | + | |
| - | R31(config-if)# | + | |
| - | R31(config)# | + | |
| - | R31(config-if)# | + | |
| - | R31(config-if)# | + | |
| - | </ | + | |
| - | * **R32 : Konfigurasi IP** | + | |
| - | <code js> | + | |
| - | R32(config)# | + | |
| - | R32(config-if)# | + | |
| - | R32(config-if)# | + | |
| - | </ | + | |
| - | * **R0 : Konfigurasi IP** | + | |
| - | <code js> | + | |
| - | R0(config)# | + | |
| - | R0(config-if)# | + | |
| - | R0(config-if)# | + | |
| - | R0(config-if)# | + | |
| - | R0(config)# | + | |
| - | R0(config-if)# | + | |
| - | R0(config-if)# | + | |
| - | R0(config-if)# | + | |
| - | R0(config)# | + | |
| - | R0(config-if)# | + | |
| - | R0(config-if)# | + | |
| - | </ | + | |
| - | </ | + | |
| - | <hidden Preconfigurasi Routing> | + | interface Serial1/0 |
| - | * **R12 : Konfigurasi static | + | |
| - | <code js> | + | clock rate 2000000 |
| - | R12(config)# | + | no shutdown |
| </ | </ | ||
| - | * **R11 : Konfigurasi static | + | * **R2 : Setting Interface** |
| - | < | + | < |
| - | R11(config)# | + | interface FastEthernet0/ |
| + | ip address 192.168.2.1 255.255.255.0 | ||
| + | no shutdown | ||
| + | ! | ||
| + | interface Serial1/0 | ||
| + | ip address 10.0.0.2 255.255.255.252 | ||
| + | no shutdown | ||
| </ | </ | ||
| - | * **R21 : Konfigurasi ospf** | + | * **LAN1 : Setting Interface** |
| - | < | + | < |
| - | R21(config)# | + | interface FastEthernet0/ |
| - | R21(config-router)# | + | ip address |
| - | R21(config-router)# | + | no shutdown |
| </ | </ | ||
| - | * **R22 : Konfigurasi ospf** | + | * **LAN2 : Setting Interface** |
| - | < | + | < |
| - | R22(config)# | + | interface FastEthernet0/0 |
| - | R22(config-router)# | + | |
| - | </code> | + | no shutdown |
| - | * **R31 : Konfigurasi eigrp** | + | |
| - | <code js> | + | |
| - | R31(config)# | + | |
| - | R31(config-router)# | + | |
| - | R31(config-router)# | + | |
| - | </ | + | |
| - | * **R32 : Konfigurasi eigrp** | + | |
| - | <code js> | + | |
| - | R32(config)# | + | |
| - | R32(config-router)# | + | |
| - | </ | + | |
| - | * **R0 : Konfigurasi static route, ospf , dan eigrp** | + | |
| - | <code js> | + | |
| - | R0(config)#ip route 192.168.12.0 255.255.255.0 | + | |
| </ | </ | ||
| - | <code js> | + | </hidden> |
| - | R0(config)# | + | |
| - | R0(config-router)# | + | |
| - | R0(config-router)# | + | |
| - | </code> | + | |
| - | <code js> | ||
| - | R0(config)# | ||
| - | R0(config-router)# | ||
| - | R0(config-router)# | ||
| - | </ | ||
| - | |||
| - | </ | ||
| ===== Konfigurasi ===== | ===== Konfigurasi ===== | ||
| - | * **R0 : Table Routing sebelum di redistribute** | + | |
| <code js> | <code js> | ||
| - | R0#show ip route | + | router bgp 100 |
| - | Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP | + | neighbor 10.0.0.2 |
| - | D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area | + | network |
| - | N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 | + | |
| - | E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP | + | |
| - | i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area | + | |
| - | * - candidate default, U - per-user static route, o - ODR | + | |
| - | P - periodic downloaded static route | + | |
| - | + | ||
| - | Gateway of last resort is not set | + | |
| - | + | ||
| - | | + | |
| - | C | + | |
| - | L | + | |
| - | S 192.168.12.0/ | + | |
| - | | + | |
| - | C | + | |
| - | L | + | |
| - | O 192.168.22.0/24 [110/2] via 192.168.21.2, 00:04:06, GigabitEthernet0/ | + | |
| - | | + | |
| - | C | + | |
| - | L | + | |
| - | D 192.168.32.0/ | + | |
| </ | </ | ||
| - | * **R21 : Table Routing sebelum di redistribute** | + | |
| <code js> | <code js> | ||
| - | R21#show ip route | + | router bgp 200 |
| - | Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP | + | neighbor 10.0.0.1 remote-as 100 |
| - | D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area | + | network |
| - | N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 | + | |
| - | E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP | + | |
| - | i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area | + | |
| - | * - candidate default, U - per-user static route, o - ODR | + | |
| - | P - periodic downloaded static route | + | |
| - | + | ||
| - | Gateway of last resort is not set | + | |
| - | + | ||
| - | 192.168.21.0/24 is variably subnetted, 2 subnets, 2 masks | + | |
| - | C 192.168.21.0/24 is directly connected, GigabitEthernet0/ | + | |
| - | L 192.168.21.2/32 is directly connected, GigabitEthernet0/ | + | |
| - | | + | |
| - | C 192.168.22.0/24 is directly connected, GigabitEthernet0/ | + | |
| - | L | + | |
| </ | </ | ||
| - | Table routing pada R0 tersimpan rute kesemua network akan tetapi pada R21 hanya mendapatkan advertaise rute ospf dari R0. Untuk R0 dapat membagikan table routing ke protocol lain (misal eigrp) maka kita perlu mendistribusikan eigrp pada ospf. DST… | + | ===== Testing |
| - | + | * **R1 : BGP Neighbors ** | |
| - | ==== Redistrubute Conntected, Static,dan EIGRP ke table routing OSPF. ==== | + | |
| <code js> | <code js> | ||
| - | R0(config)# | + | R1#show ip bgp neighbors |
| - | R0(config-router)# | + | BGP neighbor is 10.0.0.2, |
| - | R0(config-router)# | + | BGP version 4, remote |
| - | R0(config-router)# | + | BGP state = Established, |
| - | </ | + | Last read 00:00:06, last write 00:00:06, hold time is 180, keepalive interval is 60 seconds |
| - | <WRAP center round info 100%> | + | Neighbor capabilities: |
| - | tanpa '' | + | Route refresh: advertised and received(old & new) |
| - | </ | + | Address family IPv4 Unicast: advertised and received |
| + | Message statistics: | ||
| + | InQ depth is 0 | ||
| + | OutQ depth is 0 | ||
| + | | ||
| + | Opens: | ||
| + | | ||
| + | | ||
| + | | ||
| + | Route Refresh: | ||
| + | Total: | ||
| + | | ||
| - | ==== Redistrubute Static, EIGRP ke table routing EIGRP. == | + | For address family: IPv4 Unicast |
| - | <code js> | + | BGP table version 3, neighbor version 3/0 |
| - | R0(config)#router eigrp 1 | + | Output queue size : 0 |
| - | R0(config-router)# | + | Index 1, Offset 0, Mask 0x2 |
| - | R0(config-router)# | + | 1 update-group member |
| - | R0(config-router)# | + | |
| + | Prefix activity: | ||
| + | Prefixes Current: | ||
| + | Prefixes Total: | ||
| + | | ||
| + | Explicit Withdraw: | ||
| + | Used as bestpath: | ||
| + | Used as multipath: | ||
| + | |||
| + | | ||
| + | Local Policy Denied Prefixes: | ||
| + | Bestpath from this peer: | ||
| + | Total: | ||
| + | | ||
| + | |||
| + | Connections established 1; dropped 0 | ||
| + | Last reset never | ||
| + | Connection state is ESTAB, I/O status: 1, unread input bytes: 0 | ||
| + | Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 1 | ||
| + | Local host: 10.0.0.1, Local port: 59207 | ||
| + | Foreign host: 10.0.0.2, Foreign port: 179 | ||
| + | |||
| + | Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes) | ||
| + | |||
| + | Event Timers | ||
| + | Timer Starts | ||
| + | Retrans | ||
| + | TimeWait | ||
| + | AckHold | ||
| + | SendWnd | ||
| + | KeepAlive | ||
| + | GiveUp | ||
| + | PmtuAger | ||
| + | DeadWait | ||
| + | |||
| + | iss: 3940290831 | ||
| + | irs: 2763685506 | ||
| + | |||
| + | SRTT: 124 ms, RTTO: 1405 ms, RTV: 1281 ms, KRTT: 0 ms | ||
| + | minRTT: 20 ms, maxRTT: 300 ms, ACK hold: 200 ms | ||
| + | Flags: active open, nagle | ||
| + | IP Precedence value : 6 | ||
| + | |||
| + | Datagrams (max data segment is 1460 bytes): | ||
| + | Rcvd: 5 (out of order: 0), with data: 3, total data bytes: 135 | ||
| + | Sent: 7 (retransmit: | ||
| </ | </ | ||
| - | <WRAP center round info 100%> | + | * **R1 : BGP Sumarry** |
| - | Untuk redistribute OSPF ke EIGRP pastikan anda menentukan metricnya. Terkadang route tidak terdistribusikan apabila anda tidak menentukanya. | + | |
| - | </ | + | |
| - | + | ||
| - | + | ||
| - | ===== Testing ===== | + | |
| - | * **R22 : Table Routing setelah kite mendistribute route** | + | |
| <code js> | <code js> | ||
| - | R22#show ip route | + | R1#show ip bgp summary |
| - | Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP | + | BGP router identifier 192.168.1.1, |
| - | D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area | + | BGP table version is 3, main routing table version 3 |
| - | N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 | + | 2 network entries using 234 bytes of memory |
| - | E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP | + | 2 path entries using 104 bytes of memory |
| - | i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area | + | 3/2 BGP path/ |
| - | * - candidate default, U - per-user static | + | 1 BGP AS-PATH entries using 24 bytes of memory |
| - | P - periodic downloaded static route | + | 0 BGP route-map cache entries using 0 bytes of memory |
| - | + | 0 BGP filter-list cache entries using 0 bytes of memory | |
| - | Gateway of last resort is not set | + | BGP using 734 total bytes of memory |
| + | BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs | ||
| - | O E2 192.168.11.0/24 [110/20] via 192.168.22.1, | + | Neighbor |
| - | O E2 192.168.12.0/24 [110/20] via 192.168.22.1, 01:03:09, GigabitEthernet0/ | + | 10.0.0.2 |
| - | O 192.168.21.0/24 [110/2] via 192.168.22.1, | + | |
| - | | + | |
| - | C | + | |
| - | L | + | |
| - | O E2 192.168.31.0/24 [110/20] via 192.168.22.1, | + | |
| - | O E2 192.168.32.0/ | + | |
| </ | </ | ||
| - | + | * **R1 : Tables | |
| - | * **R32 : Table Routing | + | < |
| - | < | + | R1#show ip route |
| - | R32#show ip route | + | Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP |
| - | Codes: | + | D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area |
| - | D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area | + | |
| N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 | N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 | ||
| - | E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP | + | E1 - OSPF external type 1, E2 - OSPF external type 2 |
| - | i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area | + | i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 |
| - | * - candidate default, U - per-user static route, o - ODR | + | ia - IS-IS inter area, * - candidate default, U - per-user static route |
| - | P - periodic downloaded static route | + | o - ODR, P - periodic downloaded static route |
| Gateway of last resort is not set | Gateway of last resort is not set | ||
| - | D EX 192.168.11.0/24 [170/ | + | 10.0.0.0/30 is subnetted, |
| - | D EX 192.168.12.0/24 [170/5632] via 192.168.32.1, | + | C 10.0.0.0 is directly connected, |
| - | D EX 192.168.21.0/ | + | C |
| - | D EX 192.168.22.0/ | + | B |
| - | D 192.168.31.0/ | + | |
| - | | + | |
| - | C 192.168.32.0/24 is directly connected, | + | |
| - | L 192.168.32.2/32 is directly connected, | + | |
| - | </ | + | |
| - | * **Test Ping** | + | |
| - | <code js> | + | |
| - | + | ||
| - | R12# | + | |
| - | + | ||
| - | Type escape sequence to abort. | + | |
| - | Sending 5, 100-byte ICMP Echos to 192.168.22.2, | + | |
| - | !!!!! | + | |
| - | Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/0 ms | + | |
| - | </ | + | |
| - | + | ||
| - | <code js> | + | |
| - | R12#ping 192.168.32.2 | + | |
| - | + | ||
| - | Type escape sequence to abort. | + | |
| - | Sending 5, 100-byte ICMP Echos to 192.168.32.2, | + | |
| - | !!!!! | + | |
| - | Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/0 ms | + | |
| </ | </ | ||