BGP

Tampilkan postingan dengan label BGP. Tampilkan semua postingan
Tampilkan postingan dengan label BGP. Tampilkan semua postingan

Rabu, 19 Februari 2014

Lab 34. BGP Attribute Weight


BGP menggunakan policy untuk menentukan jalur yang dituju, weight adalah acuan pertama kali yang dipakai BGP dalam menentukan jalur.



Pada skenario diatas R1 & R4 menggunakan deault route dan lakukan konfig standar BGP serta advertise network R1 dan R4..


R1

interface FastEthernet0/0
ip address 12.12.12.1 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 12.12.12.2


R2

interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
!
interface Serial0/0
ip address 25.25.25.2 255.255.255.0
clock rate 2000000
!
interface FastEthernet0/1
ip address 23.23.23.2 255.255.255.0
!
router bgp 12
network 12.12.12.0 mask 255.255.255.0
neighbor 23.23.23.3 remote-as 34
neighbor 25.25.25.5 remote-as 12


R3

interface FastEthernet0/0
ip address 34.34.34.3 255.255.255.0
!
interface Serial0/0
ip address 36.36.36.3 255.255.255.0
!
interface FastEthernet0/1
ip address 23.23.23.3 255.255.255.0
!
router bgp 34
network 34.34.34.0 mask 255.255.255.0
neighbor 23.23.23.2 remote-as 12
neighbor 36.36.36.6 remote-as 34


R4

interface FastEthernet0/0
ip address 34.34.34.4 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 34.34.34.3


R5

interface FastEthernet0/0
ip address 56.56.56.5 255.255.255.0
!
interface Serial0/0
ip address 25.25.25.5 255.255.255.0
!
router bgp 12
neighbor 25.25.25.2 remote-as 12
neighbor 56.56.56.6 remote-as 34


R6

interface FastEthernet0/0
ip address 56.56.56.6 255.255.255.0
!
interface Serial0/0
ip address 36.36.36.6 255.255.255.0
!
router bgp 34
neighbor 36.36.36.3 remote-as 34
neighbor 56.56.56.5 remote-as 12




Secara default R2 akan memilih lewat R3 untuk ke R4, disini kita akan mengubah jalurnya agar melalui R5 dengan mengubah weightnya..


R1

route-map WEIGHT permit 100
set weight 100
!
router bgp 12
neighbor 25.25.25.5 route-map WEIGHT in




 Oke lihat jalur sudah berganti sekarang melewati 56.56.56.5 (R5)

Lab 33. BGP Aggregation


BGP aggregation digunakan untuk summarize route dan manipulasi route juga tentunya.. Let's go


Memakai topologi yang sama dengan post sebelumnya BGP Attribute Community, di sini kita akan buat beberapa ip loopback pada R4 dan akan disummary..


R1

interface Loopback0
ip address 1.1.1.1 255.255.255.255
ip ospf 1 area 0
!
interface Loopback1
ip address 11.11.11.11 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.1 255.255.255.0
ip ospf 1 area 0
!
router ospf 1
log-adjacency-changes
!
router bgp 123
network 11.11.11.11 mask 255.255.255.255
neighbor 2.2.2.2 remote-as 123
neighbor 2.2.2.2 update-source Loopback0


R2

interface Loopback0
ip address 2.2.2.2 255.255.255.255
ip ospf 1 area 0
!
interface Loopback1
ip address 22.22.22.22 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
ip ospf 1 area 0
!
interface Serial0/0
ip address 24.24.24.2 255.255.255.0
!
interface FastEthernet0/1
ip address 23.23.23.2 255.255.255.0
ip ospf 1 area 0
!
router ospf 1
log-adjacency-changes
!
router bgp 123
network 22.22.22.22 mask 255.255.255.255
neighbor 1.1.1.1 remote-as 123
neighbor 1.1.1.1 update-source Loopback0
neighbor 1.1.1.1 route-reflector-client
neighbor 1.1.1.1 next-hop-self
neighbor 3.3.3.3 remote-as 123
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 route-reflector-client
neighbor 3.3.3.3 next-hop-self
neighbor 24.24.24.4 remote-as 4


R3

interface Loopback0
ip address 3.3.3.3 255.255.255.255
ip ospf 1 area 0
!
interface Loopback1
ip address 33.33.33.33 255.255.255.255
!
interface FastEthernet0/1
ip address 23.23.23.3 255.255.255.0
ip ospf 1 area 0
!
router ospf 1
log-adjacency-changes
!
router bgp 123
network 33.33.33.33
network 33.33.33.33 mask 255.255.255.255
neighbor 2.2.2.2 remote-as 123
neighbor 2.2.2.2 update-source Loopback0


R4

interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface Loopback1
ip address 40.1.1.1 255.255.255.255
!
interface Loopback2
ip address 40.2.1.1 255.255.255.255
!
interface Loopback3
ip address 40.3.1.1 255.255.255.255
!
interface Loopback4
ip address 40.4.1.1 255.255.255.255
!
interface Loopback5
ip address 40.5.1.1 255.255.255.255
!
interface Loopback6
ip address 40.6.1.1 255.255.255.255
!
interface Serial0/0
ip address 24.24.24.4 255.255.255.0
!
router bgp 4
network 4.4.4.4 mask 255.255.255.255
network 40.1.1.1 mask 255.255.255.255
network 40.2.1.1 mask 255.255.255.255
network 40.3.1.1 mask 255.255.255.255
network 40.4.1.1 mask 255.255.255.255
network 40.5.1.1 mask 255.255.255.255
network 40.6.1.1 mask 255.255.255.255
neighbor 24.24.24.2 remote-as 123


Sekarang kita masukkan agregate address ke dalam BGP di R4

R4
router bgp 4
aggregate-address 40.0.0.0 255.248.0.0




Liat pada routing tabel R1 sudah menerima sumary dari R4 ( 40.0.0.0/13 )
Lalu kita akan summary menjadi single route pada R4 hanya menambahkan summary only setelah aggregate address..

R4
router bgp 4
aggregate-address 40.0.0.0 255.248.0.0 summary-only



Sekarang pada routing tabel R1 hanya mendapat summary saja..
Terakhir menggunakan aggreagte suppress map di R4

R4
access-list 1 permit 40.2.1.1
access-list 1 permit 40.3.1.1
access-list 1 permit 40.4.1.1
!
route-map BLOK permit 10
match ip address 1
!
router bgp 4
aggregate-address 40.0.0.0 255.248.0.0 suppress-map BLOK



Lab 32. BGP Attribute Community


Salah satu attribute BGP adalah community. Community ini digunakan sebagai routing policy dan memanipulasi routing karena di BGP akan banyak routing policy untuk menentukan route suatu network...
Secara default BGP belum mengaktifkan attribute community dan BGP memiliki 3 community value yaitu :
No Export          = Tidak mengadvertise route ke luar AS dan dapat mengadvertise ke konfederasi lain dalam satu AS
No Advertise      = Tidak mengadvertise ke peer manapun
Local AS            = Tidak mengadvertise ke luar konfederasi lokal sub AS

Let's go to the scenario





Pada topologi di atas R1, R2 dan R3 di AS 123 dan R4 di AS 4.. Lo 1 pada R1 set no-export yang artinya tidak akan diadvertise ke R4 dan Lo 1 pada R3 set no-advertise yang artinya tidak diadvertise ke peer manapun..

R1

interface Loopback0
ip address 1.1.1.1 255.255.255.255
ip ospf 1 area 0
!
interface Loopback1
ip address 11.11.11.11 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.1 255.255.255.0
ip ospf 1 area 0
!
router bgp 123
network 11.11.11.11 mask 255.255.255.255
neighbor 2.2.2.2 remote-as 123
neighbor 2.2.2.2 update-source Loopback0


R2

interface Loopback0
ip address 2.2.2.2 255.255.255.255
ip ospf 1 area 0
!
interface Loopback1
ip address 22.22.22.22 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
ip ospf 1 area 0
!
interface Serial0/0
ip address 24.24.24.2 255.255.255.0
clock rate 2000000
!
interface FastEthernet0/1
ip address 23.23.23.2 255.255.255.0
ip ospf 1 area 0
!
router bgp 123
network 22.22.22.22 mask 255.255.255.255
neighbor 1.1.1.1 remote-as 123
neighbor 1.1.1.1 update-source Loopback0
neighbor 1.1.1.1 route-reflector-client
neighbor 1.1.1.1 next-hop-self
neighbor 3.3.3.3 remote-as 123
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 route-reflector-client
neighbor 3.3.3.3 next-hop-self
neighbor 24.24.24.4 remote-as 4


R3

interface Loopback0
ip address 3.3.3.3 255.255.255.255
ip ospf 1 area 0
!
interface Loopback1
ip address 33.33.33.33 255.255.255.255
!
interface FastEthernet0/1
ip address 23.23.23.3 255.255.255.0
ip ospf 1 area 0
!
router bgp 123
network 33.33.33.33 mask 255.255.255.255
neighbor 2.2.2.2 remote-as 123
neighbor 2.2.2.2 update-source Loopback0


R4

interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface Serial0/0
ip address 24.24.24.4 255.255.255.0
!
router bgp 4
network 4.4.4.4 mask 255.255.255.255
neighbor 24.24.24.2 remote-as 123


Secara default attribute community tidak aktif dan sekarang kita buat dulu di R1 (no-export)..

R1

access-list 1 permit 11.11.11.11
!
route-map NO-EXPORT permit 10
match ip address 1
set community no-export
!
neighbor 2.2.2.2 send-community
neighbor 2.2.2.2 route-map NO-EXPORT out


First buat dulu access-list untuk network yang akan dimasukan comunity (no-export) lalu buat route-map dan tentukan community nya.. After all tinggal implement ke dalam BGPnya, And then liat hasilnya



Ya, pada R2 terlihat route 11.11.11.11/32 community : no-export dan seharusnya ini tidak akan diadvertise ke R4 karena beda AS..




Ok, pada R4 tidak dapat route ke 11.11.11.11/3.. Next ke R3 set community no-advertise..


R3
access-list 1 permit 33.33.33.33
!
route-map NO-ADVERTISE permit 10
match ip address 1
set community no-advertise
!
neighbor 2.2.2.2 send-community
neighbor 2.2.2.2 route-map NO-ADVERTISE out






Sama seperti konfig saat membuat attribute community dai R1 cuma bedanya ini no-advertise.. Cek lagi di R2 dan BGP tabel di R4/R1..



Ok, pada R2 sudah terlihat community : no-advertise untuk route 33.33.33.33/24 dan ini tidak akan diadvertise ke router lainnya lagi.. Let's check




Ok, R1 sudah tak ada route 33.33.33.33/32




Begitu juga R4, there is no way to 33.33.33.33/32


Terakhir community local AS, untuk pengetesan ganti konfigurasi iBGP (R1, R2, & R3) route reflector menjadi confederation. BGP confederation digunakan untuk memecah satu AS menjadi sub AS atau menggabungkan beberapa AS menjadi satu AS... Let's play..

R1

no router bgp 123
!
router bgp 12
bgp confederation identifier 123
network 11.11.11.11 mask 255.255.255.255
neighbor 12.12.12.2 remote-as 12


R2

no router bgp 123
!
router bgp 12
bgp confederation identifier 123
bgp confederation peers 3
network 22.22.22.22 mask 255.255.255.255
neighbor 12.12.12.1 remote-as 12
neighbor 12.12.12.1 next-hop-self
neighbor 23.23.23.3 remote-as 3
neighbor 23.23.23.3 next-hop-self
neighbor 24.24.24.4 remote-as 4


R3

no router bgp 123
!
router bgp 3
bgp confederation identifier 123
bgp confederation peers 12
network 33.33.33.33 mask 255.255.255.255
neighbor 23.23.23.2 remote-as 12


Setelah dibuat BGP confederationnya tinggal step terakhir buat local-AS di R1..

R1

access-list 2 permit 11.11.11.11
!
route-map LOCAL-AS permit 10
match ip address 2
set community local-AS
!
neighbor 12.12.12.2 send-community
neighbor 12.12.12.2 route-map LOCAL-AS out




Ok, route 11.11.11.11/32 sudah masuk community : local-AS dan seharusnya ini tidak akan diadvertise ke luar sub AS yaitu R3 dan R4..




Siiip lah, dah work community local-AS...

Lab 31. BGP Route Reflector


Pada iBGP terdapat ketentuan "Jika router iBGP  menerima update dari router iBGP lain maka update tidak akan diteruskan ke router iBGP
lainnya"
maka dari itu iBGP haruslah full mesh (setiap router harus peer dengan router lain)..
Problem terjadi ketika banyaknya router iBGP maka kita harus manual set neighbournya satu per satu.. Setiap masalah akan ada solusinya disinilah route reflector menjawabnya..
Dengan menggunakan route reflector maka cukup satu router yang menjadi titik point atau route reflector server. Router lain cukup peer (set neighbour) ke route reflector server saja, maka secara otomatis bila terdapat router dalam iBGP mengupdate, route reflector server akan menyebarkan.. Lanjut ke skenario di bawah..




Pada topologi diatas kita jadikan R2 sebagai route reflector server dan yang lainnya sebagai client..





 

R1

interface Loopback0
ip address 1.1.1.1 255.255.255.255
ip ospf 1 area 0
!
interface FastEthernet0/0
ip address 12.12.12.1 255.255.255.0
ip ospf 1 area 0
!
router ospf 1
log-adjacency-changes
!
router bgp 1
neighbor 2.2.2.2 remote-as 1
neighbor 2.2.2.2 update-source Loopback0
no auto-summary

 

R2

interface Loopback0
ip address 2.2.2.2 255.255.255.255
ip ospf 1 area 0
!
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
ip ospf 1 area 0
!
interface FastEthernet0/1
ip address 23.23.23.2 255.255.255.0
ip ospf 1 area 0
!
router ospf 1
log-adjacency-changes
!
router bgp 1
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 update-source Loopback0
neighbor 1.1.1.1 route-reflector-client
neighbor 3.3.3.3 remote-as 1
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 route-reflector-client
neighbor 4.4.4.4 remote-as 1
neighbor 4.4.4.4 update-source Loopback0
neighbor 4.4.4.4 route-reflector-client
no auto-summary

 

R3

interface Loopback0
ip address 3.3.3.3 255.255.255.255
ip ospf 1 area 0
!
interface FastEthernet0/0
ip address 34.34.34.3 255.255.255.0
ip ospf 1 area 0
!
interface FastEthernet0/1
ip address 23.23.23.3 255.255.255.0
ip ospf 1 area 0
!
router ospf 1
log-adjacency-changes
!
router bgp 1
neighbor 2.2.2.2 remote-as 1
neighbor 2.2.2.2 update-source Loopback0
no auto-summary

 

R4

interface Loopback0
ip address 4.4.4.4 255.255.255.255
ip ospf 1 area 0
!
interface FastEthernet0/0
ip address 34.34.34.4 255.255.255.0
ip ospf 1 area 0
!
router ospf 1
log-adjacency-changes
!
router bgp 1
neighbor 2.2.2.2 remote-as 1
neighbor 2.2.2.2 update-source Loopback0
no auto-summary

Pada R2 kita tentukan router lainnya sebagai client dengan command " neighbor x.x.x.x route-reflector-client". Router R1, R3 & R4 peer secara langsung terhadap router R2.. Kita tes dengan menambahkan loopback 100 dan advertise ke dalam BGP pada R4 yang tidak peer secara langsung ke selain router R2...


R4

interface Loopback100
ip address 44.44.44.44 255.255.255.255
!
router bgp 1
network 44.44.44.44 mask 255.255.255.255




Cek BGP tabel pada R1, ternyata R1 mendapat informasi update route 44.44.44.44/32 milik R4 yang tidak peer secara langsung dengan R1.. R2 (reflector server) sebagai perantara jika ada router client mengupdate informasi..

Lab 30. eBGP Peering


Sebelumnya sudah dibahas tentang iBGP peering next eBGP peer. External BGP digunakan untuk menghubungkan AS yang berbeda, ingat pada eBGP peer tidak bisa menggunakan IP loopback jadi gunakanlah IP fisik interface..




R1 

Buat interface loopback untuk peering iBGP dan advertise menggunakan ospf
interface Loopback0
ip address 1.1.1.1 255.255.255.255
ip ospf 1 area 0

Set IP interface dan advertise juga ke ospf
interface FastEthernet0/0
ip address 12.12.12.1 255.255.255.0
ip ospf 1 area 0

Buat routing OSPF untuk menghubungkan IP loopback
router ospf 1
log-adjacency-changes

Buat routing BGPnya, peer neighbor ke R2 (iBGP) menggunakan IP loopback dan tambahkan update sourcenya biar matching
router bgp 1
network 12.12.12.0 mask 255.255.255.0
neighbor 2.2.2.2 remote-as 1
neighbor 2.2.2.2 update-source Loopback0


R2

interface Loopback0
ip address 2.2.2.2 255.255.255.255
ip ospf 1 area 0
!
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
ip ospf 1 area 0
!
interface FastEthernet0/1
ip address 23.23.23.2 255.255.255.0
!
router ospf 1
log-adjacency-changes

Peer neighbour ke R3 (eBGP) menggunakan IP interface fisik
router bgp 1
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 update-source Loopback0
neighbor 23.23.23.3 remote-as 2


R3

interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/1
ip address 23.23.23.3 255.255.255.0
!
router bgp 2
network 3.3.3.3 mask 255.255.255.255
neighbor 23.23.23.2 remote-as 1


Untuk pengecekan cek routing tabel pada R1

 

 Disini belum nampak IP loopback R3 lalu cek BGP tabel




Lihat route IP loopback R3 sudah didapat tetapi belum muncul di tabel routing... Lihat lebih jelas tanda * = valid namun belum ada tanda > = best, lihat juga next hopnya itu kan IPnya R3. Jadi begini pada saat R2 menerima update dari R3, R2 akan meneruskan update tanpa mengganti next hopnya kecuali update ke eBGP lainnya. "Internal BGP tidak mengganti next hop IP address". Maka dari itu perlu ditambahkan " neighbor 1.1.1.1 next-hop-self" pada R2 untuk mengubah next hop R1..




 Lihat sekarang route ke 3.3.3.3 sudah valid & best..




Tes ping ke 3.3.3.3 lancar sentosa 100 %...

Jadi intinya
Pada iBGP dibuat IP loopback dan routing IGP untuk menghubungkan loopback ke router iBGP lainnya
Setelah itu untuk peer to peer ke router iBGP lainnya guna membangun adjacency neighbor pada iBGP.
Sedangkan pada eBGP menggunakan IP interface fisik, kalo pake loopback terus pake OSPF nah OSPF kan routing protocol dalam satu AS jelas ga bisa..

Lab 29. iBGP Peering


Setelah masuk ke internet BGP lah yang akan mengeksekusi routing paket. Berbeda dengan routing protokol IGP (RIP, OSPF, & EIGRP) BGP digunakan untuk menghubungkan AS yang berbeda. RIP, OSPF & EIGRP semua berbeda tetapi mempunyai kesamaan yaitu mencari jalur terpendek ke tujuan. Metode BGP tidak seperti RIP dkk mencari jalur terpendek, memanipulasi trafik penting pada BGP.
BGP ada 2 tipe yaitu
  • Internal BGP : Dalam satu AS domain
  • External BGP : Antar AS yang berbeda
Kita mulai dengan iBGP Peering dengan IP interface




Peering BGP bisa menggunakan IP interface fisik atau IP loopback, umumnya iBGP menggunakan IP loopback dan eBGP menggunakan IP interface fisik. Pada iBGP dibutuhkan peering dari router A ke B, A ke C, A ke D alias full mesh, ya begitulah. Ketika router menerima update dari router iBGP lainnya, maka informasi gak akan di kirim lagi ke router iBGP selanjutnya. Ex: bayangkan gambar diatas ditambah R3 semua dalam satu AS, R1 peer ke R2 dan R2 peer ke R3 nah pada saat R1 mengirim update R1 hanya mengirim ke R2 dan R2 menerima update dari AS yang sama maka ia tidak akan meneruskan update ke R3. Langsung aja kebawah....




R1

interface FastEthernet0/0
ip address 12.12.12.1 255.255.255.0
!
router bgp 10
neighbor 12.12.12.2 remote-as 10



R2

interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
!
router bgp 10
neighbor 12.12.12.1 remote-as 10


Pada BGP kita harus define manual neighbournya. Kelemahan peer menggunakan IP interface ketika interface itu mati maka adjacency neighbour akan dihapus. Maka dari itulah peer menggunakan IP loopback menjadi yang terbaik. iBGP peering menggunakan IP loopback membutuhkan routing IGP untuk menghubungkan IP loopback ke semua router iBGP... Yo dawg routing dalam routing, ini juga yang buat ane sedikit pusing pada awal belajar BGP..  Skrol lagi ke bawah gaan..


R1

interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
ip address 12.12.12.1 255.255.255.0
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 10
neighbor 2.2.2.2 remote-as 10
neighbor 2.2.2.2 update-source Loopback0


R2

interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
!
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 10
neighbor 1.1.1.1 remote-as 10
neighbor 1.1.1.1 update-source Loopback0


Secara default BGP menggunakan IP interface fisik untuk set koneksi TCP ke BGP neighbour. Kalo gak sama dengan command neighbournya maka ga akan bekerja.. Maka dari itu kita butuh update-source..

Selasa, 11 Desember 2012

BGP









































































 ---BGP FEATURES---
  • EGP merupakan routing protokol yang digunakan untuk kebutuhan Inter-domain
  • Inter-domain routing protocol also known as EGP
  • Autonomous system is a set of routers under a single technical administration, using an IGP & common metrics to route packets within the AS, and using an EGP to route packets to other AS.
  • BGP exchanges routes between AS in a loop free manner.
  • Runs on top of the TCP port 179
  • Periodic keep-alives to verify connectivity
  • Rich metric (called path vectors or attributes)
  • Peers/Neighbours � any two routers that have formed a TCP connection in order to exchange BGP routing information.
---BGP NEIGHBOR---
  • Internal BGP 
          BGP Neighbor semestinya sama AS
          BGP Neighbor tidak harus directly Connected
  • External BGP
          BGP Neighbor semestinya beda AS
          BGP Neighbor seharusnya directly Connected

---Policy Based Routing of BGP---
  • Administrator dapat membuat kebijakan atau aturan, bagaimana data akan dapat dilewati melalui AS atau bisa dikatakan hop-by-hop paradigma Routing.
---BGP METRIC---




Gambar diatas menunjukkan semua atribut yang digunakan oleh BGP
secara umum atribut BGP terbagi menjadi dua, yakni :
  1. Well Known
  • Semua pabrikan perangkat merk apapun yang menjalankan BGP pasti mengenali dan memiliki atribut tipe ini.
  • Well known atribut terbagi menjadi dua yakni :
  1.  Mandatory
  • Atribut ini pasti ada setiap kali router menjalankan BGP 
  •  Terbagi menjadi 3 yaitu :
  1. AS-Path, Menampilkan informasi jalur AS suatu route
                                   2.  Next-Hop, Menampilkan ip via untuk menuju ke suatu route

                                   3. Origin, Menampilkan informasi dari mana route berasal,
                                 
                                       apakah dari BGP atau IGP yang di redistribute ke BGP

               2.   Optional
  • Atribut ini baru ada apabila dikonfigurasikan, bila tidak dikonfigurasikan, maka atribut ini tidak dibawa serta oleh BGP
  • Terbagi menjadi 2 yakni : 
    1. Local Preference, digunakan untuk menentukan jalur upstream
    2. Automic Aggregate. Merupakan suatu route hasil summarization
                                               

        2. Optional
    • Atribut ini hanya dimiliki oleh beberapa pabrikan tertentu saja, tidak semua perangkat, yang menjalankan BGP mengenali dan memiliki fitur ini
    • Optional atribut terbagi menjadi dua yakni
    1. Transitive
    • Atribut ini apabila tidak dikenali oleh perangkat tertentu, maka atribut ini akan tetap diteruskan ke yang lainnya
    • Terbagi menjadi dua yakni
    1. Aggregator, merupakan router yang melakukan summarization
    2. Community, terbagi menjadi 4
      • No-Export, atribut ini akan menjadikan suatu route di advertise hanya ke internal bgp saja.
    •  No-Advertise, atribut ini akan menjadikan suatu route tidak diadvertise kemana-mana, baik internal maupun external.
    • Internet, atribut ini akan menjadikan route nya di advertise kemana saja
    • Local AS, atribut ini hanya ada pada bgp confederation,dimana route nya hanya akan di advertise ke dalam sub-as yang sama saja tidak di advertise ke sub AS yang lain.

                      2.  Non Transitive
    • Atribut ini apabila tidak dikenali oleh perangkat tertentu, maka akan di drop atributnya oleh perangkat tersebut.
    • Terbagi menjadi 3 yaitu :
      • MED, digunakan untuk menentukan trafik kembali / downstream
    • Originator, menunjukkan router yang menjadi route reflector.
    • Cluster ID, menunjukkan nilai cluster id yang digunakan pada redundant route reflector.

    ---Pemilihan Route BGP---
    1. Highest Weight
    2. Highest Local Preference
    3. Route originated by the local router
    4. Shortest AS-Path
    5. Lowest Origin code ( IGP < EGP)
    6. Lowest MED from other AS
    7. EBGP over IBGP
    8. The Path through the closest IGP Neighbour
    9. Oldest route for EBGP
    10. Path with the lowest Neighbour BGP Router ID
    11. Path with the lowest Neighbour IP 
    ---BGP ATTRIBUTE---
    • Weight (Highest)
    • Local-Preference (Highest)
    • Locally Originated
    • AS-Path (Shortest)
    • Origin ( IGP > EGP > ? ) 
    • MED (Lowest)

     

      Dari Pada Teori Terus, mari kita Ngelab Supaya lebih paham

      Lab. 1  Konfigurasi Dasar iBGP Peering






                                              




      R1
      R1(config)#int fa0/0
      R1(config-if)#ip add 12.12.12.1 255.255.255.0
      R1(config-if)#no sh
      R1(config-if)#int fa0/1
      R1(config-if)#ip add 21.21.21.1 255.255.255.0
      R1(config-if)#no sh
      R1(config-if)#int lo0
      R1(config-if)#ip add 1.1.1.1 255.255.255.255
      R1(config-if)#int lo1
      R1(config-if)#ip add 10.10.10.10 255.255.255.255
      R1(config-if)#


      static route
      R1(config)#ip route 2.2.2.2 255.255.255.0 fa0/0

      IGP Jakarta
      R1(config)#router eigrp 101
      R1(config-router)#net 10.10.10.0
      R1(config-router)#no au

      Network Command and redistribution
      R1(config)#router bgp 101
      R1(config-router)#neighbor 2.2.2.2 remote-as 101
      R1(config-router)#neighbor 2.2.2.2 update-source lo0
      R1(config-router)#redistribute eigrp 101
      R1(config-router)#network 12.12.12.0 mask 255.255.255.0


      R2
      R2(config)#int fa0/0
      R2(config-if)#ip add 12.12.12.2 255.255.255.0
      R2(config-if)#no sh
      R2(config-if)#int fa0/1
      R2(config-if)#ip add 21.21.21.2 255.255.255.0
      R2(config-if)#no sh
      R2(config-if)#int lo0
      R2(config-if)#ip add 2.2.2.2 255.255.255.255
      R2(config-if)#int lo1
      R2(config-if)#ip add 20.20.20.20 255.255.255.255
      R2(config-if)#


      IGP R2
      R2(config)#ip route 1.1.1.1 255.255.255.255 fa0/0
      R2(config)#router eigrp 101
      R2(config-router)#net 20.20.20.0
      R2(config-router)#no au

      Network and redistribution
      R2(config)#router bgp 101
      R2(config-router)#neighbor 1.1.1.1 remote-as 101
      R2(config-router)#neighbor 1.1.1.1 update-source lo0
      R2(config-router)#redistribute eigrp 101
      R2(config-router)#network 12.12.12.0 mask 255.255.255.0


      CEK
      Sh ip bgp summary
      Sh ip bgp
      Sh ip route bgp

      Lab 2. iBGP Loopback and eBGP Loopback














      R1
      R1(config)#int fa0/0
      R1(config-if)#ip add 12.12.12.1 255.255.255.0
      R1(config-if)#no sh
      R1(config-if)#int lo0
      R1(config-if)#ip add 1.1.1.1 255.255.255.255
      R1(config-if)#int lo1
      R1(config-if)#ip add 11.11.11.11 255.255.255.255
      R1(config-if)#int lo2
      R1(config-if)#ip add 111.111.111.111 255.255.255.255


      IGP Jakarta
      R1(config)#ip route 2.2.2.2 255.255.255.255 fa0/0
      R1(config)#router rip
      R1(config-router)#ver 2
      R1(config-router)#net 11.0.0.0
      R1(config-router)#net 111.0.0.0
      R1(config-router)#no au

      Network Command and Redistribution
      R1(config)#router bgp 101
      R1(config-router)#neighbor 2.2.2.2 remote-as 101
      R1(config-router)#neighbor 2.2.2.2 update-source lo0
      R1(config-router)#network 12.12.12.0 mask 255.255.255.0
      R1(config-router)#network 111.111.111.111 mask 255.255.255.255
      R1(config-router)#redistribute static
      R1(config-router)#redistribute rip


      R2
      R2(config)#int fa0/0
      R2(config-if)#ip add 12.12.12.2 255.255.255.0
      R2(config-if)#no sh
      R2(config-if)#int s0/0
      R2(config-if)#ip add 23.23.23.2 255.255.255.0
      R2(config-if)#no sh
      R2(config-if)#int lo0
      R2(config-if)#ip add 2.2.2.2 255.255.255.255
      R2(config-if)#int lo1
      R2(config-if)#ip add 22.22.22.22 255.255.255.255
      R2(config-if)#int lo2
      R2(config-if)#ip add 222.222.222.222 255.255.255.255

      R2 IGP
      R2(config)#ip route 1.1.1.1 255.255.255.255 fa0/0
      R2(config)#ip route 3.3.3.3 255.255.255.255 s0/0
      R2(config)#router rip
      R2(config-router)#ver 2
      R2(config-router)#net 22.0.0.0
      R2(config-router)#net 222.0.0.0
      R2(config-router)#no au


      network command and redistribution
      R2(config)#router bgp 101
      R2(config-router)#neighbor 1.1.1.1 remote-as 101
      R2(config-router)#neighbor 1.1.1.1 update-source lo0
      R2(config-router)#neighbor 3.3.3.3 remote-as 102
      R2(config-router)#neighbor 3.3.3.3 update-source lo0
      R2(config-router)#neighbor 3.3.3.3 ebgp-multihop
      R2(config-router)#network 12.12.12.0 mask 255.255.255.0
      R2(config-router)#network 23.23.23.0 mask 255.255.255.0
      R2(config-router)#network 222.222.222.222 mask 255.255.255.255
      R2(config-router)#redistribute rip
      R2(config-router)#redistribute static

      R3
      R3(config)#int s0/0
      R3(config-if)#ip add 23.23.23.3 255.255.255.0
      R3(config-if)#no sh
      R3(config-if)#int lo0
      R3(config-if)#ip add 3.3.3.3 255.255.255.255
      R3(config-if)#int lo1
      R3(config-if)#ip add 33.33.33.33 255.255.255.255
      R3(config-if)#int lo2
      R3(config-if)#ip add 223.223.223.223 255.255.255.255


      R3 IGP
      R3(config)#ip route 2.2.2.2 255.255.255.255 s0/0
      R3(config)#router rip
      R3(config-router)#ver 2
      R3(config-router)#net 33.0.0.0
      R3(config-router)#net 223.0.0.0

      network Command and redistribution
      R3(config)#router bgp 102
      R3(config-router)#neighbor 2.2.2.2 remote-as 101
      R3(config-router)#neighbor 2.2.2.2 update-source lo0
      R3(config-router)#neighbor 2.2.2.2 ebgp-multihop
      R3(config-router)#net 23.23.23.0 mask 255.255.255.0
      R3(config-router)#net 223.223.223.223 mask 255.255.255.255

      CEK
      Sh ip bgp summary
      Sh ip bgp
      Sh ip route bgp


      Lab 3. BGP Next-Hop-Self















      R2(config)#router bgp 101
      R2(config-router)#neighbor 1.1.1.1 remote-as  101
      R2(config-router)#neighbor 1.1.1.1 next-hop-self

      R1
      Sh ip bgp summary
      Sh ip bgp
      Sh ip route bgp
      Ping 23.23.23.23.3
      Ping 3.3.3.3
      Ping 33.33.33.33
      Ping 223.223.223.223


      R2
      Sh ip bgp summary
      Sh ip bgp
      Sh ip route bgp
      Ping ke R1 dan R2


      R3
      Sh ip bgp summary
      Sh ip bgp
      Sh ip route bgp
      Ping ke R1 dan R2


      Lab 4. BGP Authentication














      Konfigurasi BGP
      R1(config)#router bgp 101
      R1(config-router)#neighbor 2.2.2.2 password 0 rahasia
      R2(config)#router bgp 101
      R2(config-router)# neighbor 1.1.1.1 password 0 rahasia


      Lab 5. BGP Route Reflector Client












      R1
      R1(config)#int fa0/0
      R1(config-if)#ip add 12.12.12.1 255.255.255.0
      R1(config-if)#no sh
      R1(config-if)int lo0
      R1(config-if)ip add 1.1.1.1 255.255.255.255

      IGP R1
      R1(config)#ip route 2.2.2.2 255.255.255.255 fa0/0

      Network command and redistribution
      R1(config)#router bgp 123
      R1(config-router)#neighbor 2.2.2.2 remote-as 123
      R1(config-router)#neighbor 2.2.2.2 update-source lo0
      R1(config-router)#net 12.12.12.0 mask 255.255.255.0
      R1(config-router)#net 1.1.1.1 mask 255.255.255.255
      R1(config-router)#redistribute static


      R2
      R2(config)#int fa0/0
      R2(config-if)#ip add 12.12.12.2 255.255.255.0
      R2(config-if)#no sh
      R2(config-if)#int lo0
      R2(config-if)#ip add 2.2.2.2 255.255.255.255
      R2(config-if)#int s0/0
      R2(config-if)#ip add 23.23.23.2 255.255.255.0
      R2(config-if)#no sh

      IGP R2
      R2(config)#ip route 1.1.1.1 255.255.255.255 fa0/0
      R2(config)#ip route 3.3.3.3 255.255.255.255 s0/0

      Network command, route reflector and redistribution
      R2(config)#router bgp 123
      R2(config-router)#neighbor 1.1.1.1 remote-as 123
      R2(config-router)#neighbor 1.1.1.1 update-source lo0
      R2(config-router)#neighbor 1.1.1.1 route-reflector-client
      R2(config-router)#neighbor 3.3.3.3 remote-as 123
      R2(config-router)#neighbor 3.3.3.3 update-source lo0
      R2(config-router)#neighbor 3.3.3.3 route-reflector-client
      R2(config-router)#net 12.12.12.0 mask 255.255.255.0
      R2(config-router)#net 23.23.23.0 mask 255.255.255.0
      R2(config-router)#net 2.2.2.2 mask 255.255.255.255
      R2(config-router)#redistribute static


      R3
      R3(config)#int s0/0
      R3(config-if)#ip add 23.23.23.3 255.255.255.0
      R3(config-if)#no sh
      R3(config-if)#int lo0
      R3(config-if)#ip add 3.3.3.3 255.255.255.255

      IGP R3
      R3(config)#ip route 2.2.2.2 255.255.255.255 s0/0

      Network command and redistribution
      R3(config)#router bgp 123
      R3(config-router)#neighbor 2.2.2.2 remote-as 123
      R3(config-router)#neighbor 2.2.2.2 update-source lo0
      R3(config-router)#net 23.23.23.0 mask 255.255.255.255
      R3(config-router)#net 3.3.3.3 mask 255.255.255.255
      R3(config-router)#redistribute static

      Sh ip bgp summary
      Sh ip bgp
      Sh ip route bgp
      Ping ke R1,R2,R3


      Lab 6. BGP ATTRIBUT ORIGIN





      Catatan :
      i  = route yang berasal dari BGP (eBGP/iBGP) yang diadvertise melalui perintah network x.x.x.x mask y.y.y.y
      e = route yang berasal dari protocol EGP (saat ini sudah tidak ada protocol tersebut)
      ? = route yang berasal dari protocol lain (static / RIP / OSPF / EIGRP) yang di redistribute ke dalam BGP

      R1 untuk menuju network 2.2.2.2 dan 3.3.3.3 adalah via " 200 i " yang artinya Next AS Path adalah AS 200 dan nilai origin dari routernya adalah i

      R1 untuk menuju network 30.30.30.30/32 dab 33.33.33.33/32 adalah via " 200 ?" yang artinya Next AS Path adalah AS 200 dan nilai origin adalah ?


      Lab 7. BGP ATTRIBUTE COMMUNITY
















      Pada lab ini kita akan belajar tentang BGP Attribute Community
      Cek BGP route di R1 dan R4
      Set community �no-export� di R1 (no-export tidak di advertise ke Ebgp)
      Cek BGP route di R3 dan R4 pastikan network 11.11.11.11/32 sudah tidak ada.
      Set community �no-advertise� di R3 (no-advertise tidak di advertise di Ibgp dan Ebgp)
      Cek BGP Route di R1 dan R4 pastikan network 33.33.33.33/32 sudah tidak ada.
      Set community �local-AS� (di advertise hanya di confederation Ibgp saja).
      Artinya konfigurasi iBGP (R1, R2, dan R3) harus dirubah dari route reflector menjadi confederation.


      R1 (NO-EXPORT)
      access-list 1 permit host 11.11.11.11
      route-map NO-EXPORT
      match ip add 1
      set community no-export
      router bgp 123
      neighbor 2.2.2.2 route-map NO-EXPORT out
      neighbor 2.2.2.2 send-community

      R3 (NO-ADVERTISE)
      Access-list 1 permit host 33.33.33.33
      Route-map NO-ADVERTISE
      Match ip add 1
      Set community no-advertise
      Router bgp 123
      Neighbor 2.2.2.2 route-map NO-ADVERTISE out
      Neighbor 2.2.2.2 send-community


      R1 (LOCAL-AS)
      no router bgp 123
      router bgp 12
      bgp confederation identifiers 123
      network 11.11.11.11 mask 255.255.255.255
      neighbor 12.12.12.2 remote-as 12
      neighbor 12.12.12.2 route-map LOCAL-AS
      neighbor 12.12.12.2 send community

      access-list 2 permit host 11.11.11.11
      route-map LOCAL-AS
      match ip add 2
      set community local-As


      R2 (LOCAL-AS)
      no router bgp 123
      router bgp 12
      bgp confederation identifier 123
      bgp confederation peers 3
      neighbor 24.24.24.4 remote-as 4
      neighbor 12.12.12.1 remote-as 12
      neighbor 12.12.12.1 next-hop-self
      neighbor 23.23.23.23.3 remote-as 3
      neighbor 23.23.23.3 next-hop-self
      network 22.22.22.22 mask 255.255.255.255


      R3 (LOCAL-AS)
      no router bgp 123
      router bgp 3
      bgp confederation identifier 123
      bgp confederation peers 12
      neighbor 23.23.23.2 remote-as 12
      network 33.33.33.33 mask 255.255.255.255



      Lab 8.  BGP PEERS GROUP















      R1

      R1(config)#interface fa0/0
      R1(config-if)#ip add 12.12.12.1 255.255.255.0
      R1(config-if)#no sh
      R1(config-if)#interface lo0
      R1(config-if)#ip add 1.1.1.1 255.255.255.255
      R1(config-if)#interface lo1
      R1(config-if)#ip add 11.11.11.11 255.255.255.255
      R1(config-if)#router eigrp 1
      R1(config-router)#net 12.12.12.1 0.0.0.0
      R1(config-router)#net 1.1.1.1 0.0.0.0
      !
      R1(config)#router bgp 123
      router bgp 123
      neighbor INTERNAL peer-group
      neighbor INTERNAL remote-as 123
      neighbor INTERNAL update-source lo0
      neighbor 2.2.2.2 peer-group INTERNAL
      neighbor 3.3.3.3 peer-group INTERNAL
      network 11.11.11.11 mask 255.255.255.255

      R2

      R2(config)#interface fa0/0
      R2(config-if)#ip add 12.12.12.2 255.255.255.0
      R2(config-if)#no sh
      R2(config-if)#int s0/0
      R2(config-if)#ip add 24.24.24.2 255.255.255.0
      R2(config-if)#no sh
      R2(config-if)#int fa0/1
      R2(config-if)#ip add 23.23.23.2 255.255.255.0
      R2(config-if)#no sh
      R2(config-if)#int lo0
      R2(config-if)#ip add 2.2.2.2 255.255.255.255
      R2(config-if)#int lo1
      R2(config-if)#ip add 22.22.22.22 255.255.255.255
      !
      R2(config-if)#router eigrp 1
      R2(config-router)#net 12.12.12.2 0.0.0.0
      R2(config-router)#net 23.23.23.2 0.0.0.0
      R2(config-router)#net 2.2.2.2 0.0.0.0
      R2(config-router)#router bgp 123
      router bgp 123
      neighbor INTERNAL peer-group
      neighbor INTERNAL remote-as 123
      neighbor INTERNAL update-source lo0
      neighbor INTERNAL next-hop-self
      neighbor 1.1.1.1 peer-group INTERNAL
      neighbor 3.3.3.3 peer-group INTERNAL
      neighbor 24.24.24.4 remote-as 4
      network 22.22.22.22 mask 255.255.255.255

      R3

      R3(config)#int fa0/0
      R3(config-if)#ip add 23.23.23.3 255.255.255.0
      R3(config-if)#no sh
      R3(config-if)#int lo0
      R3(config-if)#ip add 3.3.3.3 255.255.255.255
      R3(config-if)#int lo1
      R3(config-if)#ip add 33.33.33.33 255.255.255.255
      !
      R3(config-if)#router eigrp 1
      R3(config-router)#net 23.23.23.3 0.0.0.0
      R3(config-router)#net 3.3.3.3 0.0.0.0
      router bgp 123
      neighbor INTERNAL peer-group
      neighbor INTERNAL remote-as 123
      neighbor INTERNAL update-source lo0
      neighbor 1.1.1.1 peer-group INTERNAL
      neighbor 2.2.2.2 peer-group INTERNAL
      network 33.33.33.33 mask 255.255.255.255

      R4

      R4(config)#int s0/0
      R4(config-if)#ip add 24.24.24.4 255.255.255.0
      R4(config-if)#no sh
      R4(config-if)#int lo0
      R4(config-if)#ip 4.4.4.4 255.255.255.255
      router bgp 4
      neighbor 24.24.24.2 remote-as 123
      network 4.4.4.4 mask 255.255.255.255


      Lab 9. BGP AGGREGRATOR
















      R4

      int lo1
      ip add 40.1.1.1 255.255.255.255
      int lo2
      ip add 40.2.1.1 255.255.255.255
      int lo3
      ip add 40.3.1.1 255.255.255.255
      int lo4
      ip add 40.4.1.1 255.255.255.255
      int lo5
      ip add 40.5.1.1 255.255.255.255
      int lo6
      ip add 40.6.1.1 255.255.255.255
      router bgp 4
      network 40.1.1.1 mask 255.255.255.255
      network 40.2.1.1 mask 255.255.255.255
      network 40.3.1.1 mask 255.255.255.255
      network 40.4.1.1 mask 255.255.255.255
      network 40.5.1.1 mask 255.255.255.255
      network 40.6.1.1 amsk 255.255.255.255
      aggregate-address 40.0.0.0 255.248.0.0
      aggregate-address 40.0.0.0 255.248.0.0 summary-only


      selanjutnya konfigurasikan aggregate suppress Map di R4



      access-list 1 permit host 40.2.1.1
      access-list 1 permit hsot 40.3.1.1
      access-list 1 permit host 40.4.1.1

      access-list 1 deny any
      route-map BLOK
      match ip address 1
      router bgp 4
      aggregate-address 40.0.0.0 255.248.0.0 suppress-map BLOK


      Lab 10. BGP LOCAL AS






      Router R1
      R1(config)#int fa0/0
      R1(config-if)#ip add 12.12.12.1 255.255.255.0
      R1(config-if)#no sh
      R1(config-if)#int lo0
      R1(config-if)#ip add 1.1.1.1 255.255.255.255
      R1(config-if)#int lo2
      R1(config-if)#ip add 1.1.1.2 255.255.255.255
      R1(config-if)#int lo3
      R1(config-if)#ip add 1.1.1.3 255.255.255.255
      R1(config-if)#router bgp 100
      R1(config-router)#neighbor 12.12.12.2 remote-as 65000
      R1(config-router)#network 1.1.1.1 mask 255.255.255.255
      R1(config-router)#network 1.1.1.2 mask 255.255.255.255
      R1(config-router)#network 1.1.1.3 mask 255.255.255.255


      Router R2
      R2(config)#int fa0/0
      R2(config-if)#ip add 12.12.12.2 255.255.255.0
      R2(config-if)#no sh
      R2(config)#int fa0/1
      R2(config-if)#ip add 23.23.23.2 255.255.255.0
      R2(config-if)#no sh
      R2(config-if)#int lo0
      R2(config-if)#ip add 2.2.2.2 255.255.255.255
      R2(config)#router bgp 200
      R2(config-router)#neighbor 12.12.12.1 remote-as 100
      R2(config-router)#neighbor 12.12.12.1 local-as 65000
      R2(config-router)#neighbor 23.23.23.3 remote-as 300

      Router R3
      R3(config)#int fa0/0
      R3(config-if)#ip add 23.23.23.3 255.255.255.0
      R3(config-if)#no sh
      R3(config-if)#int lo0
      R3(config-if)#ip add 3.3.3.3 255.255.255.255
      R3(config)#router bgp 300
      R3(config-router)#neighbor 23.23.23.2 remote-as 200
      R3(config-router)#network 3.3.3.3 mask 255.255.255.255


      Cek hasilnya routenya di R3







      Konfigurasikan local-as no prepend di router R2
      R2(config-router)router bgp 200
      R2(config-router)neighbor 12.12.12.1 local-as 65000 no-prepend


      Cek kembali hasil route no-prepend pada R3










      Konfigurasikan local-as no-prepend replace-as di R3 serta rubah remote-as R4
      R3(config-router)neighbor 12.12.12.1 local-as 65000 no-prepend replace-as
      R3(config-router)neighbor 23.23.23.3 local-as 65000 no-prepend replace-as

      R4(config)#router bgp 300
      R4(config-router)#neighbor 23.23.23.2 remote-as 65000


      Cek kembali hasil route no-prepend pada R3








      Lab 11. BGP MANIPULASI JALUR

















      R1
      R1(config)#int fa0/0
      R1(config-if)#ip add 13.13.13.1 255.255.255.0
      R1(config-if)#no sh
      R1(config-if)int s0/0
      R1(config-if)ip add 12.12.12.1 255.255.255.0
      R1(config-if)#no sh
      R1(config-if)#int lo0
      R1(config-if)#ip add 1.1.1.1 255.255.255.255
      R1(config-if)#router eigrp 10
      R1(config-if)#net 12.12.12.1 0.0.0.0
      R1(config-if)#net 13.13.13.1 0.0.0.0
      R1(config)#router bgp 1
      R1(config-router)#neighbor 12.12.12.2 remote-as 23
      R1(config-router)#neighbor 13.13.13.3 remote-as 23
      R1(config-router)#net 1.1.1 mask 255.255.255.255


      R2
      R2(config)#int s0/0
      R2(config-if)#ip add 12.12.12.2 255.255.255.0
      R2(config-if)#no sh
      R2(config-if)#int fa0/0
      R2(config-if)#ip add 23.23.23.2 255.255.255.0
      R2(config-if)#no sh
      R2(config)#router eigrp 10
      R2(config-router)#net 12.12.12.2 0.0.0.0
      R2(config-router)#net 23.23.23.2 0.0.0.0
      R2(config)#router bgp 23
      R2(config-router)#neighbor 12.12.12.1 remote-as 1
      R2(config-router)#neighbor 23.23.23.3 remote-as 23
      R2(config-router)#


      R3
      R3(config)#int fa0/1
      R3(config-if)#ip add 23.23.23.3 255.255.255.0
      R3(config-if)#no sh
      R3(config-if)#int fa0/0
      R3(config-if)#ip add 12.12.12.3 255.255.255.0
      R3(config-if)#no sh
      R3(config-if)#int lo0
      R3(config-if)#ip add 3.3.3.3 255.255.255.255
      R3(config-if)#router eigrp 10
      R3(config-if)net 23.23.23.3 0.0.0.0
      R3(config-if)net 12.12.12.2 0.0.0.0
      R3(config)#router bgp 23
      R3(config-router)#neighbor 12.12.12.1 remote-as 1
      R3(config-router)#neighbor 23.23.23.2 remote-as 23
      R3(config-router)#net 3.3.3.3 mask 255.255.255.255


      Lakukan verifikasi pada R1
       
      Terlihat pada console bahwasannya untuk menuju ke network 3.3.3.3/32 ada 2 next hop yaitu 12.12.12.2 dan 13.13.13.3. tanda *> di sebelah kiri menunjukkan bahwa next hop terpilih adalah 13.13.13.3


      Lab 12. BGP MINDAH JALUR BY MED

















      R3
      route-map MED
      set metric 200
      router bgp 23
      neighbor 13.13.13.1 route-map MED out


      verifikasi kembali







      Lab 13. BGP MINDAH JALUR BY AS-PATH

















      R3
      route-map AS
      set as-path prepend 23.23.23.23
      router bgp 23
      neighbor 13.13.13.1 route-map AS out

      BGP dalam hal ini bekerja seperti RIP yakni menggunakan hop count, bedanya adalah pada BGP yang dihitung adalah jumlah AS Number yang dilewati. yang paling sedikit akan dipilih. sehingga agar jalur yang digunakan melalui R2 terlebih dahulu, maka jalur R1 - R3 dibuat seolah-olah melalui AS yang banyak sehingga tidak akan dipilih sebagai jalur utama. pada contoh diatas melewati 23.23.23.23


      Lab 14. BGP MINDAH JALUR BY WEIGHT
















      R1
      route-map WEIGHT permit 10
      set weight 100
      router bgp 1
      neighbor 12.12.12.2 route-map WEIGHT in

       Verifikasi

       
      Nilai weight terbesar dipilih, maka link neighbor menuju R2 dibuat besar yakni menjadi 100, seperti terlihat di jalur menuju 3.3.3.3 yang melalui R2 (12.12.12.2) weight nya bernilai 100, sedangkan yang melalui R3 (13.13.13.3) weight nya lebih rendah yakni 0. Maka jalur ke R2 yang dipilih.


       Lab 15. BGP MINDAH JALUR BY LOCAL-PREFERENCE

















      R1
      route-map LOC_PREF permit 10
      set local-preference 200
      router bgp 1
      neighbor 12.12.12.2 route-map LOC_PREF in