Tutorial untuk pengguna mikrotik versi 3.x.xx dan versi 4.xx tanpa menggunakan proxy
Langka pertama
Ip modem 1 192.168.1.1
Ip modem 2 192.168.2.1
colokkan modem 1 pada ether1
colokkan modem 2 pada ether2
colokkan yang dari hub pada ether3
posisi PPoE dari modem
ILUSTRASI |
--------------------------------------------------------------------------
Pada mikrotik
buka pada winbox.
muncul baru pertama kali remove all configuration
--------------------------------------------------------------------------
Code:
/interface
set 0 name=modem1
set 1 name=modem2
set 2 name=lokal
buat IP di masing2 ethernet
Code:
/ip address
add address=192.168.1.2/24 netmask=255.255.255.0 interface=modem1
add address=192.168.2.2/24 netmask=255.255.255.0 interface=modem2
add address=192.168.0.1/26 netmask=255.255.255.0 interface=lokal
buat mangle untuk load balancing
Code:
/ip firewall mangle
add chain=prerouting in-interface=lokal connection-state=new nth=2,1 action=mark-connection new-connection-mark=speedy1 passthrough=yes
add chain=prerouting in-interface=lokal connection-mark=speedy1 action=mark-routing new-routing-mark=speedy1 passthrough=no
add chain=prerouting in-interface=lokal connection-state=new nth=2,2 action=mark-connection new-connection-mark=speedy2 passthrough=yes
add chain=prerouting in-interface=lokal connection-mark=speedy2 action=mark-routing new-routing-mark=speedy2 passthrough=no
buat NAT untuk load balancing
Code:
/ip firewall nat
chain=srcnat out-interface=modem1 action=masquerade
chain=srcnat out-interface=modem2 action=masquerade
buat ip route
Code:
/ip route
add gateway=192.168.1.1
add gateway=192.168.2.1 routing-mark=speedy2
------------------------------------------------------------------------------------------------------------------------------------------------------
Load Balancing 2 Speedy + Squid (Ubuntu Server 9.10)+ Hotspot
Maaf Sebelumnya ane buat thread ini supaya membantu bagi yang bingung untuk menggabung 2 speedy dengan menggunakan Mikrotik 2.9.27. Ini menggunakan teknik nth pada 2 keluaran dan 1 keluaran untuk hotspot.
Berikut topologinya
Quote:
Untuk Konfigurasi Mikrotiknya adalah
IP yang diberikan adalah
Mikrotik (192.168.0.63/26) karena menggunakan (63 mesin)
Squid (192.168.3.254)
Speedy1 (192.168.1.254)
Speedy2 (192.168.2.254)
Proxy (192.168.3.254)
Step 1 : Interface
Quote:
[admin@paus.net] > interface pr
Flags: X - disabled, D - dynamic, R - running
# NAME TYPE RX-RATE TX-RATE MTU
0 R Lokal ether 0 0 1500
1 R HotSpot ether 0 0 1500
2 R Speedy2 ether 0 0 1500
3 R Speedy1 ether 0 0 1500
4 R Proxy ether 0 0 1500
Step 2 : Mangle
Quote:
[admin@paus.net] > ip firewall mangle pr
Flags: X - disabled, I - invalid, D - dynamic
0 chain=prerouting in-interface=Lokal connection-state=new nth=1,1,0
action=mark-connection new-connection-mark=spidol1 passthrough=yes
1 chain=prerouting in-interface=Lokal connection-mark=spidol1
action=mark-routing new-routing-mark=spidol1 passthrough=no
2 chain=prerouting in-interface=Lokal connection-state=new nth=1,1,1
action=mark-connection new-connection-mark=spidol2 passthrough=yes
3 chain=prerouting in-interface=Lokal connection-mark=spidol2
action=mark-routing new-routing-mark=spidol2 passthrough=no
4 ;;; proxy
chain=prerouting in-interface=Proxy connection-state=new nth=1,1,0
action=mark-connection new-connection-mark=spidol1 passthrough=yes
5 chain=prerouting in-interface=Proxy connection-mark=spidol1
action=mark-routing new-routing-mark=spidol1 passthrough=no
6 chain=prerouting in-interface=Proxy connection-state=new nth=1,1,1
action=mark-connection new-connection-mark=spidol2 passthrough=yes
7 chain=prerouting in-interface=Proxy connection-mark=spidol2
action=mark-routing new-routing-mark=spidol2 passthrough=no
Step 3 : Ip Route
Quote:
[admin@paus.net] > ip route pr
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf
# DST-ADDRESS PREF-SRC G GATEWAY DISTANCE INTERFACE
0 ADC 10.10.10.0/24 10.10.10.1 HotSpot
1 ADC 192.168.0.0/26 192.168.0.63 Lokal
2 ADC 192.168.1.0/24 192.168.1.253 Speedy1
3 ADC 192.168.2.0/24 192.168.2.253 Speedy2
4 ADC 192.168.3.0/24 192.168.3.253 Proxy
5 A S 0.0.0.0/0 r 192.168.1.254 Speedy1
6 A S 0.0.0.0/0 r 192.168.2.254 Speedy2
Step 4 : NAT
Quote:
[admin@paus.net] > ip firewall nat pr
Flags: X - disabled, I - invalid, D - dynamic
0 ;;; Masquerade Lokal
chain=srcnat out-interface=Speedy1 action=masquerade
1 chain=srcnat out-interface=Speedy2 action=masquerade
2 chain=srcnat out-interface=Proxy action=masquerade
3 ;;; masquerade hotspot network
chain=srcnat src-address=10.10.10.0/24 action=masquerade
4 ;;; Belokkan ke proxy mikrotik
chain=dstnat src-address=192.168.0.0/24 protocol=tcp dst-port=80
action=dst-nat to-addresses=192.168.0.63 to-ports=3128
Step 7 : Hotspot
Quote:
Flags: X - disabled, I - invalid, S - HTTPS
# NAME INTERFACE ADDRESS-POOL PROFILE IDLE-TIMEOUT
0 hotspot1 HotSpot hs-pool-2 hsprof2 5m
Step 8 : Radius
Quote:
[admin@paus.net] radius> pr
Flags: X - disabled
# SERVICE CALLED-ID DOMAIN ADDRESS SECRET
0 hotspot 127.0.0.1 123456
Previewnya
----------------------------------------------------------------------------------------------------------------------
Tips and trik
apabila salah satu speedy down, silahkan disable semua mangle.
misalnya speedy2 down silahkan disable gateway yang mengarah speedy2
misalnya speedy1 down silahkan disable gateway yang mengarah speedy1 dan hilangkan routing-mark speedy2
Last edited by dionipe; 10-08-2010 at 05:38.
Reply With Quote
0 comments:
Post a Comment