Struktur Umum BGP Large Community (Contoh Best Practice)
<ASN kamu>:<kategori>:<kode>
| Field | Fungsi | Keterangan |
| 1 | ASN Kamu | Misal 65053 |
| 2 | Kategori / Target | Menandakan arah (upstream, peer, dst) |
| 3 | Tagging / Tindakan | Apa yang dilakukan (prepend/suppress/tag dll) |
Community Tagging (Contoh Best Practice)
| Large Community | Keterangan |
65053:100:x | Prefix learned from upstream (x = ASN Upstream) |
65053:200:x | Prefix learned from RS/Bilateral (x = ASN RS/Bilat) |
65053:300:x | Prefix learned from PNI (x = ASN PNI) |
65053:500:x | Prefix learned from Downstream (x = ASN Downstream) |
Community Customer/Downstream Self Control (Prepend & Supress)
| Large Community | Keterangan |
65053:999:10x | 10 = Kode untuk Upstream A, x = Prepend 1x, 2x, 3x, 0 suppressed to upstream A |
65053:999:20x | 20 = Kode untuk Upstream B, x = Prepend 1x, 2x, 3x, 0 suppressed to upstream A |
65053:999:110x | 110 = Kode untuk RS/Bilateral A, x = Prepend 1x, 2x, 3x, 0 suppressed to RS/Bilateral A |
65053:999:120x | 120 = Kode untuk RS/Bilateral B, x = Prepend 1x, 2x, 3x, 0 suppressed to RS/Bilateral B |
65053:999:1110x | 1110 = Kode untuk PNI A, x = Prepend 1x, 2x, 3x, 0 suppressed to PNI A |
65053:999:1120x | 1120 = Kode untuk PNI B, x = Prepend 1x, 2x, 3x, 0 suppressed to PNI B |
Contoh Topologi
ASN Saya: 65053
Prefix Saya: 172.16.2.0/23 up to /24
ASN Downstream: 65055
Prefix Downstream: 10.0.2.0/23 up to /24
Mikrotik
Contoh Filter DOWNSTREAM in
if ( dst in 10.0.2.0/23 && dst-len in 23-24 && bgp-as-path ^.*65055$ ) { delete bgp-large-communities regexp ^65053:[1-4][0-9][0-9]:.*|^65053:500:.*; append bgp-large-communities 65053:500:65055; set bgp-local-pref 200; accept; }
reject
Contoh Filter DOWNSTREAM out
Buat community-large-list untuk memudahkan:
/routing filter community-large-list
add disabled=no list=REGEXP-LEARNED_FROM-UPSTERAM regexp=65053:100:.*
add disabled=no list=REGEXP-LEARNED_FROM-RS regexp=65053:200:.*
add disabled=no list=REGEXP-LEARNED_FROM-PEER regexp=65053:300:.*
add disabled=no list=REGEXP-LEARNED_FROM-DOWNSTREAM regexp=65053:500:.*
Buat filter nya:
chain=EBGP-DOWNSTREAM-A-out rule="if ( bgp-large-communities includes 65053:500:65055 ) { reject; } "
chain=EBGP-DOWNSTREAM-A-out rule="if ( dst in 172.16.2.0/23 && dst-len in 23-24 ) { accept; } "
chain=EBGP-DOWNSTREAM-A-out rule="if ( bgp-large-communities includes-list REGEXP-LEARNED_FROM-UPSTERAM ) { accept; } "
chain=EBGP-DOWNSTREAM-A-out rule="if ( bgp-large-communities includes-list REGEXP-LEARNED_FROM-RS ) { accept; } "
chain=EBGP-DOWNSTREAM-A-out rule="if ( bgp-large-communities includes-list REGEXP-LEARNED_FROM-PEER ) { accept; } "
chain=EBGP-DOWNSTREAM-A-out rule="if ( bgp-large-communities includes-list REGEXP-LEARNED_FROM-DOWNSTREAM ) { accept; } "
chain=EBGP-DOWNSTREAM-A-out rule="reject"