What's new

Introducing and controlling packet loss - possible?

  • 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!

Jule

New Around Here
Greetings all.

Just for the fun (and to learn) I would like to produce packet loss through my RT-AC87U router, latest Merlin ware. Yes produce, not eliminate :) It has to be controllable to fx 5 or 15%, specific number isnt important.

Can it be done? Through Custum Config Files? I have a rather vague idea to use the TCP values through Tools/Other Settings, but rather than experiment wildly with potentially endless frustration Im asking for good advice.

Thx for reading.
 
Last edited by a moderator:
Thx Nullity

Seems the Network Emulator is Linux only.
As I run Win7 that pretty much closes the door. Petty really, having a breef look at the Network Emulator, it seems to be what Im looking for - and much more :)

Also I was hoping to do the packet loss thingy through the router, maybe more simple and basic.
It may well be that I have to look at a Windows solution, but still hope for the Asus..
 
Last edited by a moderator:
TC is part of Entware-NG (command: opkg install tc-legacy to get it) - I installed in just now... ;)

AsusWRT already has tc, but I dunno if the firmware includes the netem kernel module.

Code:
admin@merlin:/tmp/home/root# ls /lib/modules/2.6.22.19/kernel/net/sched/
sch_esfq.ko  sch_hfsc.ko  sch_tbf.ko

I think that folder would need to have "sch_netem.ko", but my AsusWRT firmware lacks it.
 
Thx Nullity

Seems the Network Emulator is Linux only.
As I run Win7 that pretty much closes the door. Petty really, having a breef look at the Network Emulator, it seems to be what Im looking for - and much more :)

Also I was hoping to do the package loss thingy through the router, maybe more simple and basic.
It may well be that I have to look at a Windows solution, but still hope for the Asus..

Why do you want to simulate packet loss?

(AsusWRT is Linux, FYI)
 
Go download Wireshark and possibly buy a book of how to use Wireshark for packet-sniffing. Much of the things I personally find interesting, I learned via packet-sniffing (though I used tcpdump).

Simulating packet loss is a pretty advanced topic which usually requires sophisticated means of monitoring the results.
 
Go download Wireshark and possibly buy a book of how to use Wireshark for packet-sniffing. Much of the things I personally find interesting, I learned via packet-sniffing (though I used tcpdump).

Simulating packet loss is a pretty advanced topic which usually requires sophisticated means of monitoring the results.

Thx Nullity appreciated.
This "packet loss project" might be more complex than I first intended. Still it might be a good learning process none the less.

Will have a look at Wireshark, and other options mentioned as well. I have a better starting point now no doubt :)
 
Last edited by a moderator:
Go download Wireshark and possibly buy a book of how to use Wireshark for packet-sniffing.

I'm sure that you would have mentioned it if you'd had a certain book in mind, but do you have any favourites? Or, even more important, are there any you'd recommend steering well clear of?
 
I'm sure that you would have mentioned it if you'd had a certain book in mind, but do you have any favourites? Or, even more important, are there any you'd recommend steering well clear of?

The resource I used most was the tcpdump & Wireshark official documentation/man-pages and Google. The only one I remember reading is Practical Packet Analysis, which is a good, inexpensive book. Pretty much any technical books from No Starch Press & O'Reilly are good. If you prefer books, Wireshark has a dozen or so. tcpdump is best learned through official man-pages, tutorials, etc, since there are no books I am aware of, except generic computer networking reference books.

I hesitate to advocate learning with Wireshark since I personally very much prefer tcpdump, but with it's GUI, Wireshark is probably better for a beginner. I find the search filter of tcpdump (pcap-filter) much more intuitive.

Try both & see which you prefer. :) You can load tcpdump onto AsusWRT-merlin via entware which is very convenient for learning. I used tcpdump to monitor SSDP traffic when I was trouble-shooting UPnP/DLNA problems. I had to disable CTF (hardware accel) to get tcpdump to work since CTF seemed to interfere.
 
/usr/sbin/iptables -A FORWARD -m statistic --mode random --probability 0.15 -j DROP

Does that work on AsusWRT?
 
I think no. He would need to turn it on in the Linux kernel config, then recompile the Asuswrt-Merlin firmware.

~/asuswrt-merlin/release/src-rt-6.x.4708/linux/linux-2.6.36/config_base.6a
CONFIG_NETFILTER_XT_MATCH_STATISTIC=m

Then copy this file to the router /jffs/bin folder:
~/asuswrt-merlin/release/src/router/arm-uclibc/target/lib/modules/2.6.36.4brcmarm/kernel/net/netfilter/xt_statistic.ko

OR, a guy would simply need to compile the netfilter xt_statistic kernel module for him. Download it here:
asuswrt-merlin-380.57-ARM-xt-statistic.tar.gz
Code:
md5sum: 94c95303aba7bc8eba2f9e6a2eb0f0d0
sha256sum: 88747bb142b8852cc11867a7300c45f3f63bca3fba46365f1819b672ef0c077e

Now, go use it.
/sbin/insmod /jffs/bin/xt_statistic.ko
/usr/sbin/iptables -A FORWARD -m statistic --mode random --probability 0.15 -j DROP
 
Last edited:

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