Advertisement: Linux VPS from $4/month - contact support for custom offer.
 
+ Post New Thread
Results 1 to 1 of 1

Thread: Cause/simulate packet loss on the Linux network interface

  1. #1
    Administrator
    Join Date
    Mar 2013
    Posts
    2,802

    Cause/simulate packet loss on the Linux network interface

    Following command may work (eth0 is my network interface name).
    But executing this on remote computer to which you do not have physical access may be risky, because you can make its network interface not responding your connection requests!
    Maybe will help to reboot that remove PC if the provider has web console, maybe even this will not work. So maybe run the script like:

    #!/bin/bash
    sudo tc qdisc add dev eth0 root netem loss 20%
    pause 1800
    sudo tc qdisc del dev eth0 root netem loss 20%
    and run it inside "screen" or in background "bash scriptname &"

    packet loss:
    sudo tc qdisc add dev eth0 root netem loss 20%

    remove the rule:
    sudo tc qdisc del dev eth0 root netem loss 20%
    Last edited by Fli; 10-23-2024 at 06:35 PM.

+ Post New Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
 Protected by : ZB BLOCK  &  StopForumSpam