Is it possible to set up bandwidth prioritization through MAC address?

I am new user of openwrt, and I have encountered difficulties in configuring the bandwidth control through the MAC address. I used DD-WRT before, and had this configuration through web-GUI, without any difficulty. All the searches I do, direct me to SQM, but that doesn't solve my problem. I installed the QoS package, but it did not help me. Is it possible through some package, have the option of bandwidth control by MAC, preferably in the interface Luci?

1 Like

In order to use LuCI...

Are you willing to make a static DHCP lease and then use the IP in QoS?

have you tried it?

openwrt uses sqm with the cake queue to archive fair service and low latency for all devices and all services on each device.
this usually alleviates the need for per-device or per-service priorisation and lets you get back to other things :wink:

tldr; per-mac prio is not supported throu gui.

Yes, I've tried. My connection has 10 Mbps download and 575 Kbps upload. In SQM I already used values such as 7mbps and 400kbps, minimized the bufferbloat, however in games still feel lags if someone does some activity on the web as for example watching some video. For this device, in DD-WRT I set 4mbps download and 100kbps upload, and don´t have lags

I also thought of setting an IP as static, but I did not find the bandwidth control options in QoS, only protocols prioritization.

Which model is your router?
What is your line type? ADSL?
What did you enter for the Link Layer Adaptation in SQM? You may also post your whole SQM config from /etc/config/sqm.
Could you please run ping across your uplink, with and without a download in parallel, so we get some numbers what "lag" means for you?
Do you care about latency during bulk uploads as well?

I agree with @fuller, once the cake SQM is properly configured for your link, more specific configuration is usually not needed.

Thanks for the reply.

The model is a TP-Link TL-WR842N/ND v3
The line type is ADSL2 +
Here is my configuration as requested:

root@OpenWrt:~# vi /etc/config/sqm

config queue 'eth1'
        option interface 'eth1'
        option qdisc 'fq_codel'
        option script 'simple.qos'
        option qdisc_advanced '0'
        option upload '545'
        option debug_logging '0'
        option verbosity '5'
        option linklayer 'atm'
        option overhead '44'
        option enabled '1'
        option download '9100'

Here is a connectivity test of my connection without SQM:

Here is a connectivity test of my connection with SQM:

Ping without download (with SQM):

Ping with download (with SQM):

Game Overwatch without download (with SQM):

Ping%20sem%20download

Game Overwatch with download (with SQM):

Ping%20com%20download

DSL Reports with SQM:

Com%20SQM

I would ask you to try qdisc: cakes and script: layer_cake instead and try the recommendations in the " Making cake sing and dance, on a tight rope without a safety net" section of https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm-details. This should give you reasonably fair bandwidth distribution among users. No it is not going to be perfect, but it should ameliorate your issues. please try and report back. The beauty of cake's sharing that as long only your video watcher is active she/he will get all the bandwidth but if there are other computers active the video will only get 1/(number of concurrent active internal IPs),...
Now, you might have tried that already, in that case please let me know how well that worked and why you switched away from that?

I changed the script to Cake, and it still didn't solve it. I continue with lag´s in Overwatch if another equipment performs some activity on the web.
SQM Settings with cake:

root@OpenWrt:~# cat /etc/config/sqm

config queue 'eth1'
        option interface 'eth1'
        option qdisc_advanced '0'
        option upload '545'
        option debug_logging '0'
        option verbosity '5'
        option linklayer 'atm'
        option overhead '44'
        option enabled '1'
        option download '9100'
        option qdisc 'cake'
        option script 'layer_cake.qos'

Some settings such as nat dual-dsthost and nat dual-srchost, are not present. I suspect it's because of the processor.

On the Queue Discipline tab, enable:

  • Show and Use Advanced Configuration
  • Show and Use Dangerous Configuration

Then these input fields will show up:

  • Advanced option string to pass to the ingress queueing disciplines
  • Advanced option string to pass to the egress queueing disciplines

Yes, I´ve tried and this options not show-me.

Okay, try to add the following directly to /etc/config/sqm (either by using vi as editor or by installing nano first: opkg update ; opkg install nano):

	option qdisc_advanced '1'
	option qdisc_really_really_advanced '1'
	option iqdisc_opts 'nat dual-dsthost ingress'
	option eqdisc_opts 'nat dual-srchost'

Here is a full /etc/config/sqm based on the one you posted above:

config queue
	option debug_logging '0'
	option verbosity '5'
	option qdisc_advanced '1'
	option squash_dscp '0'
	option squash_ingress '0'
	option ingress_ecn 'ECN'
	option egress_ecn 'ECN'
	option qdisc_really_really_advanced '1'
	option linklayer 'atm'
	option overhead '44'
	option linklayer_advanced '1'
	option tcMTU '2047'
	option tcTSIZE '128'
	option tcMPU '0'
	option linklayer_adaptation_mechanism 'default'
	option iqdisc_opts 'nat dual-dsthost ingress'
	option eqdisc_opts 'nat dual-srchost'
	option interface 'eth1'
	option download '9100'
	option enabled '1'
	option upload '545'
	option qdisc 'cake'
	option script 'layer_cake.qos'

You could try to copy this over your existing one, then call:
/etc/init.d/sqm stop ; /etc/config/sqm start

After doing this, please run:
tc -s qdisc
and post the output here.

Colleagues,

any solution for the prioritization issue? for example, I want to prioritize my PC whenever it gets connected to the router because I am using it for the gaming only.

your support will be highly appreciated.

I suggest you to try out mikrotik router, mac or IP based prioritization is not supported yet (I have searched extensively in the forums), QoS SQM may be able to do this, but I am not sure, I have come across many users who are trying to do the same thing, (including me), but all I have figured out is to move to something SOHO based routers like Mikrotik or Ubiquiti EdgeRouter.

1 Like