how to configure selected user will use selected ISP

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.

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

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 ?

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