Community discussions

MikroTik App
 
Riajul74
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 68
Joined: Sun Feb 10, 2013 12:01 am

how to configure selected user will use selected ISP

Tue Jul 23, 2013 10:50 pm

Hello ,

i just want to make a simple rule on my router rb450. i have two ISP on my router and i made load balancing. now i want to define some user will use specific connection like below.

ISPS are : A and B

192.168.2.2-192.168.2.20 will use ISP A

192.168.2.21-192.168.2.40 will use ISP B

please help me with this.
 
mistry7
Forum Guru
Forum Guru
Posts: 1480
Joined: Tue Oct 13, 2009 11:57 am
Location: Germany

Re: how to configure selected user will use selected ISP

Tue Jul 23, 2013 11:06 pm

Make 2 Address lists with the selected IPs

Use standart Route for Group One (Nothing to DO)

Use Routing Mark (mangle rule) for Groupe two


Mistry7
 
Riajul74
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 68
Joined: Sun Feb 10, 2013 12:01 am

Re: how to configure selected user will use selected ISP

Tue Jul 23, 2013 11:10 pm

i have already added two address for two group .


Use standart Route for Group One (Nothing to DO)

Use Routing Mark (mangle rule) for Groupe two


can you please make me clear with example code how to do this ?
 
mistry7
Forum Guru
Forum Guru
Posts: 1480
Joined: Tue Oct 13, 2009 11:57 am
Location: Germany

Re: how to configure selected user will use selected ISP

Wed Jul 24, 2013 10:37 am

Set 2 routes

/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=XXX.XXX.XXX.XXX
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=XXX.XXX.XXX.XXX routing-mark=ISP-B

Uses Address List to Route Traffic over selected ISP

/ip firewall mangle
add action=mark-routing chain=prerouting src-address-list=NameofYOurLIST new-routing-mark=ISP-B

For ISP-A you need nothing to do

mistry7
 
Riajul74
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 68
Joined: Sun Feb 10, 2013 12:01 am

Re: how to configure selected user will use selected ISP

Wed Jul 24, 2013 11:16 am

Set 2 routes

/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=XXX.XXX.XXX.XXX
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=XXX.XXX.XXX.XXX routing-mark=ISP-B

Uses Address List to Route Traffic over selected ISP

/ip firewall mangle
add action=mark-routing chain=prerouting src-address-list=NameofYOurLIST new-routing-mark=ISP-B

For ISP-A you need nothing to do

mistry7
please see my existing routing mark

# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 A S 0.0.0.0/0 58.147.172.153 1
1 A S 0.0.0.0/0 114.31.3.129 1
2 A S 0.0.0.0/0 114.31.3.129 1
58.147.172.153
58.147.172.153
3 ADC 58.147.172.152/29 58.147.172.156 ether5-AFTAB 0
4 ADC 114.31.3.128/29 114.31.3.132 ether4_BDCOM 0
5 ADC 192.168.2.0/24 192.168.2.254 ether1-LAN 0


58.147.172.153 = ISP 1 GATEWAY
114.31.3.129= ISP 2 GATEWAY
192.168.2.254 = my router

so i think your given routing mark already i have ??

i tired with your mangle but not working

/ip firewall mangle
add action=mark-routing chain=prerouting src-address-list=NameofYOurLIST new-routing-mark=ISP-B

can you please check somewhere i am doing wrong ? or if you can help me if i give you a user to check my router and configure this ?

thanks

Who is online

Users browsing this forum: No registered users and 89 guests