Community discussions

MikroTik App
 
nelbin
just joined
Topic Author
Posts: 7
Joined: Wed Jan 17, 2018 4:30 am

HELP: how to per ip shaping?

Mon Mar 04, 2019 3:07 am

hello there
i have a 50/50mbps fiber internet here in the philippines.
im having a problem on shaping my network.
Image
as you can see on the first image. my world of warcraft downloads at max speed.
Image
2nd image shows my ping times to 1.1.1.1 is quite good, but has random timeout
Image
3rd image shows my winbox panel. fasttrack disabled. i am also using simple queue with pcq 50/50 settings, i tried lowering it to 40/40 still same results. pcq settings are on default.
Image\
4th image shows my advance tab where pcq upload and download are set correctly.
Image
however, on this 5th image. my phone ran a speedtest but was only able to get 3-4mbps download speed. i ran several times but has similar results.

my question is how to equally divide my bandwidth per device/ip across my network. it seems pcq only divides per connection. a p2p connection would destroy my network shaping.

thanks.
 
solar77
Long time Member
Long time Member
Posts: 586
Joined: Thu Feb 04, 2016 11:42 am
Location: Scotland

Re: HELP: how to per ip shaping?

Tue Mar 05, 2019 1:42 pm

Please can you do
/queue export
just want to see how your PCQ is set up.
 
nelbin
just joined
Topic Author
Posts: 7
Joined: Wed Jan 17, 2018 4:30 am

Re: HELP: how to per ip shaping?

Wed Mar 06, 2019 1:18 am

[admin@MikroTik] > /export
# mar/06/2019 07:14:39 by RouterOS 6.44
# software id = JI73-EMS0
#
# model = RouterBOARD 1100x4
# serial number = xxxxxxxxxxxx
/interface ethernet
set [ find default-name=ether1 ] mac-address=xx:xx:xx:xx:xx:xx speed=100Mbps
set [ find default-name=ether2 ] speed=100Mbps
set [ find default-name=ether3 ] speed=100Mbps
set [ find default-name=ether4 ] speed=100Mbps
set [ find default-name=ether5 ] speed=100Mbps
set [ find default-name=ether6 ] speed=100Mbps
set [ find default-name=ether7 ] speed=100Mbps
set [ find default-name=ether8 ] speed=100Mbps
set [ find default-name=ether9 ] speed=100Mbps
set [ find default-name=ether10 ] speed=100Mbps
set [ find default-name=ether11 ] speed=100Mbps
set [ find default-name=ether12 ] speed=100Mbps
set [ find default-name=ether13 ] speed=100Mbps
/interface list
add name=WAN
add name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp ranges=192.168.1.100-192.168.1.254
/ip dhcp-server
add address-pool=dhcp disabled=no interface=ether2 lease-time=1d name=dhcp1
/queue type
set 5 pcq-rate=47M
set 6 pcq-rate=50M
/queue simple
add max-limit=47M/50M name=Internet queue=\
    pcq-upload-default/pcq-download-default target=ether2
/interface bridge port
add interface=ether2
add interface=ether3
add interface=ether4
add interface=ether5
add interface=ether6
add interface=ether7
add interface=ether8
add interface=ether9
add interface=ether10
add interface=ether11
add interface=ether12
add interface=ether13
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface detect-internet
set lan-interface-list=LAN wan-interface-list=WAN
/interface list member
add interface=ether1 list=WAN
add interface=ether2 list=LAN
/ip address
add address=192.168.1.1/24 interface=ether2 network=192.168.1.0
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=ether1 use-peer-dns=no
/ip dhcp-server network
add address=192.168.1.0/24 gateway=192.168.1.1 netmask=24
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip firewall filter
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment="defconf: accept established,related" \
    connection-state=established,related
add action=drop chain=input comment="defconf: drop all from WAN" in-interface=\
    ether1
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
    connection-state=established,related disabled=yes
add action=accept chain=forward comment="defconf: accept established,related" \
    connection-state=established,related
add action=drop chain=forward comment="defconf: drop invalid" connection-state=\
    invalid
add action=drop chain=forward comment=\
    "defconf:  drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
    connection-state=new in-interface=ether1
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1 out-interface-list=WAN
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www address=192.168.1.0/24
set ssh disabled=yes
set api disabled=yes
set winbox address=192.168.1.0/24
set api-ssl disabled=yes
/ip ssh
set allow-none-crypto=yes
/ip upnp
set enabled=yes
/ip upnp interfaces
add interface=ether2 type=internal
add interface=ether1 type=external
/system clock
set time-zone-name=Asia/Manila
/system scheduler
add interval=3h name="clean upnp" on-event="/ip firewall nat;\r\
    \n:foreach singleRule in=[find where dynamic=yes] do={\r\
    \n :if ([:ping [get \$singleRule to-addresses] count=2] < 1) do={remove \$si\
    ngleRule}\r\
    \n};" policy=\
    ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
    start-time=startup
add interval=1d name="auto update" on-event="/system package update\r\
    \ncheck-for-updates once\r\
    \n:delay 1s;\r\
    \n:if ( [get status] = \"New version is available\") do={ install }" \
    policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
    start-date=apr/28/2018 start-time=03:00:00
 
nelbin
just joined
Topic Author
Posts: 7
Joined: Wed Jan 17, 2018 4:30 am

Re: HELP: how to per ip shaping?

Wed Mar 06, 2019 1:19 am

Maybe the blizzard client is using multiple tcp/http connections with p2p. im not sure
 
solar77
Long time Member
Long time Member
Posts: 586
Joined: Thu Feb 04, 2016 11:42 am
Location: Scotland

Re: HELP: how to per ip shaping?

Wed Mar 06, 2019 10:48 am

first of all
/queue type
set 5 pcq-rate=47M
set 6 pcq-rate=50M
by default these two are not PCQ so please double check, make sure you have configured pcq-download-default and pcq-upload-default by check from winbox, make sure the rate is set.

secondly
/queue simple
add max-limit=47M/50M name=Internet queue=\
    pcq-upload-default/pcq-download-default target=ether2
I'd suggest to change target=ether2, to target=192.168.1.0/24

finally, disable fasttrack in firewall filter if you have it

to monitor traffic, you can either Torch ether2 or just watch IP - Firewall - Connections, see what IP/ connections are using your bandwidth
 
nelbin
just joined
Topic Author
Posts: 7
Joined: Wed Jan 17, 2018 4:30 am

Re: HELP: how to per ip shaping?

Thu Mar 07, 2019 2:01 am

/queue type
set 5 pcq-rate=47M
set 6 pcq-rate=50M
i no longer use these. both are set to 0.
Fasttrack disabled
target=192.168.1.0/24
i changed to this. im getting same results. i will use torch. can you download blizzard launcher and try doing a speedtest. i want to see if were getting same results.
Last edited by nelbin on Thu Mar 07, 2019 6:32 am, edited 1 time in total.
 
nelbin
just joined
Topic Author
Posts: 7
Joined: Wed Jan 17, 2018 4:30 am

Re: HELP: how to per ip shaping?

Thu Mar 07, 2019 2:08 am

Image
still same results =/
 
solar77
Long time Member
Long time Member
Posts: 586
Joined: Thu Feb 04, 2016 11:42 am
Location: Scotland

Re: HELP: how to per ip shaping?

Thu Mar 07, 2019 11:52 am

as suspected, it's TCP traffic on port 80 so you cannot limit bandwidth per protocol or port.
don't set PCQ to 0,
in winbox, go into queue , queue type, find pcq-download-default and pcq-upload-default, apply rate of your choice.
then in simple queue, do this
add name=LAN_PCQ queue=pcq-upload-default/pcq-download-default target=192.168.1.0/24
start with a smaller download rate, test from your laptop, I use exact same rule and it should work.
 
nelbin
just joined
Topic Author
Posts: 7
Joined: Wed Jan 17, 2018 4:30 am

Re: HELP: how to per ip shaping?

Fri Mar 08, 2019 1:37 am

If i set 50m/50m in simple queue maxlimit, shaping will not work. Now, I set my values to 40m/40m and it worked.

Why is that?
 
solar77
Long time Member
Long time Member
Posts: 586
Joined: Thu Feb 04, 2016 11:42 am
Location: Scotland

Re: HELP: how to per ip shaping?

Fri Mar 08, 2019 8:35 pm

it might be that you have other rules kicking in once the speed is set to 50/50

my suggestion, as in previous post, is to change Rate in both pcq-download-default and pcq-upload-default
then add simple queue, with nothing else, just use the PCQ as in
add name=LAN_PCQ queue=pcq-upload-default/pcq-download-default target=192.168.1.0/24
remove or disable all other queues .

let me know who you get on.
 
User avatar
Steveocee
Forum Guru
Forum Guru
Posts: 1120
Joined: Tue Jul 21, 2015 10:09 pm
Location: UK
Contact:

Re: HELP: how to per ip shaping?

Sun Mar 10, 2019 8:31 am

If i set 50m/50m in simple queue maxlimit, shaping will not work. Now, I set my values to 40m/40m and it worked.

Why is that?
Queue will only apply once you hit the max limit, if you set it higher than your connection can go then it will never apply itself. It going red only signifies traffic is nearing max, not being applied.

I generally apply queues at a rate of about 90% of what the max is, it ensures the Mikrotik stays in control of bandwidth and gives you a small over head. On bigger numbers you can reduce that percent and use a “safe” couple of Mb.

Who is online

Users browsing this forum: forthal, grayfoxbsd and 89 guests