Febriyan Net - Ada beberapa cara untuk menghubungkan suatu area ke dalam area backbone pada OSPF, salah satu nya adalah dengan menggunakan GRE Tunnel, bisa juga menggunakan virtual link, untuk teknik menghubungkan dengan virtual link, teman teman bisa membaca di artikel Lab 2 : Virtual Link pada Mikrotik . Pada artikel kali ini, kita akan membahas dengan yang menggunakan GRE Tunnel . Fungsinya sendiri adalah agar suatu area yang tidak terhubung langsung dengan area 0 bisa mendapatkan advertise network yang berasal dari area 0 . Dengan menggunakan Tunnel, seolah olah kita akan membuat terowongan khusus yang menghubungkan suatu area ke area 0 atau area backbone .
Berikut topologi yang akan kita buat :
Nah, jika tanpa menggunakan GRE Tunnel atau pun Virtual link, Router R3 tidak dapat mendapatkan advertise network dari area 0 . Langsung saja, konfigurasikan alamat ip dan OSPF terlebih dahulu pada masing masing router pada topologi :
Konfigurasi pada R1 :
Lalu konfigurasi R2 :
Konfigurasi R3 :
Konfigurasi R4 :
Oke, mari kita lihat table routing pada R3 sebelum dibuat GRE Tunnel :
Terlihat bahwa R3 tidak mempunyai route untuk menuju ke R1 (1.1.1.1) maka dari itu, kita akan membuat Tunnel.
Sekarang kita konfigurasi GRE Tunnel pada R2 dan R4 .
Konfigurasi GRE Tunnel R2 :
Konfigurasi GRE Tunnel R3 :
Sekarang kita cek kembali table routing pada R3 :
Nah, terlihat R3 sudah mempunyai rute untuk menuju R1 yang akan melalui tunnel yang sudah dibuat . Jika R3 sudah mempunyai route yang berasal dari AREA 0 berarti konfigurasi kita sudah berhasil.
Terimakasih
Berikut topologi yang akan kita buat :
Nah, jika tanpa menggunakan GRE Tunnel atau pun Virtual link, Router R3 tidak dapat mendapatkan advertise network dari area 0 . Langsung saja, konfigurasikan alamat ip dan OSPF terlebih dahulu pada masing masing router pada topologi :
Konfigurasi pada R1 :
[admin@R1] > /interface bridge
[admin@R1] /interface bridge> add name=lo0
[admin@R1] > /routing ospf instance
[admin@R1] /routing ospf instance> set [ find default=yes ] router-id=1.1.1.1
[admin@R1] > /ip address
[admin@R1] /ip address> add address=10.10.10.1/24 interface=ether1 network=10.10.10.0
[admin@R1] /ip address> add address=1.1.1.1 interface=lo0 network=1.1.1.1
[admin@R1] > /routing ospf network
[admin@R1] /routing ospf network> add area=backbone network=1.1.1.1/32
[admin@R1] /routing ospf network> add area=backbone network=10.10.10.0/24
[admin@R1] /interface bridge> add name=lo0
[admin@R1] > /routing ospf instance
[admin@R1] /routing ospf instance> set [ find default=yes ] router-id=1.1.1.1
[admin@R1] > /ip address
[admin@R1] /ip address> add address=10.10.10.1/24 interface=ether1 network=10.10.10.0
[admin@R1] /ip address> add address=1.1.1.1 interface=lo0 network=1.1.1.1
[admin@R1] > /routing ospf network
[admin@R1] /routing ospf network> add area=backbone network=1.1.1.1/32
[admin@R1] /routing ospf network> add area=backbone network=10.10.10.0/24
Lalu konfigurasi R2 :
[admin@R2] > /interface bridge
[admin@R2] /interface bridge> add name=lo0
[admin@R2] > /routing ospf area
[admin@R2] /routing ospf area> add area-id=0.0.0.1 name=area1
[admin@R2] > /routing ospf instance
[admin@R2] /routing ospf instance> set [ find default=yes ] router-id=2.2.2.2
[admin@R2] > /ip address
[admin@R2] /ip address> add address=10.10.10.2/24 interface=ether1 network=10.10.10.0
[admin@R2] /ip address> add address=2.2.2.2 interface=lo0 network=2.2.2.2
[admin@R2] /ip address> add address=11.11.11.2/24 interface=ether2 network=11.11.11.0
[admin@R2] > /ip route
[admin@R2] /ip route> add distance=1 dst-address=3.3.3.3/32 gateway=11.11.11.3
[admin@R2] > /routing ospf network
[admin@R2] /routing ospf network> add area=backbone network=2.2.2.2/32
[admin@R2] /routing ospf network> add area=backbone network=10.10.10.0/24
[admin@R2] /routing ospf network> add area=area1 network=11.11.11.0/24
[admin@R2] /interface bridge> add name=lo0
[admin@R2] > /routing ospf area
[admin@R2] /routing ospf area> add area-id=0.0.0.1 name=area1
[admin@R2] > /routing ospf instance
[admin@R2] /routing ospf instance> set [ find default=yes ] router-id=2.2.2.2
[admin@R2] > /ip address
[admin@R2] /ip address> add address=10.10.10.2/24 interface=ether1 network=10.10.10.0
[admin@R2] /ip address> add address=2.2.2.2 interface=lo0 network=2.2.2.2
[admin@R2] /ip address> add address=11.11.11.2/24 interface=ether2 network=11.11.11.0
[admin@R2] > /ip route
[admin@R2] /ip route> add distance=1 dst-address=3.3.3.3/32 gateway=11.11.11.3
[admin@R2] > /routing ospf network
[admin@R2] /routing ospf network> add area=backbone network=2.2.2.2/32
[admin@R2] /routing ospf network> add area=backbone network=10.10.10.0/24
[admin@R2] /routing ospf network> add area=area1 network=11.11.11.0/24
Konfigurasi R3 :
[admin@R3] > /interface bridge
[admin@R3] /interface bridge> add name=lo0
[admin@R3] > /routing ospf area
[admin@R3] /routing ospf area> add area-id=0.0.0.1 name=area1
[admin@R3] /routing ospf area> add area-id=0.0.0.2 name=area2
[admin@R3] > /ip address
[admin@R3] /ip address> add address=11.11.11.3/24 interface=ether1 network=11.11.11.0
[admin@R3] /ip address> add address=3.3.3.3 interface=lo0 network=3.3.3.3
[admin@R3] /ip address> add address=12.12.12.3/24 interface=ether2 network=12.12.12.0
[admin@R3] > /ip route
[admin@R3] /ip route> add distance=1 dst-address=2.2.2.2/32 gateway=11.11.11.2
[admin@R3] > /routing ospf network
[admin@R3] /routing ospf network> add area=area1 network=11.11.11.0/24
[admin@R3] /routing ospf network> add area=area1 network=3.3.3.3/32
[admin@R3] /routing ospf network> add area=area2 network=12.12.12.0/24
[admin@R3] /interface bridge> add name=lo0
[admin@R3] > /routing ospf area
[admin@R3] /routing ospf area> add area-id=0.0.0.1 name=area1
[admin@R3] /routing ospf area> add area-id=0.0.0.2 name=area2
[admin@R3] > /ip address
[admin@R3] /ip address> add address=11.11.11.3/24 interface=ether1 network=11.11.11.0
[admin@R3] /ip address> add address=3.3.3.3 interface=lo0 network=3.3.3.3
[admin@R3] /ip address> add address=12.12.12.3/24 interface=ether2 network=12.12.12.0
[admin@R3] > /ip route
[admin@R3] /ip route> add distance=1 dst-address=2.2.2.2/32 gateway=11.11.11.2
[admin@R3] > /routing ospf network
[admin@R3] /routing ospf network> add area=area1 network=11.11.11.0/24
[admin@R3] /routing ospf network> add area=area1 network=3.3.3.3/32
[admin@R3] /routing ospf network> add area=area2 network=12.12.12.0/24
Konfigurasi R4 :
[admin@R4] > /interface bridge
[admin@R4] /interface bridge> add name=lo0
[admin@R4] > /routing ospf area
[admin@R4] /routing ospf area> add area-id=0.0.0.2 name=area2
[admin@R4] > /routing ospf instance
[admin@R4] /routing ospf instance> set [ find default=yes ] router-id=4.4.4.4
[admin@R4] > /ip address
[admin@R4] /ip address> add address=12.12.12.4/24 interface=ether1 network=12.12.12.0
[admin@R4] /ip address> add address=4.4.4.4 interface=lo0 network=4.4.4.4
[admin@R4] > /routing ospf network
[admin@R4] /routing ospf network> add area=area2 network=4.4.4.4/32
[admin@R4] /routing ospf network> add area=area2 network=12.12.12.0/24
[admin@R4] /interface bridge> add name=lo0
[admin@R4] > /routing ospf area
[admin@R4] /routing ospf area> add area-id=0.0.0.2 name=area2
[admin@R4] > /routing ospf instance
[admin@R4] /routing ospf instance> set [ find default=yes ] router-id=4.4.4.4
[admin@R4] > /ip address
[admin@R4] /ip address> add address=12.12.12.4/24 interface=ether1 network=12.12.12.0
[admin@R4] /ip address> add address=4.4.4.4 interface=lo0 network=4.4.4.4
[admin@R4] > /routing ospf network
[admin@R4] /routing ospf network> add area=area2 network=4.4.4.4/32
[admin@R4] /routing ospf network> add area=area2 network=12.12.12.0/24
Oke, mari kita lihat table routing pada R3 sebelum dibuat GRE Tunnel :
[admin@R3] > 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 A S 2.2.2.2/32 11.11.11.2 1
1 ADC 3.3.3.3/32 3.3.3.3 lo0 0
2 ADo 4.4.4.4/32 12.12.12.4 110
3 ADC 11.11.11.0/24 11.11.11.3 ether1 0
4 ADC 12.12.12.0/24 12.12.12.3 ether2 0
[admin@R3] >
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 A S 2.2.2.2/32 11.11.11.2 1
1 ADC 3.3.3.3/32 3.3.3.3 lo0 0
2 ADo 4.4.4.4/32 12.12.12.4 110
3 ADC 11.11.11.0/24 11.11.11.3 ether1 0
4 ADC 12.12.12.0/24 12.12.12.3 ether2 0
[admin@R3] >
Terlihat bahwa R3 tidak mempunyai route untuk menuju ke R1 (1.1.1.1) maka dari itu, kita akan membuat Tunnel.
Sekarang kita konfigurasi GRE Tunnel pada R2 dan R4 .
Konfigurasi GRE Tunnel R2 :
[admin@R2] > /interface gre
[admin@R2] /interface gre> add local-address=2.2.2.2 name=gre-tunnel1 remote-address=3.3.3.3
[admin@R2] > /ip address
[admin@R2] /ip address> add address=192.168.1.1/30 interface=gre-tunnel1 network=192.168.1.0
[admin@R2] > /routing ospf network
[admin@R2] /routing ospf network> add area=backbone network=192.168.1.0/30
[admin@R2] /interface gre> add local-address=2.2.2.2 name=gre-tunnel1 remote-address=3.3.3.3
[admin@R2] > /ip address
[admin@R2] /ip address> add address=192.168.1.1/30 interface=gre-tunnel1 network=192.168.1.0
[admin@R2] > /routing ospf network
[admin@R2] /routing ospf network> add area=backbone network=192.168.1.0/30
Konfigurasi GRE Tunnel R3 :
[admin@R3] > /interface gre
[admin@R3] /interface gre> add disabled=yes local-address=3.3.3.3 name=gre-tunnel1 remote-address=2.2.2.2
[admin@R3] > /ip address
[admin@R3] /ip address> add address=192.168.1.2/30 interface=gre-tunnel1 network=192.168.1.0
[admin@R3] > /routing ospf network
[admin@R3] /routing ospf network> add area=backbone network=192.168.1.0/30
[admin@R3] /interface gre> add disabled=yes local-address=3.3.3.3 name=gre-tunnel1 remote-address=2.2.2.2
[admin@R3] > /ip address
[admin@R3] /ip address> add address=192.168.1.2/30 interface=gre-tunnel1 network=192.168.1.0
[admin@R3] > /routing ospf network
[admin@R3] /routing ospf network> add area=backbone network=192.168.1.0/30
Sekarang kita cek kembali table routing pada R3 :
[admin@R3] > 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 192.168.1.1 110
1 A S 2.2.2.2/32 11.11.11.2 1
2 Do 2.2.2.2/32 192.168.1.1 110
3 ADC 3.3.3.3/32 3.3.3.3 lo0 0
4 ADo 4.4.4.4/32 12.12.12.4 110
5 ADo 10.10.10.0/24 192.168.1.1 110
6 ADC 11.11.11.0/24 11.11.11.3 ether1 0
7 ADC 12.12.12.0/24 12.12.12.3 ether2 0
8 ADC 192.168.1.0/30 192.168.1.2 gre-tunnel1 0
[admin@R3] >
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 192.168.1.1 110
1 A S 2.2.2.2/32 11.11.11.2 1
2 Do 2.2.2.2/32 192.168.1.1 110
3 ADC 3.3.3.3/32 3.3.3.3 lo0 0
4 ADo 4.4.4.4/32 12.12.12.4 110
5 ADo 10.10.10.0/24 192.168.1.1 110
6 ADC 11.11.11.0/24 11.11.11.3 ether1 0
7 ADC 12.12.12.0/24 12.12.12.3 ether2 0
8 ADC 192.168.1.0/30 192.168.1.2 gre-tunnel1 0
[admin@R3] >
Nah, terlihat R3 sudah mempunyai rute untuk menuju R1 yang akan melalui tunnel yang sudah dibuat . Jika R3 sudah mempunyai route yang berasal dari AREA 0 berarti konfigurasi kita sudah berhasil.
Terimakasih
0 comments