Skip to main content

Posts

Showing posts from August, 2019

Network delay simulation

"tc" and "iptable" both can be used for network control. "iptable" is dangerous as one can accidently block ssh port. "tc" provide extra level of customization for traffic control. 1) for adding delay: tc qdisc add dev eth0 root netem delay 100ms   if "tc" command not found, then you can install it:   yum -y install tc   Note:name of device "eth0" can be found running "ifconfig" command The name eth0 can differ in various system.   for checking if delay is introduced or not, run: tc -s qdisc   for removing all "tc" rules, run this command: tc qdisc del dev eth0 root netem  and again verfiy : tc -s qdisc     2) for adding delay in statistically distributed fashion: tc qdisc add dev eth0 root netem delay 150ms 50ms distribution normal note: if it gives error "RTNETLINK answers: File exists" then run:  tc qdisc change dev eth0 r...