Setelah pada lab sebelumnya kita sudah mencoba cara melakukan pemindahan jalur turun dengan menggunakan MED / metric.
AS Path prepend artinya kita menambahkan beberapa nilai AS Path agar pada BGP route dengan tujuan agar AS Path menjadi lebih panjang.
Lab 19 - BGP Path Manipulation - AS Path Prepend
Topologi lab dan konfigurasi all router yang digunakan, masih sama dengan lab sebelumnya (pindah jalur menggunakan MED / metric) :
Konfigurasi router R1 :
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip address 13.13.13.1 255.255.255.0
!
interface FastEthernet0/1
ip address 12.12.12.1 255.255.255.0
!
router eigrp 1
network 12.12.12.1 0.0.0.0
network 13.13.13.1 0.0.0.0
no auto-summary
!
router bgp 1
no synchronization
bgp log-neighbor-changes
network 1.1.1.1 mask 255.255.255.255
neighbor 12.12.12.2 remote-as 23
neighbor 13.13.13.3 remote-as 23
no auto-summary
ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip address 13.13.13.1 255.255.255.0
!
interface FastEthernet0/1
ip address 12.12.12.1 255.255.255.0
!
router eigrp 1
network 12.12.12.1 0.0.0.0
network 13.13.13.1 0.0.0.0
no auto-summary
!
router bgp 1
no synchronization
bgp log-neighbor-changes
network 1.1.1.1 mask 255.255.255.255
neighbor 12.12.12.2 remote-as 23
neighbor 13.13.13.3 remote-as 23
no auto-summary
Konfigurasi router 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
!
interface FastEthernet0/1
ip address 23.23.23.2 255.255.255.0
!
router eigrp 1
network 12.12.12.2 0.0.0.0
network 23.23.23.2 0.0.0.0
no auto-summary
!
router bgp 23
no synchronization
bgp log-neighbor-changes
network 2.2.2.2 mask 255.255.255.255
neighbor 12.12.12.1 remote-as 1
neighbor 23.23.23.3 remote-as 23
no auto-summary
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
!
interface FastEthernet0/1
ip address 23.23.23.2 255.255.255.0
!
router eigrp 1
network 12.12.12.2 0.0.0.0
network 23.23.23.2 0.0.0.0
no auto-summary
!
router bgp 23
no synchronization
bgp log-neighbor-changes
network 2.2.2.2 mask 255.255.255.255
neighbor 12.12.12.1 remote-as 1
neighbor 23.23.23.3 remote-as 23
no auto-summary
Konfigurasi router R3 :
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 13.13.13.3 255.255.255.0
!
interface FastEthernet0/1
ip address 23.23.23.3 255.255.255.0
!
router eigrp 1
network 13.13.13.3 0.0.0.0
network 23.23.23.3 0.0.0.0
auto-summary
!
router bgp 23
no synchronization
bgp log-neighbor-changes
network 3.3.3.3 mask 255.255.255.255
neighbor 13.13.13.1 remote-as 1
neighbor 23.23.23.2 remote-as 23
no auto-summary
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 13.13.13.3 255.255.255.0
!
interface FastEthernet0/1
ip address 23.23.23.3 255.255.255.0
!
router eigrp 1
network 13.13.13.3 0.0.0.0
network 23.23.23.3 0.0.0.0
auto-summary
!
router bgp 23
no synchronization
bgp log-neighbor-changes
network 3.3.3.3 mask 255.255.255.255
neighbor 13.13.13.1 remote-as 1
neighbor 23.23.23.2 remote-as 23
no auto-summary
Hasil cek BGP route di router R1 :

Terlihat bahwa dari route BGP di router R1, jalur ke arah IP 3.3.3.3 langsung melalui R3 (13.13.13.3) dengan melihat tanda'best'.
Untuk membuktikannya kita coba traceroute dari R1 ke IP 3.3.3.3 :
Terlihat bahwa dari route BGP di router R1, jalur ke arah IP 3.3.3.3 langsung melalui R3 (13.13.13.3) dengan melihat tanda'best'.
Untuk membuktikannya kita coba traceroute dari R1 ke IP 3.3.3.3 :
Hasil traceroute ke IP 3.3.3.3 langsung melalui IP 13.13.13.3.
Selanjutnya, kita akan coba melakukan AS Path prepend di router R3 sebanyak 3 kali, untuk mempengaruhi jalur R1 ke IP 3.3.3.3.
R3(config)#route-map PREPEND
R3(config-route-map)#set as-path prepend 23 23 23
R3(config-route-map)#exit
R3(config)#router bgp 23
R3(config-router)#neighbor 13.13.13.1 route-map PREPEND out
R3(config-route-map)#set as-path prepend 23 23 23
R3(config-route-map)#exit
R3(config)#router bgp 23
R3(config-router)#neighbor 13.13.13.1 route-map PREPEND out
Kemudian kita clear route BGP dari router R1 menggunakan command clear ip bgp x.x.x.x soft in agar langsung terupdate di route BGP table.
R1#clear ip bgp 13.13.13.3 soft in
R1#clear ip bgp 13.13.13.3 soft in
Setelah kita clear route BGP nya, kita cek hasilnya kembali :
Hasilnya terlihat bahwa BGP route ke IP 3.3.3.3 sudah berubah melalui 12.12.12.2 (R2) dengan tanda 'best', karena mempunyai AS Path lebih pendek (AS Path 23).
Sedangkan BGP route yang didapatkan dari 13.13.13.3 (R3) mempunyai AS Path lebih panjang dari pada AS Path yang diterima dari R2 (AS Path 23 23 23 23).
Kita coba ping dan traceroute ke IP 3.3.3.3 untuk memastikan perubahan jalur yang sudah kita buat.
Hasil ping menunjukkan koneksi ke IP 3.3.3.3 menggunakan source address 1.1.1.1 sudah OK.
Traceroute hop pertama juga sudah berubah melalui 12.12.12.2 (R2), dilanjutkan ke 23.23.23.3 (R3).
Sehingga dengan hasil tersebut, konfigurasi BGP path manipulation dennga menggunakan AS Path prepend sudah berhasil dan selesai :)
keren Mas
BalasHapus