Community discussions

MikroTik App
 
xezen
Long time Member
Long time Member
Topic Author
Posts: 628
Joined: Fri May 30, 2008 10:23 am
Location: South Africa

connection marking for scr address list

Fri May 13, 2011 12:43 pm

i want to know i want the data to flow to the net
then i want to mark the data

example i have 12 pc on at same time

i want to mark the ipas to an address list as follows

ip 1 list 1
ip 2 list 2
ip 3 list 3
ip 4 list 1
ip 5 list 2
ip 6 list 3
ip 7 list 1
ip 8 list 2
ip 9 list 3
ip 10 list 1
ip 11 list 2
ip 12 list 3

how can i do this?
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: connection marking for scr address list

Fri May 13, 2011 3:58 pm

I'm not entirely sure I understand what you're trying to do, or why this is in the User Manager forum.

If you're trying to balance an arbitrary number of people onto 3 address lists for one hour based on their source address use PCC with a time out something along the lines of the below would probably work:
/ip firewall mangle
add chain=prerouting in-interface=LAN per-connection-classifier=src-address:3/0 action=add-src-to-address-list address-list=list1 address-list-timeout=00:01:00
add chain=prerouting in-interface=LAN per-connection-classifier=src-address:3/1 action=add-src-to-address-list address-list=list2 address-list-timeout=00:01:00
add chain=prerouting in-interface=LAN per-connection-classifier=src-address:3/2 action=add-src-to-address-list address-list=list3 address-list-timeout=00:01:00
It's not going to be exactly round robin, but the more IPs are online the more even the distribution will be. Could be improved in some ways but I don't think there's enough details in your request to start on that yet.

Who is online

Users browsing this forum: No registered users and 10 guests