Lab ini akan melakukan konfigurasi iBGP peering dengan menggunakan tool GNS3. Jadi kita bikin simulasi iBGP Peering dengan topologi berikut :
Tahapan Konfigurasi :
Konfigurasi set identity router nya di R1:
[admin@Mikrotik] > /system identity set name=R-1
[admin@R-1] >
Konfigurasi menambahkan IP Address di Mikrotik R1 :
[admin@R-1] > /ip address
add address=10.10.10.1/24 interface=ether2 network=10.10.10.0
add address=192.168.1.1/24 interface=ether3 network=192.168.1.0
add address=192.168.0.1/24 interface=ether4 network=192.168.0.0
Konfigurasi set BGP Instance di Mikrotik R1 :
[admin@R-1] > /routing bgp instance set default as=12
Konfigurasi BGP Peering di Mikrotik ke remote AS yang sama (iBGP Peering) di R1:
[admin@R-1] > /routing bgp peer add name=peer-to-R2 remote-address=10.10.10.2 remote-as=12\
Konfigurasi di R2 tahapan nya sama seperti yang kita lakukan di R1 :
[admin@Mikrotik] > /system identity set name=R-2
[admin@R-2] >
[admin@R-2] > /ip address
add address=192.168.2.1/24 interface=ether3 network=192.168.2.0
add address=192.168.3.1/24 interface=ether4 network=192.168.3.0
add address=10.10.10.2/24 interface=ether2 network=10.10.10.0
[admin@R-2] > /routing bgp instance
set default as=12
[admin@R-2] > /routing bgp peer
add name=peer-to-R1 remote-address=10.10.10.1 remote-as=12
Pengecekan :
[admin@R-1] > ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK INTERFACE
0 10.10.10.1/24 10.10.10.0 ether2
1 192.168.1.1/24 192.168.1.0 ether3
2 192.168.0.1/24 192.168.0.0 ether4
[admin@R-1] >
[admin@R-2] > ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK INTERFACE
0 192.168.2.1/24 192.168.2.0 ether3
1 192.168.3.1/24 192.168.3.0 ether4
2 10.10.10.2/24 10.10.10.0 ether2
[admin@R-2] >
[admin@R-1] > routing bgp peer print status
Flags: X - disabled, E - established
0 E name="peer-to-R2" instance=default remote-address=10.10.10.2 remote-as=12 tcp-md5-key=""
nexthop-choice=default multihop=no route-reflect=no hold-time=3m ttl=255 in-filter="" out-filter=""
address-families=ip default-originate=never remove-private-as=no as-override=no passive=no use-bfd=no
remote-id=192.168.2.1 local-address=10.10.10.1 uptime=4m42s prefix-count=0 updates-sent=0
updates-received=0 withdrawn-sent=0 withdrawn-received=0 remote-hold-time=3m used-hold-time=3m
used-keepalive-time=1m refresh-capability=yes as4-capability=yes state=established
[admin@R-1] >
[admin@R-2] > routing bgp peer print status
Flags: X - disabled, E - established
0 E name="peer-to-R1" instance=default remote-address=10.10.10.1 remote-as=12 tcp-md5-key=""
nexthop-choice=default multihop=no route-reflect=no hold-time=3m ttl=255 in-filter="" out-filter=""
address-families=ip default-originate=never remove-private-as=no as-override=no passive=no use-bfd=no
remote-id=10.10.10.1 local-address=10.10.10.2 uptime=5m38s prefix-count=0 updates-sent=0
updates-received=0 withdrawn-sent=0 withdrawn-received=0 remote-hold-time=3m used-hold-time=3m
used-keepalive-time=1m refresh-capability=yes as4-capability=yes state=established
[admin@R-2] >
Ternyata sudah berhasil peering satu sama lain di AS yang sama.
Supaya kedua router bisa saling mengetahui keberadaan network dibelakang nya, kita lakukan advertising network ke dalam iBGP.
Konfigurasi advertising network BGP pada Mikrotik :
[admin@R-1] > /routing bgp networkadd network=192.168.0.0/24add network=192.168.1.0/24
[admin@R-2] > /routing bgp networkadd network=192.168.2.0/24add network=192.168.3.0/24
Sekarang pengecekan lagi, pengecekan apakah advertise network tetang sudah masuk ke dalam routing tabel atau belum.
[admin@R-1] > ip route print detail
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 ADC dst-address=10.10.10.0/24 pref-src=10.10.10.1 gateway=ether2 gateway-status=ether2 reachable
distance=0 scope=10
1 ADC dst-address=192.168.0.0/24 pref-src=192.168.0.1 gateway=ether4 gateway-status=ether4 reachable
distance=0 scope=10
2 ADC dst-address=192.168.1.0/24 pref-src=192.168.1.1 gateway=ether3 gateway-status=ether3 reachable
distance=0 scope=10
3 ADb dst-address=192.168.2.0/24 gateway=10.10.10.2 gateway-status=10.10.10.2 reachable via ether2
distance=200 scope=40 target-scope=30 bgp-local-pref=100 bgp-origin=igp received-from=peer-to-R2
4 ADb dst-address=192.168.3.0/24 gateway=10.10.10.2 gateway-status=10.10.10.2 reachable via ether2
distance=200 scope=40 target-scope=30 bgp-local-pref=100 bgp-origin=igp received-from=peer-to-R2
[admin@R-1] >
[admin@R-2] > ip route print detail
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 ADC dst-address=10.10.10.0/24 pref-src=10.10.10.2 gateway=ether2 gateway-status=ether2 reachable
distance=0 scope=10
1 ADb dst-address=192.168.0.0/24 gateway=10.10.10.1 gateway-status=10.10.10.1 reachable via ether2
distance=200 scope=40 target-scope=30 bgp-local-pref=100 bgp-origin=igp received-from=peer-to-R1
2 ADb dst-address=192.168.1.0/24 gateway=10.10.10.1 gateway-status=10.10.10.1 reachable via ether2
distance=200 scope=40 target-scope=30 bgp-local-pref=100 bgp-origin=igp received-from=peer-to-R1
3 ADC dst-address=192.168.2.0/24 pref-src=192.168.2.1 gateway=ether3 gateway-status=ether3 reachable
distance=0 scope=10
4 ADC dst-address=192.168.3.0/24 pref-src=192.168.3.1 gateway=ether4 gateway-status=ether4 reachable
distance=0 scope=10
[admin@R-2] >
Antar kedua router sudah menerima routingan dari masing-masing router yang melakukan advertise network di dalam iBGP.
Troubleshoot :
- Kalau peering belum established, pastikan konfigurasi IP Address sudah benar dan kedua router sudah bisa saling ping. Lalu, pastikan remote-address dan remote-as pada masing-masing router saat konfigurasi peering BGP sudah benar sesuai dengan masing-masing IP router tetangga yang sudah diset.
- Kalau routing tabel tidak muncul : pastikan konfigurasi advertise network sudah sesuai dengan alamat ip address yang sudah dikonfigurasi.
Selesaiii.. :)
No comments:
Post a Comment