BGP Attribute Weight
Bikin IP Address di Semua router lengkap dengan lo0 dan lo1 sesuai topologinya
R1(config)#int lo0
R1(config-if)#ip add 1.1.1.1 255.255.255.255
R1(config)#int lo1
R1(config-if)#ip add 11.11.11.11 255.255.255.255
R1(config-if)#int e0/0
R1(config-if)#ip add 12.12.12.1 255.255.255.0
R1(config-if)#no shut
R2#conf t
R2(config)#int lo0
R2(config-if)#ip add 2.2.2.2 255.255.255.255
R2(config)#int lo1
R2(config-if)#ip add 22.22.22.22 255.255.255.255
R2(config-if)#int e0/0
R2(config-if)#ip add 12.12.12.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#int e0/1
R2(config-if)#ip add 23.23.23.1 255.255.255.0
R2(config-if)#no shut
R2(config-if)#int s2/0
R2(config-if)#ip add 25.25.25.1 255.255.255.0
R2(config-if)#no shut
R3(config)#int lo0
R3(config-if)#ip add 3.3.3.3 255.255.255.255
R3(config)#int lo1
R3(config-if)#ip add 33.33.33.33 255.255.255.255
R3(config-if)#int e0/1
R3(config-if)#ip add 23.23.23.2 255.255.255.0
R3(config-if)#no shut
R3(config-if)#int s2/0
R3(config-if)#ip add 36.36.36.1 255.255.255.0
R3(config-if)#no shut
R3(config-if)#int e0/2
R3(config-if)#ip add 34.34.34.1 255.255.255.0
R3(config-if)#no shut
R4(config)#int lo0
R4(config-if)#ip add 4.4.4.4 255.255.255.255
R4(config)#int lo1
R4(config-if)#ip add 44.44.44.44 255.255.255.255
R4(config-if)#int e0/2
R4(config-if)#ip add 34.34.34.2 255.255.255.0
R4(config-if)#no shut
R5(config)#int lo0
R5(config-if)#ip add 5.5.5.5 255.255.255.255
R5(config)#int lo1
R5(config-if)#ip add 55.55.55.55 255.255.255.255
R5(config-if)#int e0/0
R5(config-if)#ip add 56.56.56.1 255.255.255.0
R5(config-if)#no shut
R5(config-if)#int s2/0
R5(config-if)#ip add 25.25.25.2 255.255.255.0
R5(config-if)#no shut
R6(config)#int lo0
R6(config-if)#ip add 6.6.6.6 255.255.255.255
R6(config)#int lo1
R6(config-if)#ip add 66.66.66.66 255.255.255.255
R6(config-if)#int e0/0
R6(config-if)#ip add 56.56.56.2 255.255.255.0
R6(config-if)#no shut
R6(config-if)#int s2/0
R6(config-if)#ip add 36.36.36.2 255.255.255.0
R6(config-if)#no shut
Selanjutnya konfigurasikan OSPF di semua router agar semua router dapat
terhubung
R1(config)#router ospf 1
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0
R1(config-router)#network 12.12.12.0 0.0.0.255 area 0
R1(config-router)#exit
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#exit
R2(config)#router ospf 2
R2(config-router)#network 2.2.2.2 0.0.0.0 area 0
R2(config-router)#network 12.12.12.0 0.0.0.255 area 0
R2(config-router)#network 23.23.23.0 0.0.0.255 area 0
R2(config-router)#network 25.25.25.0 0.0.0.255 area 0
R2(config-router)#exit
R2(config)#router ospf 2
R2(config-router)#router-id 2.2.2.2
R2(config-router)#exit
R3(config)#router ospf 3
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network 3.3.3.3 0.0.0.0 area 0
R3(config-router)#network 23.23.23.0 0.0.0.255 area 0
R3(config-router)#network 34.34.34.0 0.0.0.255 area 0
R3(config-router)#network 36.36.36.0 0.0.0.255 area 0
R3(config-router)#exit
R4(config-if)#exit
R4(config)#router ospf 4
R4(config-router)#router-id 4.4.4.4
R4(config-router)#network 4.4.4.4 0.0.0.0 area 0
R4(config-router)#network 34.34.34.0 0.0.0.255 area 0
R4(config-router)#
R5(config)#router ospf 5
R5(config-router)#router-id 5.5.5.5
R5(config-router)#network 5.5.5.5 0.0.0.0 area 0
R5(config-router)#network 25.25.25.0 0.0.0.255 area 0
R5(config-router)#network 56.56.56.0 0.0.0.255 area 0
R6(config)#router ospf 6
R6(config-router)#router-id 6.6.6.6
R6(config-router)#network 6.6.6.6 0.0.0.0 area 0
R6(config-router)#network 56.56.56.0 0.0.0.255 area 0
R6(config-router)#network 36.36.36.0 0.0.0.255 area 0
kemudian Konfigurasi IBGP dan EBGP
R1(config)#router bgp 100
R1(config-router)#network 11.11.11.11 mask 255.255.255.255
R1(config-router)#neighbor 2.2.2.2 remote-as 100
R1(config-router)#neighbor 2.2.2.2 update-source lo0
R1(config-router)#neighbor 5.5.5.5 remote-as 100
R1(config-router)#neighbor 5.5.5.5 update-source lo0
R1(config-router)#exit
R1(config)#do wr
Building configuration...
[OK]
R2(config)#router bgp 100
R2(config-router)#network 22.22.22.22 mask 255.255.255.255
R2(config-router)#neighbor 1.1.1.1 remote-as 100
R2(config-router)#neighbor 1.1.1.1 update-source lo0
R2(config-router)#neighbor 1.1.1.1 next-hop-self
R2(config-router)#neighbor 5.5.5.5 remote-as 100
R2(config-router)#neighbor 5.5.5.5 update-source lo0
R2(config-router)#neighbor 5.5.5.5 next-hop-self
R2(config-router)#neighbor 3.3.3.3 remote-as 200
R2(config-router)#neighbor 3.3.3.3 update-source lo0
R2(config-router)#neighbor 3.3.3.3 next-hop-self
R2(config-router)#neighbor 23.23.23.2 remote-as 200
R2(config-router)#neighbor 23.23.23.2 next-hop-self
R2(config-router)#exit
R3(config)#router bgp 200
R3(config-router)#network 33.33.33.33 mask 255.255.255.255
R3(config-router)#neighbor 4.4.4.4 remote-as 200
R3(config-router)#neighbor 4.4.4.4 update-source lo0
R3(config-router)#neighbor 4.4.4.4 next-hop-self
R3(config-router)#neighbor 6.6.6.6 remote-as 200
R3(config-router)#neighbor 6.6.6.6 update-source lo0
R3(config-router)#neighbor 6.6.6.6 next-hop-self
R3(config-router)#neighbor 23.23.23.1 remote-as 100
R3(config-router)#neighbor 23.23.23.1 next-hop-self
R3(config-router)#do wr
Building configuration...
[OK]
R4(config)#router bgp 200
R4(config-router)#network 44.44.44.44 mask 255.255.255.255
R4(config-router)#neighbor 3.3.3.3 remote-as 200
R4(config-router)#neighbor 3.3.3.3 update-source lo0
R4(config-router)#neighbor 6.6.6.6 remote-as 200
R4(config-router)#neighbor 6.6.6.6 update-source lo0
R4(config-router)#exit
R4(config)#do wr
Building configuration...
[OK]
R5(config)#router bgp 100
R5(config-router)#network 55.55.55.55 mask 255.255.255.255
R5(config-router)#neighbor 2.2.2.2 remote-as 100
R5(config-router)#neighbor 2.2.2.2 update-source lo0
R5(config-router)#neighbor 2.2.2.2 next-hop-self
R5(config-router)#neighbor 56.56.56.2 remote-as 200
R5(config-router)#neighbor 56.56.56.2 next-hop-self
R5(config-router)#do wr
Building configuration...
[OK]
R6(config)#router bgp 200
R6(config-router)#network 66.66.66.66 mask 255.255.255.255
R6(config-router)#neighbor 56.56.56.1 remote-as 100
R6(config-router)#neighbor 56.56.56.1 next-hop-self
R6(config-router)#neighbor 3.3.3.3 remote-as 200
R6(config-router)#neighbor 3.3.3.3 update-source lo0
R6(config-router)#neighbor 3.3.3.3 next-hop-self
R6(config-router)#do wr
Building configuration...
[OK]
Selanjutnya test rute mana kah yang akan di lewati ketka di trace R1 ke R4
R1#trace 44.44.44.44
Type escape sequence to abort.
Tracing the route to 44.44.44.44
VRF info: (vrf in name/id, vrf out name/id)
1 12.12.12.2 2 msec 5 msec 1 msec
2 23.23.23.2 1 msec 1 msec 5 msec
3 34.34.34.2 3 msec 5 msec 2 msec
Terlihat R1 > R2 > R3 > R4
sekarang kita pindahkan trafiknya menggunakan BGP Atribut Weight,
jadi R1 > R2 > R5 > R6 > R3 > R4
Konfigurasi hanya di R2 yang mana terdiri dari dua jalur
setting attribute weightnya dulu di R2
R2(config)#route-map WEIGHT ?
<0-65535> Sequence to insert to/delete from existing route-map entry
deny Route map denies set operations
permit Route map permits set operations
<cr>
R2(config)#route-map WEIGHT permit 10
R2(config-route-map)#set weight 100
R2(config-route-map)#exit
kemudian masukan ke BGP dan diarahkan ke R5 menggunakan Weight
2(config)#router bgp 100
R2(config-router)#neighbor 5.5.5.5 route-map ?
WORD Name of route map
R2(config-router)#neighbor 5.5.5.5 route-map WEIGHT ?
in Apply map to incoming routes
out Apply map to outbound routes
R2(config-router)#neighbor 5.5.5.5 route-map WEIGHT in
R2(config-router)#no neighbor 5.5.5.5 route-map WEIGHT in
R2(config-router)#exit
Setelah selesai selanjutnya test trace R1 ke R4
R1#trace 44.44.44.44
Type escape sequence to abort.
Tracing the route to 44.44.44.44
VRF info: (vrf in name/id, vrf out name/id)
1 12.12.12.2 6 msec 5 msec 2 msec
2 23.23.23.2 7 msec 1 msec 1 msec
3 34.34.34.2 1 msec 1 msec 6 msec
R1#
Alhamdulillah berhasil juga pindah trafik BGP menggunakn attribut weight
sampai sini dulu yah
Salam Ngoprek