Hi…
Kali ini kita akan coba lab dengan menggabungkan ospf, bgp dan rip pada device mikrotik
Topology nya kira-kira seperti gambar berikut :
R1-R2-R3 terhubung menggunakan OSPF
R4-R5-R6 terhubung menggunakan RIPv2
R3-R4 terhubung menggunakan BGP
OK,, kita mulai ya
Mulai dari bagian OSPF terlebih dahulu
Konfig pada R1
[[email protected]] > system identity set name=R1 [[email protected]] > int br add name=lo1 [[email protected]] > ip add add add=1.1.1.1/32 interface=lo1 [[email protected]] > ip add add add=13.13.13.1/24 int=ether1 [[email protected]] > routing ospf instance set default router-id=1.1.1.1 [[email protected]] > routing ospf network add network=1.1.1.1/32 area=backbone
Konfig pada R2
[[email protected]] > system identity set name=R2 [[email protected]] > int br add name=lo1 [[email protected]] > ip add add add=2.2.2.2/32 interface=lo1 [[email protected]] > ip add add add=23.23.23.2/24 int=ether1 [[email protected]] > routing ospf instance set default router-id=2.2.2.2 [[email protected]] > routing ospf network add network=2.2.2.2/32 area=backbone [[email protected]] > routing ospf network add network=23.23.23.0/24 area=backbone
Konfig pada R3
[[email protected]] > system identity set name=R3 [[email protected]] > int br add name=lo1 [[email protected]] > ip add add add=3.3.3.3/32 int=lo1 [[email protected]] > ip add add add=13.13.13.3/24 int=ether1 [[email protected]] > ip add add add=23.23.23.3/24 int=ether2 [[email protected]] > ip add add add=34.34.34.3/24 interface=ether3 [[email protected]] > routing ospf instance set default router-id=3.3.3.3 [[email protected]] > routing ospf network add network=3.3.3.3/32 area=backbone [[email protected]] > routing ospf network add network=13.13.13.0/24 area=backbone [[email protected]] > routing ospf network add net=23.23.23.0/24 area=backbone [[email protected]] > routing ospf network add network=34.34.34.0/24 area=backbone
Verifikasi pada R1
[[email protected]] > ip route print 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 # DST-ADDRESS PREF-SRC GATEWAY DISTANCE 0 ADC 1.1.1.1/32 1.1.1.1 lo1 0 1 ADo 3.3.3.3/32 13.13.13.3 110 2 ADC 13.13.13.0/24 13.13.13.1 ether1 0 3 ADo 23.23.23.0/24 13.13.13.3 110 4 ADo 34.34.34.0/24 13.13.13.3 110
Verifikasi pada R2
[[email protected]] > ip route print 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 # DST-ADDRESS PREF-SRC GATEWAY DISTANCE 0 ADo 1.1.1.1/32 23.23.23.3 110 1 ADC 2.2.2.2/32 2.2.2.2 lo1 0 2 ADo 3.3.3.3/32 23.23.23.3 110 3 ADo 13.13.13.0/24 23.23.23.3 110 4 ADC 23.23.23.0/24 23.23.23.2 ether1 0 5 ADo 34.34.34.0/24 23.23.23.3 110
Verifikasi pada R3
[[email protected]] > ip route print 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 # DST-ADDRESS PREF-SRC GATEWAY DISTANCE 0 ADo 1.1.1.1/32 13.13.13.1 110 1 ADC 3.3.3.3/32 3.3.3.3 lo1 0 2 ADC 13.13.13.0/24 13.13.13.3 ether1 0 3 ADC 23.23.23.0/24 23.23.23.3 ether2 0 4 ADC 34.34.34.0/24 34.34.34.3 ether3 0
Lanjut ke bagian RIP pada R4-R5-R6
Konfig pada R4
[[email protected]] > system identity set name=R4 [[email protected]] > interface bridge add name=lo1 [[email protected]] > ip add add add=4.4.4.4/32 interface=lo1 [[email protected]] > ip add add add=45.45.45.4/24 interface=ether1 [[email protected]] > ip add add add=46.46.46.4/24 interface=ether2 [[email protected]] > ip add add add=34.34.34.4/24 interface=ether3 [[email protected]] > routing rip interface add interface=ether1 send=v2 receive=v2 [[email protected]] > routing rip network add network=46.46.46.0/24 [[email protected]] > routing rip net add net=45.45.45.0/24
Konfig pada R5
[[email protected]] > system identity set name=R5 [[email protected]] > interface bridge add name=lo1 [[email protected]] > ip add add add=5.5.5.5/32 int=lo1 [[email protected]] > ip add add add=45.45.45.5/24 interface=ether1 [[email protected]] > routing rip interface add interface=ether1 receive=v2 send=v2 [[email protected]] > routing rip network add network=5.5.5.5/32 [[email protected]] > routing rip network add network=45.45.45.0/24
Konfig pada R6
[[email protected]] > system identity set name=R6 [[email protected]] > interface bridge add name=lo1 [[email protected]] > ip add add add=6.6.6.6/32 interface=lo1 [[email protected]] > ip add add add=46.46.46.6/24 interface=ether1 [[email protected]] > routing rip interface add interface=ether1 send=v2 receive=v2 [[email protected]] > routing rip network add network=6.6.6.6/32 [[email protected]] > routing rip network add network=46.46.46.0/24
Verifikasi pada R4
[[email protected]] > ip route print 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 # DST-ADDRESS PREF-SRC GATEWAY DISTANCE 0 ADC 4.4.4.4/32 4.4.4.4 lo1 0 1 ADr 5.5.5.5/32 45.45.45.5 120 2 ADr 6.6.6.6/32 46.46.46.6 120 3 ADC 34.34.34.0/24 34.34.34.4 ether3 0 4 ADC 45.45.45.0/24 45.45.45.4 ether1 0 5 ADC 46.46.46.0/24 46.46.46.4 ether2 0
Verifikasi pada R5
[[email protected]] > ip route pr 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 # DST-ADDRESS PREF-SRC GATEWAY DISTANCE 0 ADC 5.5.5.5/32 5.5.5.5 lo1 0 1 ADr 6.6.6.6/32 45.45.45.4 120 2 ADC 45.45.45.0/24 45.45.45.5 ether1 0 3 ADr 46.46.46.0/24 45.45.45.4 120
Verifikasi pada R6
[[email protected]] > ip route pr 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 # DST-ADDRESS PREF-SRC GATEWAY DISTANCE 0 ADr 5.5.5.5/32 46.46.46.4 120 1 ADC 6.6.6.6/32 6.6.6.6 lo1 0 2 ADr 45.45.45.0/24 46.46.46.4 120 3 ADC 46.46.46.0/24 46.46.46.6 ether1 0
Sekarang lanjut ke BGP R3-R4
Konfig pada R3
[[email protected]] > routing bgp instance set default as=300 [[email protected]] > routing bgp peer add name=peer-to-R4 remote-address=34.34.34.4 remote-as=400 [[email protected]] > routing bgp network add network=3.3.3.3/32 [[email protected]] > routing bgp network add network=13.13.13.0/24 [[email protected]] > routing bgp network add network=23.23.23.0/24
Konfig pada R4
[[email protected]] > routing bgp instance set default as=400 [[email protected]] > routing bgp peer add name=peer-to-R3 remote-address=34.34.34.3 remote-as=300 [[email protected]] > routing bgp network add network=4.4.4.4/32 [[email protected]] > routing bgp network add network=45.45.45.0/24 [[email protected]] > routing bgp network add network=46.46.46.0/24
Verifikasi pada R3
[[email protected]] > ip route print 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 # DST-ADDRESS PREF-SRC GATEWAY DISTANCE 0 ADo 1.1.1.1/32 13.13.13.1 110 1 ADo 2.2.2.2/32 23.23.23.2 110 2 ADC 3.3.3.3/32 3.3.3.3 lo1 0 3 ADb 4.4.4.4/32 34.34.34.4 20 4 ADC 13.13.13.0/24 13.13.13.3 ether1 0 5 ADC 23.23.23.0/24 23.23.23.3 ether2 0 6 ADC 34.34.34.0/24 34.34.34.3 ether3 0 7 ADb 45.45.45.0/24 34.34.34.4 20 8 ADb 46.46.46.0/24 34.34.34.4 20
Verifikasi pada R4
[[email protected]] > ip route print 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 # DST-ADDRESS PREF-SRC GATEWAY DISTANCE 0 ADb 3.3.3.3/32 34.34.34.3 20 1 ADC 4.4.4.4/32 4.4.4.4 lo1 0 2 ADr 5.5.5.5/32 45.45.45.5 120 3 ADr 6.6.6.6/32 46.46.46.6 120 4 ADb 13.13.13.0/24 34.34.34.3 20 5 ADb 23.23.23.0/24 34.34.34.3 20 6 ADC 34.34.34.0/24 34.34.34.4 ether3 0 7 ADC 45.45.45.0/24 45.45.45.4 ether1 0 8 ADC 46.46.46.0/24 46.46.46.4 ether2 0
Nah, sekarang yang jadi pertanyaan adalah bagaimana advertise network OSPF, BGP dan RIP ke router R1,R2,R5 dan R6??
Kita aktifkan redistribute-bgp, redistribute-ospf dan redistribute-rip pada R3 dan R4 yang menjadi penghubung.
Konfig R3
[[email protected]] > routing bgp instance set default redistribute-ospf=yes [[email protected]] > routing ospf instance set default redistribute-bgp=as-type-1
Konfig R4
[[email protected]] > routing bgp instance set default redistribute-rip=yes [[email protected]] > routing rip set redistribute-bgp=yes
Verifikasi R3
[[email protected]] > ip route print 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 # DST-ADDRESS PREF-SRC GATEWAY DISTANCE 0 ADo 1.1.1.1/32 13.13.13.1 110 1 ADo 2.2.2.2/32 23.23.23.2 110 2 ADC 3.3.3.3/32 3.3.3.3 lo1 0 3 ADb 4.4.4.4/32 34.34.34.4 20 4 ADb 5.5.5.5/32 34.34.34.4 20 5 ADb 6.6.6.6/32 34.34.34.4 20 6 ADC 13.13.13.0/24 13.13.13.3 ether1 0 7 ADC 23.23.23.0/24 23.23.23.3 ether2 0 8 ADC 34.34.34.0/24 34.34.34.3 ether3 0 9 ADb 45.45.45.0/24 34.34.34.4 20 10 ADb 46.46.46.0/24 34.34.34.4 20
Verifikasi R4
[[email protected]] > ip route print 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 # DST-ADDRESS PREF-SRC GATEWAY DISTANCE 0 ADb 1.1.1.1/32 34.34.34.3 20 1 ADb 2.2.2.2/32 34.34.34.3 20 2 ADb 3.3.3.3/32 34.34.34.3 20 3 ADC 4.4.4.4/32 4.4.4.4 lo1 0 4 ADr 5.5.5.5/32 45.45.45.5 120 5 ADr 6.6.6.6/32 46.46.46.6 120 6 ADb 13.13.13.0/24 34.34.34.3 20 7 ADb 23.23.23.0/24 34.34.34.3 20 8 ADC 34.34.34.0/24 34.34.34.4 ether3 0 9 ADC 45.45.45.0/24 45.45.45.4 ether1 0 10 ADC 46.46.46.0/24 46.46.46.4 ether2 0
Dan akhirnya lengkap sudah routing table nya, silahkan cek juga pada R1, R2, R5 dan R6.
Sekarang coba ping dari R1 ke R6 atau dari Router mana saja
[[email protected]] > ping 6.6.6.6 SEQ HOST SIZE TTL TIME STATUS 0 6.6.6.6 56 62 98ms 1 6.6.6.6 56 62 208ms 2 6.6.6.6 56 62 375ms 3 6.6.6.6 56 62 238ms 4 6.6.6.6 56 62 308ms 5 6.6.6.6 56 62 215ms 6 6.6.6.6 56 62 409ms 7 6.6.6.6 56 62 351ms 8 6.6.6.6 56 62 377ms 9 6.6.6.6 56 62 360ms 10 6.6.6.6 56 62 172ms 11 6.6.6.6 56 62 364ms 12 6.6.6.6 56 62 397ms 13 6.6.6.6 56 62 393ms 14 6.6.6.6 56 62 378ms 15 6.6.6.6 56 62 345ms 16 6.6.6.6 56 62 247ms 17 6.6.6.6 56 62 191ms 18 6.6.6.6 56 62 291ms 19 6.6.6.6 56 62 227ms sent=20 received=20 packet-loss=0% min-rtt=98ms avg-rtt=297ms max-rtt=409ms
Ok sekian dulu ya… dilanjut pada lab-lab berikut nya. Terima Kasih