Changes between Version 5 and Version 6 of GENIEducation/SampleAssignments/TcpAssignment/ExerciseLayout/Execute


Ignore:
Timestamp:
05/10/13 11:02:49 (12 years ago)
Author:
shuang@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIEducation/SampleAssignments/TcpAssignment/ExerciseLayout/Execute

    v5 v6  
    4242}}}
    4343
     44'''It is a little bit tricky to configure delay/loss on a virtual machine'''[[BR]]
     45Step 1: find our qdisc family number by executing "sudo /sbin/tc qdisc", a sample output could be like the following:
     46{{{
     47[shufeng@center ~]$ sudo /sbin/tc qdisc
     48qdisc mq 0: dev eth0 root
     49qdisc htb 150: dev eth1 root refcnt 9 r2q 10 default 1 direct_packets_stat 0
     50qdisc netem 140: dev eth1 parent 150:1 limit 1000
     51qdisc htb 170: dev eth2 root refcnt 9 r2q 10 default 1 direct_packets_stat 0
     52qdisc netem 160: dev eth2 parent 170:1 limit 1000
     53qdisc htb 130: dev eth3 root refcnt 9 r2q 10 default 1 direct_packets_stat 0
     54qdisc netem 120: dev eth3 parent 130:1 limit 1000
     55}}}
     56Now if the ethernet card you want to change is eth3, you can find the "parent qdisc id" you want to use is "120:1" by looking at the following line:
     57{{{
     58qdisc netem 120: dev eth3 parent 130:1 limit 1000
     59}}}
     60As a result, you change the delay/loss by executing the following:
     61{{{
     62sudo /sbin/tc qdisc add dev eth3 parent 120:1 netem delay 100ms loss 5%
     63sudo /sbin/tc qdisc change dev eth3 parent 120:1 netem delay 100ms loss 5%
     64sudo /sbin/tc qdisc del dev eth3 parent 120:1 netem delay 100ms loss 5%
     65}}}
    4466
    4567