Community discussions

MikroTik App
 
hougo
just joined
Topic Author
Posts: 4
Joined: Wed Feb 28, 2018 2:42 pm

Limit Ip bandwidth and packets going thru gateway, but no affect internal data transfer between other ip

Sat Mar 03, 2018 1:35 am

may i ask how can i limit ip bandwidth and packets going thru the gateway but does not effect internal data that is going thru internal network?
 
mkx
Forum Guru
Forum Guru
Posts: 4204
Joined: Thu Mar 03, 2016 10:23 pm

Re: Limit Ip bandwidth and packets going thru gateway, but no affect internal data transfer between other ip

Sat Mar 03, 2018 3:57 pm

Use queues. When defining a queue, you can set as Target either address (or address range) or interface. In your case you probably want to have queue with Target set to your WAN interface (which ever that is depends on your particular WAN access technology - ethernet port or ppp interface or pppoe interface or VPN interface or ...).

The answer assumes that your RB device is the gateway between your internal network and WAN and all traffic from internal network towards internet flows through RB. If that's not the case, then you'll have to show us some network topology chart.
BR,
Metod
 
hougo
just joined
Topic Author
Posts: 4
Joined: Wed Feb 28, 2018 2:42 pm

Re: Limit Ip bandwidth and packets going thru gateway, but no affect internal data transfer between other ip

Sat Mar 03, 2018 5:17 pm

connection type
Fibre Optic PPPOE 100Mbps Download and Upload

Network chart
Fibre Cable -->> ADSL Modem -->> Microtik Router Board -->> Switch -->> users

ive noticed some connection is sending more packets than the other users , is that a sample script i can use to limit the packet transfer for that particular ip? and there are some internal packets going on and off constanly , so i do not want to affect the other users.

ive search thru the forum and tried a few script but it doesnt help.

using RouterBoard 750GL

thanks for the help in advance

additional***
may i ask what different is 192.168.1.0/24 and 192.168.1.0/32 ?
and other that that is written behind the ip , searched the manual but i cant see explaining the command behind the ip
 
mkx
Forum Guru
Forum Guru
Posts: 4204
Joined: Thu Mar 03, 2016 10:23 pm

Re: Limit Ip bandwidth and packets going thru gateway, but no affect internal data transfer between other ip

Sat Mar 03, 2018 7:40 pm

additional***
may i ask what different is 192.168.1.0/24 and 192.168.1.0/32 ?
and other that that is written behind the ip , searched the manual but i cant see explaining the command behind the ip
The IPv4 address is actually a 32-bit number, which, for convenience is written as 4-part MSB integer, each part being 8-bit integer. The number behind the slash is network mask in bits and can be anything between 0 and 32. Another way of specifying netmask is to write it dotted-decimal way; 24 bit mask is 255.255.255.0 and 32 bit mask is 255.255.255.255.
You need to understand the IP basics (IP address vs. network mask vs. broadcast address) ... to realize that the smallest network has netmask of length 30 bits giving 4 total addresses: one network address, one broadcast address and two host addresses. Thus if you see address x.y.w.z/32, you can safely asume that it's single IP address.
Your example (192.168.1.0/32) is somehow invalid ... namely: the lowest address from the address-range is considered as network address. If you get, say, 192.168.1.0/24 as network, then 192.168.1.0/32 is really network address and no real device should use that address. However, if you'd have 192.168.0.0/16, then 192.168.1.0/32 is perfectly valid device address since network address is 192.168.0.0/32. Same goes for highest address from a given address range, it is used as broadcast address.
BR,
Metod
 
hougo
just joined
Topic Author
Posts: 4
Joined: Wed Feb 28, 2018 2:42 pm

Re: Limit Ip bandwidth and packets going thru gateway, but no affect internal data transfer between other ip

Fri Mar 09, 2018 4:55 am

ok i tested this in queue

well im not using the command im doing it using the simple queue interface

=====General Tab=====
Target Address = 10.0.9.0/24
Ticked Target Upload and Target Download
Max limit = 5M Upload 5M Download
Burst Limit limit = 5M Upload 5M Download
Burst Threshold limit = 5M Upload 5M Download
Burst Time = 5S 5S

=====Advance=====
P2P = blank
Packet Marks = blank
Dst. Address = blank
Interface = all

Target Upload
Limit At = unlimited
Queue Type = default-small

Target Download
Limit At = unlimited
Queue Type = default-small

Parent = none
Priority = 8

Total
all blank except
Total Queue Type = default-small

i want to target 10.0.9.1 until 10.0.9.60 to have 5M Upload and download speed , not 1 ip that takes all connection and other are lagging. but 10.0.9.0/24 mean target all ip in that subnet mask. instead it limit total limit of all my bandwidth to 5M only. currently running on 100Mbps Full Duplex PPPoE. is there anything i should change in queue to make it max bandwidth of 5Mbps
 
User avatar
Steveocee
Forum Guru
Forum Guru
Posts: 1127
Joined: Tue Jul 21, 2015 10:09 pm
Location: UK
Contact:

Re: Limit Ip bandwidth and packets going thru gateway, but no affect internal data transfer between other ip

Fri Mar 09, 2018 11:02 am

You would need to use a PCQ in this kind of instance. That would equally share the bandwidth between each client.
Steve "Steveocee" Carter
PC Gamer, Airsofter, MikroTik Nerd
My Website - My MikroTik Tutorials
 
solar77
Long time Member
Long time Member
Posts: 503
Joined: Thu Feb 04, 2016 11:42 am
Location: Scotland

Re: Limit Ip bandwidth and packets going thru gateway, but no affect internal data transfer between other ip

Fri Mar 09, 2018 11:28 am

OK here is an example of PCQ
/queue simple
add dst=ether1 name=LAN queue=pcq-upload-default/pcq-download-default target=192.168.90.0/24
Notice few things
1. dst=ether1, where ether1 is my WAN port. this means this rule does not appply to traffic heading to LAN port, fit your first requirement.
2. queue type is PCQ which apply to individual IP with in the target range, not just 1 IP address. I will explain where it is configured.
3. target apply to entire subnet, that is from 192.168.90.1 to 192.168.90.254. I know you asked for a specific range, it can be done by mark packet which is more complicated for you to do.

now back to the PCQ
it is set up in queue type:
/queue type
set 5 pcq-burst-rate=2M pcq-burst-threshold=768k pcq-burst-time=20s pcq-rate=768k
set 6 pcq-burst-rate=5M pcq-burst-threshold=1500k pcq-burst-time=20s pcq-rate=1500k
I'd suggest you do PCQ for the whole subnet, because if you don't, those IP that are not controlled by any queue rule is able to take up all your bandwidth. cannot be a good thing. You can set up a max-limit to match your overall bandwidth, this allow any IP to do so, but only when no-one else is needing it. If all IP are requesting bandwidth at the same time, PCQ will equalize between them.
MTCNA MTCTCE UEWA
 
anav
Forum Guru
Forum Guru
Posts: 4160
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada

Re: Limit Ip bandwidth and packets going thru gateway, but no affect internal data transfer between other ip

Fri Mar 16, 2018 6:24 pm

Solar couple questions.
1. Your example does not resemble the wiki that I can fathom. It makes no sense to me :-(
How do you associate the queue simple rule to the queue type rules you made?
What is meant by your defaults in the simple rule?
How would I set rate to zero so that all users get same amount of bW.
What the heck is set 5 and set 6???

2. I read about BURST, and its not sinking in yet. I get the general sense that when someone starts an activity there is a surge of packets and then they usually become steadier. Is this function designed to allow that to occur? Much like when a fridge comes on/plugged in, there is surge demand on the electrical circuit as the motor starts up and then the demand falls to a lower steadier state?? The Chemistry/Biology of packets LOL Anyway I cannot even begin to assimilate burst until I grasp queue.

here is the kind of example shown in the book and its way different.
/queue simple
add name=private target=192.168.88.0/24 max-limit=256K/512K \ interface=ether2 (and no accompanying queue type rule).
I'd rather manage rats than software. Follow my advice at your own risk! (Sob & mkx forced me to write that!)
 
Azma
newbie
Posts: 40
Joined: Sat Sep 27, 2014 8:10 am

Re: Limit Ip bandwidth and packets going thru gateway, but no affect internal data transfer between other ip

Mon Mar 19, 2018 4:05 am

its simple. if your router has some internal routing, put your bw manager between gateway router and isp. no need complicated configs.

Who is online

Users browsing this forum: jaytcsd and 46 guests