Community discussions

 
safiullahtariq
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 81
Joined: Sun Apr 06, 2014 9:21 pm
Location: Lahore Pakistan

User Speed Limit with PCC

Fri Jul 21, 2017 6:01 pm

Hello All,

I hope you are doing great.

I am having an issue.
I have done PCC with 4 ISPs and its working fine. But I also want to limit the speed of users so that they are limit to their speeds and dont eat up other people's bandwidth.

I have tried to do the normal connection mark and then packet mark and then make queues but this doesnt work.
What do I have to do to make it work.
Following is my router code.
Can someone just give me an example of simple queue for a user?
I also have to do web proxy. but thats a separate issue and will discuss that later.
/interface bridge
add admin-mac=6C:3B:6B:A9:E1:FB auto-mac=no comment=defconf name=bridge
/interface ethernet
set [ find default-name=ether1 ] name=ether1-ISP1
set [ find default-name=ether2 ] name=ether2-ISP2
set [ find default-name=ether3 ] name=ether3-ISP3
set [ find default-name=ether4 ] name=ether4-ISP4
set [ find default-name=ether6 ] name=ether6-master
set [ find default-name=ether7 ] master-port=ether6-master
set [ find default-name=ether8 ] master-port=ether6-master
set [ find default-name=ether9 ] master-port=ether6-master
set [ find default-name=ether10 ] master-port=ether6-master
/ip neighbor discovery
set ether1-ISP1 discover=no
set bridge comment=defconf

/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
add name=dhcp_pool1 ranges=192.168.8.100-192.168.8.254
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=bridge name=dhcp1
/queue simple
add disabled=yes name=ISP3 target=""
/queue tree
add limit-at=2M max-limit=2M name="test 1 download" parent=global

/queue tree
add limit-at=2M max-limit=2M name="test 1 upload" parent=global queue=\
    pcq-upload-default
add limit-at=1M max-limit=1M name="test pavc" packet-mark="test Packet" \
    parent="test 1 upload" queue=default
add limit-at=1M max-limit=1M name="test pavc download" packet-mark=\
    "test Packet" parent="test 1 download" queue=default
/interface bridge port
add bridge=bridge comment=defconf interface=ether6-master
add bridge=bridge comment=defconf interface=sfp1
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=\
    192.168.88.0
add address=192.168.8.1/24 interface=bridge network=192.168.8.0
add address=192.168.100.2/24 interface=ether1-ISP1 network=192.168.100.0
add address=192.168.11.8/24 interface=ether4-ISP4 network=192.168.11.0
add address=192.168.10.100/24 interface=ether3-ISP3 network=192.168.10.0
/ip dhcp-client
add comment=defconf dhcp-options=hostname,clientid interface=ether1-ISP1
/ip dhcp-server lease
add address=192.168.8.253 client-id=1:5c:26:a:21:bb:19 mac-address=\
    5C:26:0A:21:BB:19 server=dhcp1
/ip dhcp-server network
add address=192.168.8.0/24 dns-server=192.168.8.1 gateway=192.168.8.1
/ip dns
set allow-remote-requests=yes servers=208.67.222.222,8.8.8.8
/ip dns static
add address=192.168.88.1 name=router
/ip firewall filter
add chain=input comment="default configuration" disabled=yes protocol=icmp
add chain=input comment="default configuration" connection-state=established \
    disabled=yes
add chain=input comment="default configuration" connection-state=related \
    disabled=yes
add action=drop chain=input comment="default configuration" disabled=yes \
    in-interface=ether1-ISP1
add action=drop chain=input comment="default configuration" disabled=yes \
    in-interface=ether3-ISP3
add action=drop chain=input comment="default configuration" disabled=yes \
    in-interface=ether4-ISP4
add chain=forward comment="default configuration" connection-state=\
    established disabled=yes
add action=drop chain=forward comment="default configuration" \
    connection-state=invalid disabled=yes
add chain=forward comment="default configuration" connection-state=related \
    disabled=yes
/ip firewall mangle
add action=mark-connection chain=prerouting disabled=yes dst-address=\
    192.168.8.253 new-connection-mark=test_connection
add action=mark-connection chain=prerouting disabled=yes new-connection-mark=\
    test_connection src-address=192.168.8.253
add action=mark-packet chain=prerouting connection-mark=test_connection \
    disabled=yes new-packet-mark="test Packet"
add action=mark-connection chain=input in-interface=ether1-ISP1 \
    new-connection-mark=W1
add action=mark-connection chain=input in-interface=ether3-ISP3 \
    new-connection-mark=W3
add action=mark-connection chain=input in-interface=ether4-ISP4 \
    new-connection-mark=W2
add action=mark-routing chain=output connection-mark=W1 new-routing-mark=\
    to_W1
add action=mark-routing chain=output connection-mark=W2 new-routing-mark=\
    to_W2
add action=mark-routing chain=output connection-mark=W3 new-routing-mark=\
    to_W3
add chain=prerouting dst-address=192.168.100.0/24
add chain=prerouting dst-address=192.168.10.0/24
add chain=prerouting dst-address=192.168.11.0/24
add action=mark-connection chain=prerouting dst-address-type=!local \
    in-interface=bridge new-connection-mark=W1 per-connection-classifier=\
    both-addresses-and-ports:3/0
add action=mark-connection chain=prerouting dst-address-type=!local \
    in-interface=bridge new-connection-mark=W2 per-connection-classifier=\
    both-addresses-and-ports:3/1
add action=mark-connection chain=prerouting dst-address-type=!local \
    in-interface=bridge new-connection-mark=W3 per-connection-classifier=\
    both-addresses-and-ports:3/2
add action=mark-routing chain=prerouting connection-mark=W1 in-interface=\
    bridge new-routing-mark=to_W1
add action=mark-routing chain=prerouting connection-mark=W2 in-interface=\
    bridge new-routing-mark=to_W2
add action=mark-routing chain=prerouting connection-mark=W3 in-interface=\
    bridge new-routing-mark=to_W3
/ip firewall nat
add action=masquerade chain=srcnat comment="default configuration" \
    out-interface=ether1-ISP1
add action=dst-nat chain=dstnat dst-address=192.168.100.2 dst-port=12345 \
    protocol=tcp to-addresses=192.168.8.200 to-ports=12345
add action=netmap chain=srcnat dst-address=192.168.100.2 dst-port=8000 \
    protocol=tcp to-addresses=192.168.8.200 to-ports=8000
add action=netmap chain=srcnat dst-address=192.168.100.2 dst-port=80 \
    protocol=tcp to-addresses=192.168.8.1 to-ports=80
add action=masquerade chain=srcnat comment="default configuration" \
    out-interface=ether3-ISP3
add action=masquerade chain=srcnat comment="default configuration" \
    out-interface=ether4-ISP4
add action=masquerade chain=srcnat comment="default configuration" disabled=\
    yes
add action=redirect chain=dstnat dst-port=80 protocol=tcp src-address=\
    192.168.8.0/24 to-ports=8080
/ip proxy
set cache-on-disk=yes enabled=yes
/ip route
add check-gateway=ping distance=1 gateway=192.168.100.1 routing-mark=to_W1
add check-gateway=ping distance=1 gateway=192.168.10.1 routing-mark=to_W2
add check-gateway=ping distance=1 gateway=192.168.11.1 routing-mark=to_W3
add check-gateway=ping distance=1 gateway=192.168.100.1
add check-gateway=ping distance=1 gateway=192.168.10.1
add check-gateway=ping distance=1 gateway=192.168.11.1
/tool mac-server mac-winbox
set [ find default=yes ] disabled=yes
add interface=bridge
 
safiullahtariq
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 81
Joined: Sun Apr 06, 2014 9:21 pm
Location: Lahore Pakistan

Re: User Speed Limit with PCC

Sun Jul 23, 2017 11:01 pm

Anyone, Please help
 
safiullahtariq
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 81
Joined: Sun Apr 06, 2014 9:21 pm
Location: Lahore Pakistan

Re: User Speed Limit with PCC

Wed Jul 26, 2017 1:42 am

Im feeling left out.
No one is helping

Who is online

Users browsing this forum: MSN [Bot] and 132 guests