Follow us on...
Follow us on G+ Follow us on Twitter Follow us on Facebook Watch us on YouTube
Register
Results 1 to 7 of 7
  1. #1
    Status
    Offline
    idhamkhaidir's Avatar
    Baru Gabung
    Join Date
    Sep 2010
    Posts
    8
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0

    Static Routing Pada Mikrotik

    Saya punya LAN dengan mikrotik sebagai router gateway.
    Saya membuat load balancing dengan 2 ISP yang berbeda.
    Topologinya sebagai berikut:
    * 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.
    Group A menggunakan jalur ISP 1
    Sedangkan Group B menggunkan Jalur ISP 2
    Berikut settingan routingnya.

    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
    1 A S ;;; GW via for ISP1-route
    0.0.0.0/0 ISP 1 1
    2 S 0.0.0.0/0 ISP 1 1
    3 A S ;;; GW via for ISP2-route
    0.0.0.0/0 ISP 2 1
    4 S 0.0.0.0/0 ISP 2 1

    Adapun yang menjadi pertanyaan saya bagaimana caranya membuat routing bila mana
    ada request ke arah IP tertentu maka digunakan jalur ISP yang lain.

    Misal ada request utk ke arah IP 203.xxx.xxx.xxx dari jalur Group B maka saya ingin agar request tersebut melewati ISP 1.

  2. #2
    Status
    Offline
    kimteki's Avatar
    Baru Gabung
    Join Date
    Jun 2009
    Posts
    6
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    saya coba bntu yah gan, klo Statik Route tinggal diinput aja di route list untuk :
    - Default Route (0.0.0.0/0) --> Gateway nya ke ISP A
    - Extra Route (Input Manual) ---> Gateway nya ke ISP B

    klo ane make nya buat pisahin Bw Int'l (Default) dan Lokal (Extra)..... Click here to enlargeClick here to enlarge

  3. #3
    Status
    Offline
    kubby's Avatar
    Newbie
    Join Date
    May 2009
    Location
    Earth
    Posts
    31
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    Click here to enlarge Originally Posted by idhamkhaidir Click here to enlarge
    Saya punya LAN dengan mikrotik sebagai router gateway.
    Saya membuat load balancing dengan 2 ISP yang berbeda.
    Topologinya sebagai berikut:
    * 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.
    Group A menggunakan jalur ISP 1
    Sedangkan Group B menggunkan Jalur ISP 2
    Berikut settingan routingnya.

    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
    1 A S ;;; GW via for ISP1-route
    0.0.0.0/0 ISP 1 1
    2 S 0.0.0.0/0 ISP 1 1
    3 A S ;;; GW via for ISP2-route
    0.0.0.0/0 ISP 2 1
    4 S 0.0.0.0/0 ISP 2 1

    Adapun yang menjadi pertanyaan saya bagaimana caranya membuat routing bila mana
    ada request ke arah IP tertentu maka digunakan jalur ISP yang lain.

    Misal ada request utk ke arah IP 203.xxx.xxx.xxx dari jalur Group B maka saya ingin agar request tersebut melewati ISP 1.
    mangle chain=prerouting, dst-address=203.xxx.xxx.xxx, mark-route=ISP1-route, passtrough=NO

    taruh di paling atas

  4. #4
    Status
    Offline
    newspecies's Avatar
    Baru Gabung
    Join Date
    Nov 2012
    Posts
    13
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    Click here to enlarge Originally Posted by kubby Click here to enlarge
    mangle chain=prerouting, dst-address=203.xxx.xxx.xxx, mark-route=ISP1-route, passtrough=NO

    taruh di paling atas
    Sama nih gan sama kasus ane
    Kalo topologi ane gini gan :

    Address'y
    /ip address> add address=192.168.2.2/24 interface=ISP1
    /ip address> add address=192.168.1.1/26 interface=LAN
    /ip address> add address=192.168.3.2/24 interface=ISP2

    Route'y
    /ip route> add gateway=192.168.2.1 dst-address=0.0.0.0/0 distance=1
    /ip route> add gateway=192.168.3.1 dst-address=0.0.0.0/0 distance=2 routing-mark=ISP2-route

    NAT'y
    /ip firewall nat add chain=srcnat action=masquerade out-interface=ISP1
    /ip firewall nat add chain=srcnat action=masquerade out-interface=ISP2

    sekarang kalo ane cek IP public di whatismyip.com itu IP Public ISP1.
    nah ane coba bikin mangle ke IP whatismyip.com [108.162.205.74] buat liat hasil ip public'y itu pake ISP2.

    /ip firewall mangle add chain=prerouting dst-address=108.162.205.74 mark-route=ISP2-route, passtrough=no

    belum ada mangle yang lain yang saya masukin cuma itu [berarti paling atas dong].

    tapi masih IP Public ISP1 Gan. Click here to enlarge .... gimana ya?

    apa dari script Route yang salah???? ato semua script salah Click here to enlarge

    mohon pencerahannya agan2..
    thanks sebelumnya.

  5. #5
    Status
    Offline
    arieonline's Avatar
    Member
    Join Date
    Jun 2009
    Location
    Bogor
    Posts
    123
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    Click here to enlarge Originally Posted by newspecies Click here to enlarge
    Sama nih gan sama kasus ane
    Kalo topologi ane gini gan :

    Address'y
    /ip address> add address=192.168.2.2/24 interface=ISP1
    /ip address> add address=192.168.1.1/26 interface=LAN
    /ip address> add address=192.168.3.2/24 interface=ISP2

    Route'y
    /ip route> add gateway=192.168.2.1 dst-address=0.0.0.0/0 distance=1
    /ip route> add gateway=192.168.3.1 dst-address=0.0.0.0/0 distance=2 routing-mark=ISP2-route

    NAT'y
    /ip firewall nat add chain=srcnat action=masquerade out-interface=ISP1
    /ip firewall nat add chain=srcnat action=masquerade out-interface=ISP2

    sekarang kalo ane cek IP public di whatismyip.com itu IP Public ISP1.
    nah ane coba bikin mangle ke IP whatismyip.com [108.162.205.74] buat liat hasil ip public'y itu pake ISP2.

    /ip firewall mangle add chain=prerouting dst-address=108.162.205.74 mark-route=ISP2-route, passtrough=no

    belum ada mangle yang lain yang saya masukin cuma itu [berarti paling atas dong].

    tapi masih IP Public ISP1 Gan. Click here to enlarge .... gimana ya?

    apa dari script Route yang salah???? ato semua script salah Click here to enlarge

    mohon pencerahannya agan2..
    thanks sebelumnya.
    sebelumnya buat dulu daftar IP nya (misal "daftar-ip"), domain whatismyip.com diresolve ke multiple A record sbb

    Code:
    arieonline@P3eL-10:~$ dig whatismyip.com
    
    ; <<>> DiG 9.8.1-P1 <<>> whatismyip.com
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19237
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 13, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;whatismyip.com.			IN	A
    
    ;; ANSWER SECTION:
    whatismyip.com.		73	IN	A	108.162.207.74
    whatismyip.com.		73	IN	A	141.101.127.74
    whatismyip.com.		73	IN	A	108.162.200.75
    whatismyip.com.		73	IN	A	108.162.206.74
    whatismyip.com.		73	IN	A	108.162.205.74
    
    ;; AUTHORITY SECTION:
    com.			80374	IN	NS	g.gtld-servers.net.
    com.			80374	IN	NS	h.gtld-servers.net.
    com.			80374	IN	NS	i.gtld-servers.net.
    com.			80374	IN	NS	j.gtld-servers.net.
    com.			80374	IN	NS	k.gtld-servers.net.
    com.			80374	IN	NS	l.gtld-servers.net.
    com.			80374	IN	NS	m.gtld-servers.net.
    com.			80374	IN	NS	a.gtld-servers.net.
    com.			80374	IN	NS	b.gtld-servers.net.
    com.			80374	IN	NS	c.gtld-servers.net.
    com.			80374	IN	NS	d.gtld-servers.net.
    com.			80374	IN	NS	e.gtld-servers.net.
    com.			80374	IN	NS	f.gtld-servers.net.
    
    ;; Query time: 2 msec
    ;; SERVER: 192.168.111.200#53(192.168.111.200)
    ;; WHEN: Wed Nov  7 14:27:29 2012
    ;; MSG SIZE  rcvd: 336
    lalu coba settingan berikut

    Code:
    /ip firewall address-list
    add list=daftar-ip address="108.162.207.74"
    add list=daftar-ip address="141.101.127.74"
    add list=daftar-ip address="108.162.200.75"
    add list=daftar-ip address="108.162.206.74"
    add list=daftar-ip address="108.162.205.74"
    
    /ip firewall nat
    add action=masquerade chain=srcnat disabled=no
    
    /ip firewall mangle
    add action=mark-routing chain=prerouting disabled=no dst-address-list=daftar-ip new-routing-mark=ISP2-route passthrough=no
    
    /ip route
    add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.3.1 routing-mark=ISP2-route scope=30 target-scope=10
    add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.2.1 scope=30 target-scope=10
    Last edited by arieonline; 07-11-2012 at 15:33.

  6. #6
    Status
    Offline
    newspecies's Avatar
    Baru Gabung
    Join Date
    Nov 2012
    Posts
    13
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    Click here to enlarge Originally Posted by arieonline Click here to enlarge
    sebelumnya buat dulu daftar IP nya (misal "daftar-ip"), domain whatismyip.com diresolve ke multiple A record sbb

    Code:
    arieonline@P3eL-10:~$ dig whatismyip.com
    
    ; <<>> DiG 9.8.1-P1 <<>> whatismyip.com
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19237
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 13, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;whatismyip.com.			IN	A
    
    ;; ANSWER SECTION:
    whatismyip.com.		73	IN	A	108.162.207.74
    whatismyip.com.		73	IN	A	141.101.127.74
    whatismyip.com.		73	IN	A	108.162.200.75
    whatismyip.com.		73	IN	A	108.162.206.74
    whatismyip.com.		73	IN	A	108.162.205.74
    
    ;; AUTHORITY SECTION:
    com.			80374	IN	NS	g.gtld-servers.net.
    com.			80374	IN	NS	h.gtld-servers.net.
    com.			80374	IN	NS	i.gtld-servers.net.
    com.			80374	IN	NS	j.gtld-servers.net.
    com.			80374	IN	NS	k.gtld-servers.net.
    com.			80374	IN	NS	l.gtld-servers.net.
    com.			80374	IN	NS	m.gtld-servers.net.
    com.			80374	IN	NS	a.gtld-servers.net.
    com.			80374	IN	NS	b.gtld-servers.net.
    com.			80374	IN	NS	c.gtld-servers.net.
    com.			80374	IN	NS	d.gtld-servers.net.
    com.			80374	IN	NS	e.gtld-servers.net.
    com.			80374	IN	NS	f.gtld-servers.net.
    
    ;; Query time: 2 msec
    ;; SERVER: 192.168.111.200#53(192.168.111.200)
    ;; WHEN: Wed Nov  7 14:27:29 2012
    ;; MSG SIZE  rcvd: 336
    lalu coba settingan berikut

    Code:
    /ip firewall address-list
    add list=daftar-ip address="108.162.207.74"
    add list=daftar-ip address="141.101.127.74"
    add list=daftar-ip address="108.162.200.75"
    add list=daftar-ip address="108.162.206.74"
    add list=daftar-ip address="108.162.205.74"
    
    /ip firewall nat
    add action=masquerade chain=srcnat disabled=no
    
    /ip firewall mangle
    add action=mark-routing chain=prerouting disabled=no dst-address-list=daftar-ip new-routing-mark=ISP2-route passthrough=no
    
    /ip route
    add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.3.1 routing-mark=ISP2-route scope=30 target-scope=10
    add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.2.1 scope=30 target-scope=10
    wah ok bang ari... nanti saya coba settingan diatas.
    tadi pagi udah berhasil sebetulnya..
    ternyata maslahnya di DHCP Server. jadi si client ga dapet DNS ISP dituju. jadi dapet DNS secondary.
    dan Router'y harusnya ga di mark-route dan distance semua 1. dst-address di route saya modif juga.

    ngomong2 bogor'y dimana bang ari?? saya juga di bogor malabar. Click here to enlarge

  7. #7
    Status
    Offline
    arieonline's Avatar
    Member
    Join Date
    Jun 2009
    Location
    Bogor
    Posts
    123
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    Click here to enlarge Originally Posted by newspecies Click here to enlarge
    wah ok bang ari... nanti saya coba settingan diatas.
    tadi pagi udah berhasil sebetulnya..
    ternyata maslahnya di DHCP Server. jadi si client ga dapet DNS ISP dituju. jadi dapet DNS secondary.
    dan Router'y harusnya ga di mark-route dan distance semua 1. dst-address di route saya modif juga.

    ngomong2 bogor'y dimana bang ari?? saya juga di bogor malabar. Click here to enlarge
    saya di dramaga - bogor coret lah

 

 

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

Similar Threads

  1. (ask) Static routing untuk Dota (join1 net)
    By malih in forum Scripting @ Mikrotik
    Replies: 22
    Last Post: 13-07-2011, 10:35
  2. Replies: 5
    Last Post: 11-08-2010, 02:32
  3. Bagaimana cara membuat Static IP pada Mikrotik RB750?
    By chairul43 in forum Beginner Basics
    Replies: 8
    Last Post: 30-05-2010, 11:51
  4. [ASK] Setting Routing Static
    By ndayan in forum General Networking
    Replies: 22
    Last Post: 17-11-2009, 15:38

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •