Sunday, January 29, 2017

Superlab Mikrotik mudah Lab3

 Assalamualaikum wr.wb
   

Alhamdulillah saya diberi kesempatan untuk membagikan ilmu lagi kali ini masih tentang mikrotik yaitu Superlab Mikrotik mudah Lab3#1 hari ini semangatkan? harus semangat ok!!, cukup basa basinya sekarang langsung saja berikut topologinya



Tujuan nya dengan menyelesaikan lab ini adalah
  • Mengkoneksikan semua PC ke internet
  • Melimit penggunaan internet beberapa PC
  • Memblok situs
  • Menggunakan DNS Nawala
  • Meremote Router dari jaringan local yang sama
  • Meremote Router dari jaringan local yang berbeda
Langsung saja ke Konfigurasinya
Konfigurasi 1

 Kita konfigurasi yang router ISP supaya bisa konek internet dulu dan beri nama router yang lain
[admin@MikroTik] > /system identity set name=ISP 
[admin@ISP] > ip address
add address=10.0.1.5/24 interface=ether1
add address=1.1.1.1/24 interface=ether2
add address=2.2.2.1/24 interface=ether3
add address=3.3.3.1/24 interface=ether4
[admin@ISP] > ip route add gateway=10.0.1.4
[admin@ISP] > ip dns set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
[admin@ISP] > ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
[admin@MikroTik] > /system identity set name=R1
 [admin@MikroTik] > /system identity set name=R2
[admin@MikroTik] > /system identity set name=R3
[admin@MikroTik] > /system identity set name=R4
[admin@MikroTik] > /system identity set name=R5
[admin@MikroTik] > /system identity set name=R6
Konfigurasi 2
Kita mengkonfigurasi R1 supaya bisa konek internet dajuga kita setup dhcp untuk client yang berada dibawah R5 & 3
[admin@R1] >add address=1.1.1.2/24 interface=ether1 network=1.1.1.0
[admin@R1] >add address=5.5.5.1/24 interface=ether4 network=5.5.5.0
[admin@R1] > ip route add distance=1 gateway=1.1.1.1
[admin@R1] > ip firewall nat add action=masquerade chain=srcnat out-interface=ether1
[admin@R1] > ip dns set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
Kita buat Interface Bridge supaya R5&3 bisa mendapat ip satu jaringan dan beri ip address di Interface tersebut
[admin@R1] > interface bridge
add name=br_tunnel
add name=bridge_dhcp
[admin@R1] >/interface bridge port
add bridge=bridge_dhcp interface=ether2
add bridge=bridge_dhcp interface=ether3
add address=4.4.4.1/24 interface=bridge_dhcp network=4.4.4.0
Kemudian kita setup DHCP Server di interface Bridge supaya bisa mendapatkan ip otomatis, perlu diperhatikan IPnya nanti adalah ip clientnya R3&5

[admin@R1] > ip dhcp-server setup            
Select interface to run DHCP server on

dhcp server interface: bridge_dhcp
Select network for DHCP addresses

dhcp address space: 7.7.7.0/24
Select gateway for given network

gateway for dhcp network: 7.7.7.1
If this is remote network, enter address of DHCP relay

There is no such IP network on selected interface
dhcp relay: 7.7.7.1
Select pool of ip addresses given out by DHCP server

addresses to give out: 7.7.7.2-7.7.7.254
Select DNS servers

dns servers: 8.8.8.8,8.8.4.4
Select lease time

lease time: 3d

[admin@R1] > ip dhcp-server setup
Select interface to run DHCP server on

dhcp server interface: bridge_dhcp
Select network for DHCP addresses

dhcp address space: 8.8.8.0/24
Select gateway for given network

gateway for dhcp network: 8.8.8.1
If this is remote network, enter address of DHCP relay

There is no such IP network on selected interface
dhcp relay: 8.8.8.1
Select pool of ip addresses given out by DHCP server

addresses to give out: 8.8.8.2-8.8.8.254
Select DNS servers

dns servers: 8.8.8.8,8.8.4.4
Select lease time

lease time: 3d
Konfigurasi 3
kita seting R5 biar konek ke internet dan kita aktifkan juga DHCP Relaynya
[admin@R5] > ip address
add address=4.4.4.2/24 interface=ether1
add address=7.7.7.1/24 interface=ether2
[admin@R5] > ip route
add distance=1 gateway=4.4.4.1
[admin@R5] > ip firewall  nat
add action=masquerade chain=srcnat out-interface=ether1
[admin@R5] > ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
[admin@R5] > ip dhcp-relay
add dhcp-server=4.4.4.1 disabled=no interface=ether2 name=relay1
Konfigurasi 4
Pada konfigurasi 4 kita akan Konfigurasi R3 untuk fokus ke bridge dan juga Firewall layer 7 protocol.

[admin@R3] > ip address
add address=4.4.4.3/24 interface=ether1
[admin@R3] > ip dns set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
[admin@R3] > ip route add gateway=4.4.4.1
[admin@R3] > ip firewall nat add chain=srcnat out-interface=ether1 action=masquerade 
Sekarang aktifkan DHCP Relay nya







[admin@R3] > ip dhcp-relay
add dhcp-server=4.4.4.1 disabled=no interface=bridge_r3 name=relay2 

Sekarang kita membuat interface Bridge supaya client yang berbeda jaringan bisa menjadi jaringan yang sama dan beri IP di interface Bridge




[admin@R3] > interface bridge
add name=bridge_r3
[admin@R3] >/interface bridge port
add bridge=bridge_r3 interface=ether2
add bridge=bridge_r3 interface=ether3
add address=8.8.8.1/24 interface=bridge_r3
 Sekarang kita blok sebuah situs menggunakan Firewall layer7
[admin@R3] > ip  layer7-protocol
add name=detik regexp=.^detik.com.*
[admin@R3] >/ip firewall filter
add action=drop chain=forward layer7-protocol=detik
Konfigurasi 5
Dikonfigurasi ini kita akan kengkonfigurasi R2 untuk mengaktifkan DHCP server secara manual tanpa mengguankan dhcp-setup dan juga menambahkan dns nawala

[admin@R2] > ip address
add address=2.2.2.3/24 interface=ether1
add address=9.9.9.1/24 interface=ether2
add address=10.10.10.1/24 interface=ether4
add address=5.5.5.1/24 interface=ether3
[admin@R2] > ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
add action=masquerade chain=srcnat out-interface=ether3
[admin@R2] > ip route
add distance=1 gateway=2.2.2.1
[admin@R2] > ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4


Kita membuat Dhcp server manual dari ip pool
[admin@R2] > ip pool
add name=pool_dhcp ranges=10.10.10.2-10.10.10.20
kemudian di ip dhcp-server tambahkan seperti konfigurasi berikut
[admin@R2] > ip dhcp-server
add address-pool=pool_dhcp disabled=no interface=ether4 lease-time=3d name=dhcp_2
[admin@R2] >/ip dhcp-server network
add address=10.10.10.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=10.10.10.1
Konfigurasi 5 

Pada Konfigurasi 5 jaringan yang terkoneksi dengan internet yaitu IDN_R1, IDN_R2, dan IDN_6 akan dibuat tunnel eoip yang akan mejadi fail over rstp. 

[admin@R6] > ip address
add address=3.3.3.2/24 interface=ether1
add address=12.12.12.1/24 interface=ether2  

kemudian ke Interface eoip
[admin@R6] > interface
/interface eoip
add  name=eoip_ke_r1 remote-address=1.1.1.2 tunnel-id=2
add  name=eoip_ke_r2 remote-address=2.2.2.3 tunnel-id=4


kemudian interface  bridge
[admin@R6] > /interface bridge add name=br_tunnel

[admin@R6] > /interface bridge port
add bridge=br_tunnel interface=eoip_ke_r1
add bridge=br_tunnel interface=eoip_ke_r2
Di router 1 dan 2 juga seting seperti diatas tunnel id harus sama 


[admin@R1] >/interface eoip
add name=eoip_ke_r2 remote-address=2.2.2.3 tunnel-id=10
add  name=eoip_ke_r6 remote-address=3.3.3.2 tunnel-id=2
[admin@R1] >/interface bridge
add name=br_tunnel
/interface bridge port
add bridge=br_tunnel interface=eoip_ke_r6
add bridge=br_tunnel interface=eoip_ke_r2


[admin@R2] > /interface eoip
add name=eoip_ke_6 remote-address=3.3.3.2 tunnel-id=4
add name=eoip_ke_r1 remote-address=1.1.1.2/24 tunnel-id=10
[admin@R2] >/interface bridge
add name=br_tunnel
[admin@R2] >/interface bridge port
add bridge=br_tunnel interface=eoip_ke_r1
add bridge=br_tunnel interface=eoip_ke_6
 KIta cek apakan berhasil atau tidak
[admin@R6] > interface eoip print 
Flags: X - disabled, R - running
 0  R name="eoip_ke_r1" mtu=auto actual-mtu=1458 l2mtu=65535 mac-address=FE:43:56:E1:C3:77 arp=enabled local-address=0.0.0.0 remote-address=1.1.1.2 tunnel-id=2
      keepalive=10s,10 dscp=inherit clamp-tcp-mss=yes dont-fragment=no allow-fast-path=yes

 1  R name="eoip_ke_r2" mtu=auto actual-mtu=1458 l2mtu=65535 mac-address=FE:3B:E0:35:CD:5A arp=enabled local-address=0.0.0.0 remote-address=2.2.2.3 tunnel-id=4
      keepalive=10s,10 dscp=inherit clamp-tcp-mss=yes dont-fragment=no allow-fast-path=yes 

Kalo sudah ada tanda (R)Kemudian beri IP address interface tersebut

[admin@R6] > ip address
add address=6.6.6.4/24 interface=eoip_ke_r1
add address=6.6.6.5/25 interface=eoip_ke_r2
[admin@R1] > ip address
add address=6.6.6.7/24 interface=eoip_ke_r2 network=6.6.6.0
add address=6.6.6.8/24 interface=eoip_ke_r6 network=6.6.6.0
[admin@R2] > ip address
add address=6.6.6.2/24 interface=eoip_ke_r1 network=6.6.6.0
add address=6.6.6.3/24 interface=eoip_ke_6 network=6.6.6.0



 Konfigurasi 6






Router R4 akan dapat meremote semua router yang ada di dalam lokal
jaringan.kita seting setingan dasarnya dulu

[admin@R4] > ip address
add address=9.9.9.2/24 interface=ether1
add address=11.11.11.1/24 interface=ether2
[admin@R4] > ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
[admin@R4] > ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
[admin@R4] > ip route
add distance=1 gateway=9.9.9.1


Kita berikan ip R2 Menuju ke R1 dan bukan nat dari ether 3
[admin@R2] > ip address
add address=5.5.5.1/24 interface=ether3 network=5.5.5.0
[admin@R2] > ip firewall nat
add action=masquerade chain=srcnat out-interface=ether3
Kemudian tambahkan table routing dari R4
add distance=1 dst-address=4.4.4.0/24 gateway=9.9.9.1
add distance=1 dst-address=5.5.5.0/24 gateway=9.9.9.1

tambahkan juga di R2

[admin@R2] > ip route
add distance=1 dst-address=4.4.4.0/24 gateway=5.5.5.1




Konfigurasi 7
kita setup dhcp di R6 yaitu di ether2
[admin@R6] > ip dhcp-server setup          
Select interface to run DHCP server on

dhcp server interface: ether2
Select network for DHCP addresses

dhcp address space: 12.12.12.0/24
Select gateway for given network

gateway for dhcp network: 12.12.12.1
Select pool of ip addresses given out by DHCP server

addresses to give out: 12.12.12.2-12.12.12.254
Select DNS servers

dns servers: 8.8.8.8,8.8.4.4
Select lease time

lease time: 3d 

[admin@R6] > ip route
add check-gateway=ping  dst-address=4.4.4.0/24 gateway=6.6.6.3
add check-gateway=ping  dst-address=4.4.4.0/24 gateway=6.6.6.8
add check-gateway=ping  dst-address=5.5.5.0/24 gateway=3.3.3.1


Sekian tentang Lab 3 mikrotik seson 1 besok InshaAllah ada lagi, tetap semangat berbagi!!!!!

Artikel Terkait

Superlab Mikrotik mudah Lab3
4/ 5
Oleh

Berlangganan

Suka dengan artikel di atas? Silakan berlangganan gratis via email