ReferenceNOCP2 · HighAdvancedACTIVE

Juniper (Junos) — Konfigurasi BGP eBGP & Routing Policy (Filter, Local-Pref, AS-Prepend)

Setup autonomous-system, policy-statement inbound/outbound (route-filter IN/OUT), group BGP external (eBGP) dengan peer, local-preference, as-path-prepend, dan verifikasi sesi/prefiks.

REF-NOC-010Reviewer:

Owner

Last Updated

20 Sep 2026

Version

v1.0

Est. Time

30-60 menit

Required AccessJunos CLI
TagsBGPRoutingBackbonePeeringJuniper

Konfigurasi BGP eBGP & Routing Policy

Membuat policy inbound (IN) dan outbound (OUT), mengatur autonomous-system, membuat group BGP external, mengendalikan best path dengan local-preference / as-path-prepend, lalu verifikasi.

iBGP vs eBGP

AS sama = iBGP, AS berbeda = eBGP. Group BGP di bawah ini menggunakan tipe external (eBGP) dengan peer-as milik neighbor.

Routing Filter (Policy-Statement)

bash
show policy-statement IN-DIST {
  term 1 {
    from { route-filter 10.10.10.0/30 prefix-length-range /30-/32; }
    then accept;   // terima/kirim prefix
  }
  term 2 { then reject; }  // drop prefix lainnya
}
show policy-statement OUT-DIST {
  term 1 {
    from { route-filter 10.10.20.0/30 prefix-length-range /30-/32; }
    then accept;
  }
  term 2 { then reject; }
}

Set AS & Group BGP

bash
set routing-options autonomous-system 65529
edit protocols bgp
set group DIST.BEKASI type external
set group DIST.BEKASI neighbor 172.16.100.1 description TO-RO.DIST
set group DIST.BEKASI neighbor 172.16.100.1 import IN-DIST
set group DIST.BEKASI neighbor 172.16.100.1 export OUT-DIST
set group DIST.BEKASI neighbor 172.16.100.1 peer-as 65530
bash
group DIST.BEKASI {
  type external;
  neighbor 172.16.100.1 {
    description TO-RO.DIST;
    import IN-DIST;
    export OUT-DIST;
    peer-as 65530;
  }
}
STEP

Verifikasi sesi & route

  1. 1Cek status sesi BGP
  2. 2Cek tabel routing / prefiks aktif

Manipulasi Best Path

STEP

Local-Preference Inbound

  1. 1Set local-preference pada policy IN (semakin besar semakin diprioritaskan)
STEP

AS-Path Prepending Outbound

  1. 1Pertebal AS path milik sendiri saat advertise (semakin banyak path semakin jauh prioritasnya)
bash
run show route advertising-protocol bgp 172.16.30.1   # cek prefiks yang diadvertise ke peer

Version History

v1.0Publikasi awal (Juniper reference)17 Sep 2026

Was this SOP helpful?