Tuesday, March 24, 2015

Simulasi Network OSPF di Cisco, Mikrotik dan Juniper

Pembahasan berikutnya tentang simulasi OSPF. Ada 3 jenis perangkat yang digunakan, yaitu Cisco, Mikrotik dan Juniper Junos. Tujuan simulasi ini :
  • Melihat kinerja network yang diconnectkan dengan routing ospf.
  • Belajar command Juniper Junos.
Network OSPF Single Area


Konfigurasi IP address
Konfigurasi interfacenya. IP addressnya seperti pada tabel di bawah ini.
Router
F0/0
F0/1
F1/0
Loopback0
Cisco R-ACEH
10.12.12.1/30
10.41.41.2/30
192.168.1.1/24
1.1.1.1/32
Mikrotik R-JAKARTA
10.12.12.2/30
10.23.23.1/30
192.168.2.1/24
2.2.2.2/32
Cisco R-SURABAYA
10.34.34.1/30
10.23.23.2/30
192.168.3.1/24
3.3.3.3/32
Junos R-JAYAPURA
10.34.34.2/30 (em0)
10.41.41.1/30 (em1)
192.168.4.1/24 (em2)
4.4.4.4/32

Untuk Cisco dan Mikrotik, seharusnya sudah tau caranya... tinggal konfigurasi juniper. Ok. Berikut konfigurasi di junipernya.
root@JUNOS-R-JAYAPURA# edit interfaces em0

[edit interfaces em0]
root@JUNOS-R-JAYAPURA# set unit 0 family inet address 10.34.34.2/30

[edit interfaces em0]
root@JUNOS-R-JAYAPURA# edit unit 0

[edit interfaces em0 unit 0]
root@JUNOS-R-JAYAPURA# set description ##CONNECT-TO-R-SURABAYA##

[edit interfaces em0 unit 0]
root@JUNOS-R-JAYAPURA# top

[edit]
root@JUNOS-R-JAYAPURA# set interfaces em1 unit 0 family inet address 10.41.41.1/30

[edit]
root@JUNOS-R-JAYAPURA# edit interfaces lo0 unit 0

[edit interfaces lo0 unit 0]
root@JUNOS-R-JAYAPURA# edit family inet

[edit interfaces lo0 unit 0 family inet]
root@JUNOS-R-JAYAPURA# set address 4.4.4.4/32

[edit interfaces lo0 unit 0 family inet]
root@JUNOS-R-JAYAPURA# top

[edit]
root@JUNOS-R-JAYAPURA# edit interfaces

[edit interfaces]
root@JUNOS-R-JAYAPURA# set em1 description ##CONNECT-TO-CISCO-R-ACEH##

[edit interfaces]
root@JUNOS-R-JAYAPURA# edit interfaces em2 unit 0 family inet

[edit interfaces em2 unit 0 family inet]
root@JUNOS-R-JAYAPURA# set address 192.168.4.1/24

[edit interfaces em2 unit 0 family inet]
root@JUNOS-R-JAYAPURA# top

[edit]
root@JUNOS-R-JAYAPURA#set interfaces em2 description ##CONNECT-TO-USER-LAN##

[edit]
root@JUNOS-R-JAYAPURA# commit
commit complete

Sengaja saya praktekkan beberapa cara berbeda agar lebih mengerti tentang hirarki di Juniper. Descriptionnya bisa dibuat di em0-nya (fisik) atau di unit-nya (logical). Dan hasilnya.
Show ospf database (R-Jayapura)

root@JUNOS-R-JAYAPURA# run ping 10.41.41.2
PING 10.41.41.2 (10.41.41.2): 56 data bytes
64 bytes from 10.41.41.2: icmp_seq=0 ttl=255 time=227.851 ms
64 bytes from 10.41.41.2: icmp_seq=1 ttl=255 time=39.344 ms
64 bytes from 10.41.41.2: icmp_seq=2 ttl=255 time=54.168 ms
64 bytes from 10.41.41.2: icmp_seq=3 ttl=255 time=43.623 ms
^C
--- 10.41.41.2 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 39.344/91.246/227.851/79.053 ms

[edit]
root@JUNOS-R-JAYAPURA# run ping 10.34.34.1
PING 10.34.34.1 (10.34.34.1): 56 data bytes
64 bytes from 10.34.34.1: icmp_seq=0 ttl=255 time=196.312 ms
64 bytes from 10.34.34.1: icmp_seq=1 ttl=255 time=50.524 ms
64 bytes from 10.34.34.1: icmp_seq=2 ttl=255 time=31.478 ms
64 bytes from 10.34.34.1: icmp_seq=3 ttl=255 time=40.744 ms
^C
--- 10.34.34.1 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 31.478/79.764/196.312/67.625 ms

ok berhasil ping. Selanjutnya, membuat routing ospf. Dikarenakan topology network di atas adalah ring (lingkaran), maka kita gunakan metode ospf standar yang sederhana bin easy dan gampang, serta peace of cake. Hahaha..., yaitu .... Single Area OSPF.
Apa itu single area ospf. ? bahasa sederhananya, semua router menggunakan area yang sama (menjadi satu area).

Ok langsung, ke konfigurasi pada setiap router.
CISCO R-ACEH
R-ACEH#config ter
Enter configuration commands, one per line.  End with CNTL/Z.
R-ACEH(config)#router ospf 11
R-ACEH(config-router)#netw 10.41.41.0 0.0.0.3 area 0
R-ACEH(config-router)#netw 10.12.12.0 0.0.0.3 area 0
R-ACEH(config-router)#netw 192.168.1.0 0.0.0.0 area 0
R-ACEH(config-router)#netw 1.1.1.1 0.0.0.0 area 0
R-ACEH(config-router)#do wr
Building configuration...
[OK]

MIKROTIK R-JAKARTA
/routing ospf instance
set [ find default=yes ] disabled=no distribute-default=never in-filter=\
    ospf-in metric-bgp=auto metric-connected=20 metric-default=1 \
    metric-other-ospf=auto metric-rip=20 metric-static=20 name=default \
    out-filter=ospf-out redistribute-bgp=no redistribute-connected=no \
    redistribute-other-ospf=no redistribute-rip=no redistribute-static=no \
    router-id=2.2.2.2
/routing ospf area
set [ find default=yes ] area-id=0.0.0.0 disabled=no name=\
    backbone type=default
/routing ospf network
add area=backbone disabled=no network=2.2.2.2/32
add area=backbone disabled=no network=10.23.23.0/30
add area=backbone disabled=no network=10.12.12.0/30
add area=backbone disabled=no network=192.168.2.0/24

CISCO R-SURABAYA
R-SURABAYA#config ter
Enter configuration commands, one per line.  End with CNTL/Z.
R-SURABAYA(config)#router ospf 33
R-SURABAYA(config-router)#log
R-SURABAYA(config-router)#log-adjacency-changes
R-SURABAYA(config-router)#netw 10.34.34.0 0.0.0.3 area 0
R-SURABAYA(config-router)#netw 10.23.23.0 0.0.0.3 area 0
R-SURABAYA(config-router)#netw 192.168.3.0 0.0.0.255 area 0
R-SURABAYA(config-router)#netw 3.3.3.3 0.0.0.0 area 0
R-SURABAYA(config-router)#do wr
Building configuration...
[OK]

JUNOS R-JAYAPURA
root@JUNOS-R-JAYAPURA# edit protocols ospf

[edit protocols ospf]
root@JUNOS-R-JAYAPURA# set area 0 interface em0.0

[edit protocols ospf]
root@JUNOS-R-JAYAPURA# set area 0 interface em1.0

[edit protocols ospf]
root@JUNOS-R-JAYAPURA# set area 0 interface em2.0

[edit protocols ospf]
root@JUNOS-R-JAYAPURA# set area 0 interface lo0.0

[edit protocols ospf]
[edit protocols ospf]
root@JUNOS-R-JAYAPURA# show
area 0.0.0.0 {
    interface em0.0;
    interface em1.0;
    interface em2.0;
    interface lo0.0;
}

[edit protocols ospf]
root@JUNOS-R-JAYAPURA# commit
commit complete

Beres, dan mari kita lihat hasilnya. Dari Router Junos saja ngeliatnya, dengan menggunakan command “show ospf database” or bisa juga dicoba dengan command “show ospf neighbor”.
Show ospf database (R-Jayapura)

Ok. Terakhir tinggal disetting IP address di masing-masing PC dan dilakukan test ping. Misalnya dari PC 4, seperti gambar di bawah ini.
Ping dari PC 4

The End...

No comments:

Post a Comment