Lab ini akan melakukan konfigurasi eBGP peering dengan menggunakan tool GNS3. Jadi kita bikin simulasi eBGP Peering dengan topologi berikut :
Tahapan Konfigurasi :
- Set Identity Router
- Add IP Address
- Set BGP Instance
- Add BGP Peer
Konfigurasi identity pada Mikrotik R1
[admin@R-1] > /system identity set name=R-1
Konfigurasi IP Address pada Mikrotik R1
admin@R-1] /ip address
add address=10.10.10.2/24 interface=ether4 network=10.10.10.0
add address=192.168.0.0/24 interface=ether2 network=192.168.0.0
add address=192.168.1.0/24 interface=ether3 network=192.168.1.0
Konfigurasi BGP Instance pada Mikrotik R1
admin@R-1] > /routing bgp instance set default as=100
Konfigurasi BGP Peering pada Mikrotik R1
admin@R-1] > /routing bgp peer add name=peer-to-R2 remote-address=10.10.10.2 remote-as=200
Konfigurasi R2 tahapannya sama dengan di R1, dimulai dari set identity
[admin@R-2] > /system identity set name=R-2
[admin@R-2] > /ip address
add address=10.10.10.2/24 interface=ether4 network=10.10.10.0
add address=192.168.2.0/24 interface=ether3 network=192.168.2.0
add address=192.168.3.0/24 interface=ether2 network=192.168.3.0
[admin@R-2] > /routing bgp instance set default as=200
[admin@R-2] > /routing bgp peer add name=peer-to-R1 remote-address=10.10.10.1 remote-as=100
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 ether4
1 192.168.0.0/24 192.168.0.0 ether2
2 192.168.1.0/24 192.168.1.0 ether3
[admin@R-2] > ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK INTERFACE
0 10.10.10.2/24 10.10.10.0 ether4
1 192.168.2.0/24 192.168.2.0 ether3
2 192.168.3.0/24 192.168.3.0 ether2
[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=200 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.3.0 local-address=10.10.10.1 uptime=1m33s 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] > 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=100 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.0.0 local-address=10.10.10.2 uptime=3m17s 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
Oke status sudah established yang berarti kedua router sudah berhasil peering antar remote AS yang berbeda.
Sekarang bisa dilanjut buat advertising network supaya kedua router saling kenal network dalamnya.
Konfigurasi advertising network ke dalam 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 network
add network=192.168.2.0/24
add network=192.168.3.0/24
Kalau sudah advertise network, mestinya masing-masing router sudah punya tabel routing yang dari BGP. Kita cek table routing di setiap Mikrotik apa sudah kenal network tetangga
[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=ether4 gateway-status=ether4 reachable
distance=0 scope=10
1 ADC dst-address=192.168.0.0/24 pref-src=192.168.0.0 gateway=ether2 gateway-status=ether2 reachable
distance=0 scope=10
2 ADC dst-address=192.168.1.0/24 pref-src=192.168.1.0 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 ether4
distance=20 scope=40 target-scope=10 bgp-as-path="200" 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 ether4
distance=20 scope=40 target-scope=10 bgp-as-path="200" bgp-origin=igp received-from=peer-to-R2
[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=ether4 gateway-status=ether4 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 ether4
distance=20 scope=40 target-scope=10 bgp-as-path="100" bgp-origin=igp received-from=peer1
2 ADb dst-address=192.168.1.0/24 gateway=10.10.10.1 gateway-status=10.10.10.1 reachable via ether4
distance=20 scope=40 target-scope=10 bgp-as-path="100" bgp-origin=igp received-from=peer1
3 ADC dst-address=192.168.2.0/24 pref-src=192.168.2.0 gateway=ether3 gateway-status=ether3 reachable
distance=0 scope=10
4 ADC dst-address=192.168.3.0/24 pref-src=192.168.3.0 gateway=ether2 gateway-status=ether2 reachable
distance=0 scope=10
Luar biasa... Tabel routing sudah muncul dari hasil advertis peering BGP.
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.
Lanjut ke lab lain.. :)
No comments:
Post a Comment