Topologi
Objective. diingikan untuk penjaluran ke router 3 menggunakan jalur r2 r4 r3 dengan menyetting attribute AS-Path dan mengenal attribute AS-Path
Router 1
interface Loopback0
ip address 1.1.1.1 255.255.255.255
interface Ethernet0/0
ip address 12.12.12.1 255.255.255.0
router bgp 1
bgp log-neighbor-changes
network 1.1.1.1 mask 255.255.255.255
network 12.12.12.0 mask 255.255.255.0
neighbor 12.12.12.2 remote-as 2
neighbor 12.12.12.2 next-hop-self
Router 2
interface Loopback0
ip address 2.2.2.2 255.255.255.255
interface Ethernet0/0
ip address 12.12.12.2 255.255.255.0
interface Ethernet0/1
ip address 23.23.23.2 255.255.255.0
interface Ethernet0/2
ip address 24.24.24.2 255.255.255.0
router bgp 2
bgp log-neighbor-changes
network 2.2.2.2 mask 255.255.255.255
network 12.12.12.0 mask 255.255.255.0
network 23.23.23.0 mask 255.255.255.0
network 24.24.24.0 mask 255.255.255.0
neighbor 12.12.12.1 remote-as 1
neighbor 23.23.23.3 remote-as 3
neighbor 24.24.24.4 remote-as 2
router 3
interface Loopback0
ip address 3.3.3.3 255.255.255.255
interface Ethernet0/0
ip address 34.34.34.3 255.255.255.0
interface Ethernet0/1
ip address 23.23.23.3 255.255.255.0
router bgp 3
bgp log-neighbor-changes
network 3.3.3.3 mask 255.255.255.255
network 23.23.23.0 mask 255.255.255.0
network 34.34.34.0 mask 255.255.255.0
neighbor 23.23.23.2 remote-as 2
neighbor 23.23.23.2 next-hop-self
neighbor 34.34.34.4 remote-as 2
neighbor 34.34.34.4 next-hop-self
Router 4
interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface Ethernet0/0
ip address 34.34.34.4 255.255.255.0
interface Ethernet0/2
ip address 24.24.24.4 255.255.255.0
router bgp 2
bgp log-neighbor-changes
network 4.4.4.4 mask 255.255.255.255
network 24.24.24.0 mask 255.255.255.0
network 34.34.34.0 mask 255.255.255.0
neighbor 24.24.24.2 remote-as 2
neighbor 34.34.34.3 remote-as 3
sekarang mari kita traceroute dari router 1 ke router 3 ip loopback0 3.3.3.3
terlihat diatas router 1 mengambil rute langsung ke router 2 dan langsung ke rouer 3, Oke mari kita mulai konfigurasinya, pertama kita setting terlebih dahulu route-map nya
diatas bisa dilihat jika terdapat angka 300 jika angkanya semakin tinggi maka ia akan lebih diprioritaskan, lalu sekarang mari kita advertise kedalam bgp
untuk tahap akhir mari kita cek traceroute nya sekali lagi, jangan lupa untuk restart interface yang kita pengaruhi rout-map
oke bisa kita lihat bahwa jalurnya sudah berpindah, selamat mencoba semoga bermanfaat wasalamualaikum wr wb