baik sahabat configer kali ini saya akan sedikit sharing mengenai BGP Nexthop Self untuk topologinya seperti ini :
oke kita langsung ke konfigurasinya :
Konfigurasi R1
[admin@MikroTik] > sys id set nam R1
[admin@R1] > int br ad nam bridge1
[admin@R1] > ip ad ad ad 1.1.1.1/32 interface=bridge1
[admin@R1] > ip ad ad ad 12.12.12.1/24 interface=ether1
[admin@R1] > routing bgp instance set default as=100 redistribute-connected=yes
[admin@R1] > routing bgp peer add name=peer1 remote-address=12.12.12.2 remote-as=200
Konfigurasi R2[admin@R1] > int br ad nam bridge1
[admin@R1] > ip ad ad ad 1.1.1.1/32 interface=bridge1
[admin@R1] > ip ad ad ad 12.12.12.1/24 interface=ether1
[admin@R1] > routing bgp instance set default as=100 redistribute-connected=yes
[admin@R1] > routing bgp peer add name=peer1 remote-address=12.12.12.2 remote-as=200
[admin@MikroTik] > sys id set nam R2
[admin@R2] > int br ad nam bridge1
[admin@R2] > ip ad ad ad 12.12.12.2/24 interface=ether1
[admin@R2] > ip ad ad ad 23.23.23.2/24 interface=ether2
[admin@R2] > ip ad ad ad 2.2.2.2/32 interface=bridge1
[admin@R2] > routing bgp instance set default as=200 redistribute-connected=yes
[admin@R2] > routing bgp peer add name=peer1 remote-address=12.12.12.1 remote-as=100
[admin@R2] > routing bgp peer add name=peer2 remote-address=23.23.23.3 remote-as=200
Konfigurasi R3[admin@R2] > int br ad nam bridge1
[admin@R2] > ip ad ad ad 12.12.12.2/24 interface=ether1
[admin@R2] > ip ad ad ad 23.23.23.2/24 interface=ether2
[admin@R2] > ip ad ad ad 2.2.2.2/32 interface=bridge1
[admin@R2] > routing bgp instance set default as=200 redistribute-connected=yes
[admin@R2] > routing bgp peer add name=peer1 remote-address=12.12.12.1 remote-as=100
[admin@R2] > routing bgp peer add name=peer2 remote-address=23.23.23.3 remote-as=200
[admin@MikroTik] > sys id set nam R3
[admin@R3] > int br ad nam bridge1
[admin@R3] > ip ad ad ad 23.23.23.3/24 interface=ether1
[admin@R3] > ip ad ad ad 3.3.3.3/32 interface=bridge1
[admin@R3] > routing bgp instance set default as=200 redistribute-connected=yes
[admin@R3] > routing bgp peer add name=peer1 remote-address=23.23.23.2 remote-as=200
lakukan ping R3 ke R1 dengan ping ip loopback dan hasilnya akan gagal kemudian coba cek routing detail 1.1.1.1 di R3[admin@R3] > int br ad nam bridge1
[admin@R3] > ip ad ad ad 23.23.23.3/24 interface=ether1
[admin@R3] > ip ad ad ad 3.3.3.3/32 interface=bridge1
[admin@R3] > routing bgp instance set default as=200 redistribute-connected=yes
[admin@R3] > routing bgp peer add name=peer1 remote-address=23.23.23.2 remote-as=200
[admin@R3] > ping 1.1.1.1
SEQ HOST SIZE TTL TIME STATUS
0 no route to host
1 no route to host
2 no route to host
sent=3 received=0 packet-loss=100%
[admin@R3] > ip route print detail where dst-address=1.1.1.1/32
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit
0 Db dst-address=1.1.1.1/32 gateway=12.12.12.1 gateway-status=12.12.12.1 unreachable distance=200 scope=40 target-scope=30 bgp-as-path="100" bgp-local-pref=100 bgp-origin=incomplete received-from=peer1
bisa kita lihat diatas route ke net 1.1.1.1 tidak aktif karena ip 12,12,12,1 statusnya unrecheable tapi bila kita coba ping ke 12.12.12.1 akan terhubung, hal ini disebabkan karena nilai target scope dari rute dengan dst-address 1.1.1.1/32 adalah 30 lebih kecil dari scope route dst-address 12.12.12.0/24 yaitu 40. fungsi dari Nexthop Self ini adalah memaksa peer dari BGP memakai nexthopnya sendiri sebagai contoh diatas dari R2 harus dikonfigurasi agar mengadvertise route nexthop diri sendiri untuk setiap peering ke iBGP atau ke R3. Oleh karena itu sekarang kita akan menambahkan nexthop self pada R2 peer yang ke 23.23.23.3SEQ HOST SIZE TTL TIME STATUS
0 no route to host
1 no route to host
2 no route to host
sent=3 received=0 packet-loss=100%
[admin@R3] > ip route print detail where dst-address=1.1.1.1/32
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit
0 Db dst-address=1.1.1.1/32 gateway=12.12.12.1 gateway-status=12.12.12.1 unreachable distance=200 scope=40 target-scope=30 bgp-as-path="100" bgp-local-pref=100 bgp-origin=incomplete received-from=peer1
[admin@R2] > routing bgp peer print
Flags: X - disabled, E - established
# INSTANCE REMOTE-ADDRESS REMOTE-AS
0 E default 12.12.12.1 100
1 E default 23.23.23.3 200
[admin@R2] > routing bgp peer set numbers=1 nexthop-choice=force-self
[admin@R3] > ip route print detail where dst-address=1.1.1.1/32
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit
0 ADb dst-address=1.1.1.1/32 gateway=23.23.23.2 gateway-status=23.23.23.2 reachable via ether1 distance=200 scope=40 target-scope=30 bgp-as-path="100"
bgp-local-pref=100 bgp-origin=incomplete received-from=peer
Alhamdulillah postingan kali ini telah selesai, jika artikel ini terasa bermanfaat silahkan bisa di share dengan menekan salah satu button dibawah ini.Flags: X - disabled, E - established
# INSTANCE REMOTE-ADDRESS REMOTE-AS
0 E default 12.12.12.1 100
1 E default 23.23.23.3 200
[admin@R2] > routing bgp peer set numbers=1 nexthop-choice=force-self
[admin@R3] > ip route print detail where dst-address=1.1.1.1/32
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit
0 ADb dst-address=1.1.1.1/32 gateway=23.23.23.2 gateway-status=23.23.23.2 reachable via ether1 distance=200 scope=40 target-scope=30 bgp-as-path="100"
bgp-local-pref=100 bgp-origin=incomplete received-from=peer
Wassalamu'alaikum ...
0 Komentar
Penulisan markup di komentar