networking:cisco:bgp-basic

This is an old revision of the document!


Cisco : Border Gateway Protocol [U]

  • 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.

  • Apa itu Autonomous System (AS)?

Autonomous System (AS) adalah sekumpulan jaringan yang dioperasikan di bawah satu administrasi atau penyedia layanan internet (ISP). Setiap AS memiliki Nomor AS (ASN) yang unik, yang berfungsi sebagai identitas di Internet. ASN ini memungkinkan jaringan saling terhubung dan berkomunikasi secara efektif, serta mempermudah pengelolaan rute di antara berbagai organisasi yang mengelola infrastruktur jaringan.

Berikut adallah syntax command yang digunakan dalam konfigurasi BGP (Border Gateway Protocol).

Command Description
router bgp <AS_number>* Semasuki BGP Configuration Mode:
.neighbor <IP_address> remote-as <AS_number>*Tentukan AS Tetangga (Remote Peer)
bgp router-id <IP_address> Tentukan Local BGP Router ID, Jika tidak akan terpilih otomatis
network <network_IP> mask <subnet_mask> Menngadvertise sebuah Network
Command Description
show ip bgp neighbors Show BGP Neighbors
.show ip bgp summary Show BGP Summary
show ip bgp show ip route bgp

Preconfig

Preconfig

* R1 : Setting Interface

interface FastEthernet0/0
 ip address 192.168.1.1 255.255.255.0
 no shutdown

interface Serial1/0
 ip address 10.0.0.1 255.255.255.252
 clock rate 2000000
 no shutdown

* R2 : Setting Interface

interface FastEthernet0/0
 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

* LAN1 : Setting Interface

interface FastEthernet0/0
 ip address 192.168.1.2 255.255.255.0
 no shutdown

* LAN2 : Setting Interface

interface FastEthernet0/0
 ip address 192.168.2.2 255.255.255.0
 no shutdown
  • R1 : Configurasi BGP
router bgp 100
 neighbor 10.0.0.2 remote-as 200
 network 192.168.1.0 mask 255.255.255.0
  • R2 : Configurasi BGP
router bgp 200
 neighbor 10.0.0.1 remote-as 100
 network 192.168.2.0 mask 255.255.255.0

* R1 : BGP Neighbors

R1#show ip bgp neighbors 
BGP neighbor is 10.0.0.2,  remote AS 200, external link
  BGP version 4, remote router ID 192.168.2.1
  BGP state = Established, up for 00:00:36
  Last read 00:00:06, last write 00:00:06, hold time is 180, keepalive interval is 60 seconds
  Neighbor capabilities:
    Route refresh: advertised and received(old & new)
    Address family IPv4 Unicast: advertised and received
  Message statistics:
    InQ depth is 0
    OutQ depth is 0
                         Sent       Rcvd
    Opens:                  1          1
    Notifications:          0          0
    Updates:                1          1
    Keepalives:             2          2
    Route Refresh:          0          0
    Total:                  4          4
  Default minimum time between advertisement runs is 30 seconds
 
 For address family: IPv4 Unicast
  BGP table version 3, neighbor version 3/0
 Output queue size : 0
  Index 1, Offset 0, Mask 0x2
  1 update-group member
                                 Sent       Rcvd
  Prefix activity:               ----       ----
    Prefixes Current:               1          1 (Consumes 52 bytes)
    Prefixes Total:                 1          1
    Implicit Withdraw:              0          0
    Explicit Withdraw:              0          0
    Used as bestpath:             n/a          1
    Used as multipath:            n/a          0
 
                                   Outbound    Inbound
  Local Policy Denied Prefixes:    --------    -------
    Bestpath from this peer:              1        n/a
    Total:                                1          0
  Number of NLRIs in the update sent: max 1, min 1
 
  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 (current time is 0x6A9880):
Timer          Starts    Wakeups            Next
Retrans             4          0             0x0
TimeWait            0          0             0x0
AckHold             3          1             0x0
SendWnd             0          0             0x0
KeepAlive           0          0             0x0
GiveUp              0          0             0x0
PmtuAger            0          0             0x0
DeadWait            0          0             0x0
 
iss: 3940290831  snduna: 3940290967  sndnxt: 3940290967     sndwnd:  16249
irs: 2763685506  rcvnxt: 2763685642  rcvwnd:      16249  delrcvwnd:    135
 
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: 0, fastretransmit: 0, partialack: 0, Second Congestion: 0), with data: 4, total data bytes: 135

* R1 : BGP Sumarry

R1#show ip bgp summary   
BGP router identifier 192.168.1.1, local AS number 100
BGP table version is 3, main routing table version 3
2 network entries using 234 bytes of memory
2 path entries using 104 bytes of memory
3/2 BGP path/bestpath attribute entries using 372 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 734 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
10.0.0.2        4   200       6       6        3    0    0 00:02:27        1

* R1 : Tables Routing

R1#show ip route 
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, 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

     10.0.0.0/30 is subnetted, 1 subnets
C       10.0.0.0 is directly connected, Serial1/0
C    192.168.1.0/24 is directly connected, FastEthernet0/0
B    192.168.2.0/24 [20/0] via 10.0.0.2, 00:02:33
  • networking/cisco/bgp-basic.1770218801.txt.gz
  • Last modified: 2026/02/04 22:26
  • by ilyasa