mikrotik: route all traffics of particular local ip to defined gateway

Kritika Dhakal Thapa picture Kritika Dhakal Thapa · Jul 7, 2013 · Viewed 25.4k times · Source

I am using Mirkotik RB 1100 v6.0rc11.

I have such configuration for my network
LAN
ether1 192.168.0.0/24

ISP1
Ether6 PPPOE Connections
Dynamic Public IP Address

ISP2
Ether10 Static Public IP
111.111.111.111/25

I have masquerade Local ips ie 192.168.0.0/24 to ISP2. All local ips browse web using ISP2 internet.

I want 192.168.0.50 and 192.168.0.51, to browse internet from ISP1.

Please Help.

Answer

daudet kalenga picture daudet kalenga · Jul 15, 2014

This is my answer:

  1. Create Address list:

    ip firewall>address-list> add comment="samme comment" address=192.168.0.50-192.168.0.51 list=list50-51

  2. create mangle:

    ip firewall mangle> add comment="same comment" chain=prerouting action=mark-routing new-routing-mark=INTERNET-50-51 src-address-list=list50-51

  3. create route:

    ip route> add comment="same comment" dst-address=0.0.0.0/0 routing-mark=INTERNET-50-51 gateway=IP of ISP1

  4. create nat

    ip firewall>nat> add comment="same comment" chain=srcnat action=masquerade src-address-list=list50-51 dst-address=0.0.0.0/0 out-interface=Interface of ISP1(PPPOE)