Community discussions

MikroTik App
 
aesmith
Member Candidate
Member Candidate
Topic Author
Posts: 264
Joined: Wed Mar 27, 2019 6:43 pm

Queuing = Preventing one host from hogging all the bandwidth

Tue Jun 08, 2021 6:45 pm

Hi,
My network consists of a Mikrotik SXT as the Internet router, this router has firewall and NAT configured, and connects by Ethernet to my main router RB4011 which connects everything else. What I would like to do is prevent one particular device on the LAN from hogging all the Internet bandwidth while it's running downloads. However I don't necessarily want it limited at all times, nor do I want it limited if it's receiving data from within the network rather than the Internet.

First thought is to apply the policy on the interface from the SXT to the RB, on transmit. Functionally what I want is any traffic not destined to this host to have preferential treatment, up to say 5 meg, however I don't want to limit that traffic to that bandwidth. I can configure Mangle rules either to mark everything destined for this particular host, or mark everything not destined. It's a fixed IP so easy to identify.
What I'm not sure on is the queuing. For example this doesn't seem to work, all traffic hit's the "NOT-HOST" queue whether it's from the host in question or not.
/ip firewall mangle
add action=mark-connection chain=postrouting connection-state=new dst-address=!192.168.1.100 new-connection-mark=NOT-HOST passthrough=yes src-address-list=""
add action=mark-packet chain=postrouting connection-mark=NOT-HOST new-packet-mark=NOT-HOST passthrough=no

/queue tree
add max-limit=100M name=ETHERNET-OUT parent=bridge
add limit-at=5M max-limit=100M name=NOT-HOST packet-mark=NOT-HOST parent=ETHERNET-OUT
add limit-at=20M max-limit=100M name=ETHERNET-DEF packet-mark=no-mark parent=ETHERNET-OUT
Not sure if it's my marking or the queuing that's at fault here. Nor am I actually sure that the queuing will behave exactly as I want even if it did work, so any comments would be appreciated.

Thanks, Tony S
 
jonah1810
Frequent Visitor
Frequent Visitor
Posts: 98
Joined: Tue Jul 30, 2019 10:19 pm

Re: Queuing = Preventing one host from hogging all the bandwidth

Tue Jun 08, 2021 7:22 pm

why not just put 1 simple queue in the sxt for the host you want to limit?

that way it's not limiting your LAN speed.
 
aesmith
Member Candidate
Member Candidate
Topic Author
Posts: 264
Joined: Wed Mar 27, 2019 6:43 pm

Re: Queuing = Preventing one host from hogging all the bandwidth

Wed Jun 09, 2021 6:59 pm

Thanks. My understanding is that a simple queue will simply limit traffic to that host, even if there is no competing traffic. What I want is that host to be able to use the full bandwidth when it's available, but non-host traffic to take priority for up to say 5meg. Meaning download to this host will run full speed if the network is idle, but slow down if there is other traffic.

Who is online

Users browsing this forum: No registered users and 44 guests