Community discussions

MikroTik App
 
User avatar
Alferez
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 70
Joined: Mon Sep 12, 2016 9:40 am
Location: Seville / Spain
Contact:

Limit Bandwith in a CCR1036 interface

Thu Feb 16, 2017 1:40 pm

Hello

I have a CCR1036 and need limit bandwith in a ethernet port.
I try with simple queue at ip, at port, marking connection, ... but port not limit.
I need limit port to 500M/500M but i try limit at 1M/1M, 100K/100K, 50M/40M ... but every port work at 1G/1G

In wiki show parameters that now not work. Ex. direction, targetaddress, ...

Thanks.
 
User avatar
AlainCasault
Trainer
Trainer
Posts: 632
Joined: Fri Apr 30, 2010 3:25 pm
Location: Prévost, QC, Canada
Contact:

Re: Limit Bandwith in a CCR1036 interface

Thu Feb 16, 2017 3:47 pm

Usualy works well... You write "limit at', fill the "max limit" fields. And make sure the "target" field is the port u want to limit.

Sent from my cell phone via Tapatalk. Sorry for the errors.
 
User avatar
Alferez
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 70
Joined: Mon Sep 12, 2016 9:40 am
Location: Seville / Spain
Contact:

Re: Limit Bandwith in a CCR1036 interface

Fri Feb 17, 2017 12:52 am

I use limit-at=1M/1M max-limit-at=1M/1M target=77.X.X.10
I try use target=ether3 but have same result.

This router use BGP for comunicate.

Thanks
 
SystemErrorMessage
Member
Member
Posts: 390
Joined: Sat Dec 22, 2012 9:04 pm

Re: Limit Bandwith in a CCR1036 interface

Fri Feb 17, 2017 5:53 am

you could use QoS to enforce bandwidth limits.

Alternatively you can use the layer 2 filters as well to limit bandwidth.
 
User avatar
Alferez
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 70
Joined: Mon Sep 12, 2016 9:40 am
Location: Seville / Spain
Contact:

Re: Limit Bandwith in a CCR1036 interface

Fri Feb 17, 2017 11:09 am

I can't limit :(

I mark connection and packets and create a simple queue or tree but no limit:

Retrieving speedtest.net configuration...
Testing from (77.XX.XX.10)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Guillena WiFi (Guillena) [12.08 km]: 4.861 ms
Testing download speed................................................................................
Download: 93.66 Mbit/s
Testing upload speed....................................................................................................
Upload: 61.54 Mbit/s

And i use this config (same this post):

/ip firewall mangle
Flags: X - disabled, I - invalid, D - dynamic
3 chain=postrouting action=mark-connection new-connection-mark=Download_conn dst-address=77.XX.XX.10
4 chain=postrouting action=mark-packet new-packet-mark=Download_packets passthrough=no connection-mark=Download_conn
5 chain=prerouting action=mark-connection new-connection-mark=Upload_conn src-address=77.XX.XX.10
6 chain=prerouting action=mark-packet new-packet-mark=Upload_packets passthrough=no connection-mark=Upload_conn


/queue tree
Flags: X - disabled, I - invalid
0 name="500M_Download" parent=ether3 packet-mark="" limit-at=0 queue=default priority=8 max-limit=1M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
1 name="500M_Upload" parent=ether3 packet-mark="" limit-at=0 queue=default priority=8 max-limit=1M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
2 name="Download" parent=500M_Download packet-mark=Download_packets limit-at=0 queue=default priority=8 max-limit=1M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
3 name="Upload" parent=500M_Upload packet-mark=Upload_packets limit-at=0 queue=default priority=8 max-limit=1M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1

/queue simple
Flags: X - disabled, I - invalid, D - dynamic
0 name="queue2" target=ether3 parent=none packet-marks=Download_packets priority=8/8 queue=default/default limit-at=1M/1M max-limit=1M/1M burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s bucket-size=0.1/0.1
1 name="queue3" target=ether3 parent=none packet-marks=Upload_packets priority=8/8 queue=default/default limit-at=1M/1M max-limit=1M/1M burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s bucket-size=0.1/0.1

2 name="queue4" target=77.XX.XX.10/32 parent=none packet-marks=Download_packets priority=8/8 queue=default/default limit-at=1M/1M max-limit=1M/1M burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s bucket-size=0.1/0.1

3 name="queue5" target=77.XX.XX.10/32 parent=none packet-marks=Upload_packets priority=8/8 queue=default/default limit-at=1M/1M max-limit=1M/1M burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s bucket-size=0.1/0.1



This router offer public IP to interfaces.
 
User avatar
dgnevans
Member
Member
Posts: 469
Joined: Fri Mar 08, 2013 11:24 am
Location: Zimbabwe
Contact:

Re: Limit Bandwith in a CCR1036 interface

Fri Feb 17, 2017 11:57 am

Are you trying to limit all traffic from your lan out to the internet to a certain speed. Instead of using mangle to mark connections just create a simple queue put the target as your lan ip or subnet. one rule can cover your whole lan out to the internet. have a look at this where there is an example.
http://forum.mikrotik.com/viewtopic.php?f=2&t=118329
 
User avatar
Alferez
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 70
Joined: Mon Sep 12, 2016 9:40 am
Location: Seville / Spain
Contact:

Re: Limit Bandwith in a CCR1036 interface

Fri Feb 17, 2017 12:07 pm

I remove old rules and create simple queue. I only need limit 1 IP connection to 500M/500M. I create simple queue and limit to 1M/1M for test, but have same problem:

/queue simple
Flags: X - disabled, I - invalid, D - dynamic
0 name="queue1" target=77.XX.XX.10/32 parent=none packet-marks="" priority=8/8 queue=default-small/default-small limit-at=1M/1M max-limit=1M/1M burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s bucket-size=0.1/0.1


Retrieving speedtest.net configuration...
Testing from (77.XX.XX.10)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Guillena WiFi (Guillena) [12.08 km]: 6.068 ms
Testing download speed................................................................................
Download: 93.66 Mbit/s
Testing upload speed....................................................................................................
Upload: 56.30 Mbit/s

Thanks
 
User avatar
dgnevans
Member
Member
Posts: 469
Joined: Fri Mar 08, 2013 11:24 am
Location: Zimbabwe
Contact:

Re: Limit Bandwith in a CCR1036 interface

Fri Feb 17, 2017 12:22 pm

Is 77.xx.xx.10 on your lan side or wan side. The traffic needs to pass through the router to be controlled. if it is originating from an external interface you need to use a different method.
 
User avatar
dgnevans
Member
Member
Posts: 469
Joined: Fri Mar 08, 2013 11:24 am
Location: Zimbabwe
Contact:

Re: Limit Bandwith in a CCR1036 interface

Fri Feb 17, 2017 12:26 pm

name="queue1" target=77.XX.XX.10/32 parent=none packet-marks="" priority=8/8 queue=synchronous-default/synchronous-default limit-at=0/0 max-limit=1M/1M burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s bucket-size=0.1/0.1 
change ip 77.xx.xx.10 to the ip of the computer you are running the tests from behind your router ie on your lan.
 
User avatar
Alferez
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 70
Joined: Mon Sep 12, 2016 9:40 am
Location: Seville / Spain
Contact:

Re: Limit Bandwith in a CCR1036 interface

Fri Feb 17, 2017 12:33 pm

Mikrotik have own network with bgp over SFP1. Eth3 have a /30 Ip and client have IP in same subnetwork.

Eth3 (77.XX.XX.9/30) <-------> Client (77.XX.XX.10/30)

77.XX.XX.XX are public own network
 
User avatar
Alferez
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 70
Joined: Mon Sep 12, 2016 9:40 am
Location: Seville / Spain
Contact:

Re: Limit Bandwith in a CCR1036 interface

Fri Feb 17, 2017 12:35 pm

name="queue1" target=77.XX.XX.10/32 parent=none packet-marks="" priority=8/8 queue=synchronous-default/synchronous-default limit-at=0/0 max-limit=1M/1M burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s bucket-size=0.1/0.1 
change ip 77.xx.xx.10 to the ip of the computer you are running the tests from behind your router ie on your lan.
I have connected a computer to eth3 with 77.xx.xx.10 for test it.
 
User avatar
dgnevans
Member
Member
Posts: 469
Joined: Fri Mar 08, 2013 11:24 am
Location: Zimbabwe
Contact:

Re: Limit Bandwith in a CCR1036 interface

Fri Feb 17, 2017 12:43 pm

Make sure you disable fast path for this to work as fast path bypasses simple queues.
 
User avatar
Alferez
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 70
Joined: Mon Sep 12, 2016 9:40 am
Location: Seville / Spain
Contact:

Re: Limit Bandwith in a CCR1036 interface

Fri Feb 17, 2017 12:59 pm

Make sure you disable fast path for this to work as fast path bypasses simple queues.
Supposedly the fasthpath is off:

/ip settings
ip-forward: yes
send-redirects: yes
accept-source-route: no
accept-redirects: no
secure-redirects: yes
rp-filter: no
tcp-syncookies: no
max-neighbor-entries: 8192
arp-timeout: 30s
icmp-rate-limit: 10
icmp-rate-mask: 0x1818
route-cache: yes
allow-fast-path: yes
ipv4-fast-path-active: no
ipv4-fast-path-packets: 0
ipv4-fast-path-bytes: 0
ipv4-fasttrack-active: yes
ipv4-fasttrack-packets: 14599767347
ipv4-fasttrack-bytes: 13185220892768


And i have some options for no enable it:
Firewall filter
Traffic flow
Bridge
Queue...
 
User avatar
dgnevans
Member
Member
Posts: 469
Joined: Fri Mar 08, 2013 11:24 am
Location: Zimbabwe
Contact:

Re: Limit Bandwith in a CCR1036 interface

Fri Feb 17, 2017 2:16 pm

I uncheck allow fastpath to be on the safe side.

Who is online

Users browsing this forum: No registered users and 112 guests