Wednesday 29 August 2007

Load Balancing over Multiple Gateways

From MikroTik Wiki
Jump to: navigation, search

ini adalah rule yang digunakan dalam sistem ini
Image:dual_gw_01.jpg

ini ada sedikit ilmu tentang loadbalancing yang gw tau sorry ada sedikit bahasa inggis ya gw males gartiin nya


Let us assume we use for our workstations IP addresses from network 192.168.100.0/24. The IP addresses are assigned as follows:

* 192.168.100.1-127 are used for Group A workstations
* 192.168.100.128-253 are used for Group B workstations
* 192.168.100.254 is used for the router.

All workstations have IP configuration with the IP address from the relevant group, they all have network mask 255.255.255.0, and 192.168.100.254 is the default gateway for them. We will talk about DNS servers later.

Now, when we have workstations divided into groups, we can refer to them using subnet addressing:

* Group A is 192.168.100.0/25, i.e., addresses 192.168.100.0-127
* Group B is 192.168.100.128/25, i.e., addresses 192.168.100.128-255

If you do not understand this, take the TCP/IP Basics course,
or, look for some resources about subnetting on the Internet!

We need to add two IP Firewall Mangle rules to mark the packets originated from Group A or Group B workstations.

For Group A, specify

* Chain prerouting and Src. Address 192.168.100.0/25
* Action mark routing and New Routing Mark GroupA.

Image:dual_gw_22.jpg

It is a good practice to add a comment as well. Your mangle rules might be interesting for someone else and for yourself as well after some time.

For Group B, specify

* Chain prerouting and Src. Address 192.168.100.128/25
* Action mark routing and New Routing Mark GroupB

Image:dual_gw_25.jpg

All IP traffic coming from workstations is marked with the routing marks GroupA or GroupB. We can use these marks in the routing table.

Next, we should specify two default routes (destination 0.0.0.0/0) with appropriate routing marks and gateways:

Image:dual_gw_26.jpg

ini tidak akan langsung bekerja , anda harus megeset masquerading for your LAN! dan pengaturan NAT rule for Src. Address 192.168.100.0/24 and Action masquerade:

Image:dual_gw_28.jpg

Test t tracing the route ke IP address on the Internet or isp !


C:\>tracert -d 8.8.8.8

Tracing route to 8.8.8.8 over a maximum of 30 hops

1 2 ms 2 ms 2 ms 192.168.100.254
2 10 ms 4 ms 3 ms 10.1.0.1
...

From a workstation of Group B, it should go like this:

C:\>tracert -d 8.8.8.8

Tracing route to 8.8.8.8 over a maximum of 30 hops

1 2 ms 2 ms 2 ms 192.168.100.254
2 10 ms 4 ms 3 ms 10.5.8.1
...

anda bisa langsung cobadeh lo semua kagak bakal rugi deh gw jamin boss


<======************ created by MikroTik Wiki*************========>

No comments: