To Emulate network traffic we will be using this command
tc qdisc change dev eth0 root netem loss 0%
if above command output will show
RTNETLINK answers:
No such file or directory
Then
we have to use this command to add the same .
tc qdisc add
dev eth0 root netem loss 0%.
Examples:
[root@revplus2 ~]# tc qdisc change dev eth0 root netem
loss 0%
[root@revplus2 ~]# ping 172.19.1.1
PING 172.19.1.1 (172.19.1.1) 56(84) bytes of data.
64 bytes from 172.19.1.1: icmp_seq=1 ttl=255 time=2.81
ms
64 bytes from 172.19.1.1: icmp_seq=2 ttl=255 time=0.586
ms
64 bytes from 172.19.1.1: icmp_seq=3 ttl=255 time=1.35
ms
^C
--- 172.19.1.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2990ms
rtt min/avg/max/mdev = 0.586/1.583/2.810/0.922 ms
[root@revplus2 ~]#
No comments:
Post a Comment