What's new

Is netem module included in firmware? How can I get it?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

kingafish

Occasional Visitor
Hi,

Just wondering if netem module is included, if not, how can I get it into the router? I am able to SSH into the router.

I would like to use such command: tc qdisc add dev eth0 root netem delay 100ms

Thanks
 
Hi all,

I have a couple of questions if anyone can help me learn:
- is there a guide to compiling linux module for asus router somewhere I can reference?
- where can I get the Linux kernel headers source code? I'm referencing https://www.cyberciti.biz/tips/compiling-linux-kernel-module.html and it seems like I need Linux kernel headers
- where should I get my sch_netem.c from? Can https://github.com/torvalds/linux/blob/master/net/sched/sch_netem.c work? or do I need a version for 4.1 or 4.1-rc8? which version should I use?
- is this a good enough Makefile? https://github.com/torvalds/linux/blob/master/net/sched/Makefile
- after successful compile, do I run /sbin/insmod /jffs/bin/sch_netem.ko after putting it at /jffs/bin folder?
- will this module if loaded and used, disable Archer or Flow Cache?
- does loading the module brick the router if something goes wrong?

Additional Info:
My router: rt-ax58u
router has wireless radio function turned off as I have wifi mesh as access point.

I saw that this is for my router if I want to build a firmware:
cd ~/amng-build/release/src-rt-5.02axhnd.675x
make rt-ax58u

Will be great if someone can write up a simple guide for me to learn about compiling this module (or any other modules in general) to be used for ASUS router.

Thanks
 
I'm a little confused about this. It seems to me that actually using the module would require as much or more technical skill as compiling a kernel / module (which I started doing almost 30 years ago). To what purpose have you embarked on this adventure?
 
I'm a little confused about this. It seems to me that actually using the module would require as much or more technical skill as compiling a kernel / module (which I started doing almost 30 years ago). To what purpose have you embarked on this adventure?
Hi, I wanted to increase my ping artificially to have a higher yet stable ping a particular game where most players have high ping and the game punishes low ping players. This can be done either by using 3rd party software, Linux OS, but someone mentioned that it can be done on the router level which I'm also curious to learn more about Linux kernel module.

I'm now more interested in how can I compile this sch_netem.c module for my ASUS router. It would be great if you can point me in the correct direction/learning material.
I've done a bit of research, it seems like I need to cross-compile using toolchain of some sort, and would need to setup https://github.com/RMerl/am-toolchains (for 802.11ax models? given that I have AX58). I have a Ubuntu WSL on hand.

Thanks
 
I'm now more interested in how can I compile this sch_netem.c module for my ASUS router. It would be great if you can point me in the correct direction/learning material.

Go into kconfig, you can add the module there - just note that you'll likely break everything else on the QoS level, unless you are willing to stick-shift everything on the command line...

Hi, I wanted to increase my ping artificially to have a higher yet stable ping a particular game where most players have high ping and the game punishes low ping players. This can be done either by using 3rd party software, Linux OS, but someone mentioned that it can be done on the router level which I'm also curious to learn more about Linux kernel module.

Sounds like a cheat attempt - rather than do it on the router, better to handle this on the PC directly... there are tools that can introduce lag as needed...

netem is a developer tool, not really meant for lay folks...
 
Hi all,

I've managed to set up the build/toolchain on Docker on WSL. After that I managed to compile the firmware using
make rt-ax58u inside the src-rt-5.02axhnd.675x folder.
1704097743622.png


I see that the within the image 96750GW folder, there are modules/lib/modules/4.1.52/kernel/net/sched subfolder which contains the compiled Linux kernel modules.
1704097794225.png


I also see sch_netem.c under asuswrt-merlin.ng\release\src-rt-5.02axhnd.675x\kernel\linux-4.1\net\sched folder. How would I compile sch_netem.c as part of the firmware? Does this involve making use of Kconfig that I see under asuswrt-merlin.ng\release\src-rt-5.02axhnd.675x\kernel\linux-4.1\net\sched folder? Any step here would be appreciated.
1704098233736.png


After which if I manage to compile the firmware again, does this mean that the sch_netem.ko should appear under the asuswrt-merlin.ng\release\src-rt-5.02axhnd.675x\targets\96750GW\modules\lib\modules\4.1.52\kernel\net\sched folder and I will be able to load it to my asus router via /sbin/insmod /jffs/bin/sch_netem.ko after putting it at /jffs/bin folder and it should be compatible with my AX58?

Thanks
 
Probably so?

But the router itself creating the added latency you desire, if it works well-enough there without breaking anything else, will impact /everything/ don't you think? Won't the variable latency between your router and the game server cause issues trying to dial things in? Will your then-unpenalized (by "them") experience be better-enough than your self-penalized situation to warrant all the time invested, both thus far and each and every time you must load/unload the module hereafter - possibly accompanied by a router reboot?

If you really want the best leg up for that game you'd lease a GNU/Linux server on a rack one hop away from the game server and throttle your latency /there/, where you can ensure keeping it /just/ above the threshold at all times. Sounds a bit ludicrous, h'uh? Well it's taking what you're attempting to it's truly ultimate possibility. And making a ton of money playing the game would about be the only good reason for all this. Then again it might be a disqualifying factor if discovered.

I've certainly wasted my fair share of time doing similar stuff, I guess; likely not done yet.

Good fortune to you. BTW your main recent question has already been answered up above, before you asked it.
 
Hi all,

Probably last set of questions.

I managed to compile sch_netem.ko successfully,
- what would be the best way to load the module? modprobe vs insmod?
- will it possibly *brick my router by loading the module? How can I recover from it?
- any other precaution I should take?

*brick here refers to router being a brick and that I'm unable to ssh into it, unable to unload the module by just power cycling

I am also aware that it may affect DPI, QoS, maybe crash wireless function.

Thanks
 

Attachments

  • 1704118105628.png
    1704118105628.png
    35.4 KB · Views: 8

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top