Thursday, March 21, 2013

cara load balancing 2 modem ADSL speedy

 

Written By Muhammad Fadilah on Kamis, 18 Oktober 2012 | 20.33

Topologi Load Balance menggunakan MikroTik RB750
Kali ini saya share lagi skrip konfigurasi untuk setting Load Balance 2 ADSL Speedy di Mikrotik RouterBOARD RB750 yang pernah saya terapkan untuk Warnet. Silahkan dipelajari dan disesuaikan. Semoga bermanfaat.


[admin@SGK] > inter pppoe-client print
Flags: X - disabled, R - running
0    name="DialSpeedy01" max-mtu=1480 max-mru=1480 mrru=disabled interface=KeModem01 user="14xxxxxxxxx@telkom.net" password="dfsfsfs" profile=default
service-name="Speedy01" ac-name="" add-default-route=no dial-on-demand=no use-peer-dns=no allow=pap,chap,mschap1,mschap2

1    name="DialSpeedy02" max-mtu=1480 max-mru=1480 mrru=disabled interface=KeModem02 user="14xxxxxxxx@telkom.net" password="yuiyiyi" profile=default
service-name="Speedy02" ac-name="" add-default-route=no dial-on-demand=no use-peer-dns=no allow=pap,chap,mschap1,mschap2


[admin@SGK] > 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   S  0.0.0.0/0                          DialSpeedy01       1
1   S  0.0.0.0/0                          DialSpeedy02       1
2   S  0.0.0.0/0                          DialSpeedy02       1
3   S  0.0.0.0/0                          DialSpeedy01       1
4   S  0.0.0.0/0                          DialSpeedy02       2
5 ADC  192.168.0.0/24     192.168.0.1     KeSwitch           0
6 ADC  192.168.1.0/24     192.168.1.2     KeModem01          0
7 ADC  192.168.2.0/24     192.168.2.2     KeModem02          0
8 ADC  192.168.3.0/24     192.168.3.1     KeAccessPoint      0


/ip firewall nat
add action=masquerade chain=srcnat comment="" disabled=no out-interface=\
DialSpeedy01 src-address=192.168.0.0/24
add action=masquerade chain=srcnat comment="" disabled=no out-interface=\
DialSpeedy02 src-address=192.168.0.0/24

[admin@SGK] > ip add print
Flags: X - disabled, I - invalid, D - dynamic
#   ADDRESS            NETWORK         BROADCAST       INTERFACE
0   192.168.1.2/24     192.168.1.0     192.168.1.255   KeModem01
1   192.168.2.2/24     192.168.2.0     192.168.2.255   KeModem02
2   192.168.0.1/24     192.168.0.0     192.168.0.255   KeSwitch
3   192.168.3.1/24     192.168.3.0     192.168.3.255   KeAccessPoint

[admin@SGK] > inte print
Flags: D - dynamic, X - disabled, R - running, S - slave
#     NAME                                             TYPE             MTU   L2MTU
0     KeModem01                                        ether            1500  1526
1     KeModem02                                        ether            1500  1524
2     KeProxy                                          ether            1500  1524
3     KeAccessPoint                                    ether            1500  1524
4  R  KeSwitch                                         ether            1500  1524
5     DialSpeedy01                                     pppoe-out
6     DialSpeedy02                                     pppoe-out

[admin@SGK] > ip fi ma print
Flags: X - disabled, I - invalid, D - dynamic
0 I ;;; Marking Load Balance
chain=input action=mark-connection new-connection-mark=speedy01_cm
passthrough=yes connection-state=new in-interface=DialSpeedy01

1 I chain=input action=mark-connection new-connection-mark=speedy02_cm
passthrough=yes connection-state=new in-interface=DialSpeedy02

2 I chain=prerouting action=mark-connection new-connection-mark=speedy01_cm
passthrough=yes connection-state=established in-interface=DialSpeedy01

3 I chain=prerouting action=mark-connection new-connection-mark=speedy02_cm
passthrough=yes connection-state=established in-interface=DialSpeedy02

4 I chain=prerouting action=mark-connection new-connection-mark=speedy01_cm
passthrough=yes connection-state=related in-interface=DialSpeedy01

5 I chain=prerouting action=mark-connection new-connection-mark=speedy02_cm
passthrough=yes connection-state=related in-interface=DialSpeedy02

6   chain=output action=mark-routing new-routing-mark=speedy01_rm passthrough=no
connection-mark=speedy01_cm

7   chain=output action=mark-routing new-routing-mark=speedy02_rm passthrough=no
connection-mark=speedy02_cm

8   ;;; PCC Load Balance KeSwitch
chain=prerouting action=mark-connection new-connection-mark=speedy01_cm
passthrough=yes dst-address-type=!local in-interface=KeSwitch
per-connection-classifier=both-addresses-and-ports:2/0

9   chain=prerouting action=mark-connection new-connection-mark=speedy02_cm
passthrough=yes dst-address-type=!local in-interface=KeSwitch
per-connection-classifier=both-addresses-and-ports:2/1

No comments:

Post a Comment