Advertisement
Guest User

latency on network interfaces

a guest
May 26th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # define latency groups
  2. tc qdisc add dev bond0.110 root handle 1: htb
  3. tc class add dev bond0.110 parent 1: classid 1:1 htb rate 10gbit
  4. tc class add dev bond0.110 parent 1:1 classid 1:11 htb rate 10gbit
  5.  
  6. # define latency in groups
  7. tc qdisc add dev bond0.110 parent 1:11 handle 10: netem delay 0ms 0ms 25%
  8. tc qdisc add dev bond0.110 parent 1:12 handle 10: netem delay 5ms 0ms 25%
  9. tc qdisc add dev bond0.110 parent 1:13 handle 10: netem delay 10ms 0ms 25%
  10.  
  11. # first datacenter
  12. tc filter add dev bond0.110 protocol ip u32 match ip dst 172.19.10.30 flowid 1:11
  13. tc filter add dev bond0.110 protocol ip u32 match ip dst 172.19.10.40 flowid 1:11
  14. tc filter add dev bond0.110 protocol ip u32 match ip dst 172.19.10.42 flowid 1:11
  15. tc filter add dev bond0.110 protocol ip u32 match ip dst 172.19.10.100 flowid 1:11
  16. tc filter add dev bond0.110 protocol ip u32 match ip dst 172.19.10.103 flowid 1:11
  17. tc filter add dev bond0.110 protocol ip u32 match ip dst 172.19.10.106 flowid 1:11
  18.  
  19. # second datacenter
  20. tc filter add dev bond0.110 protocol ip u32 match ip dst 172.19.10.31 flowid 1:12
  21. tc filter add dev bond0.110 protocol ip u32 match ip dst 172.19.10.41 flowid 1:12
  22. tc filter add dev bond0.110 protocol ip u32 match ip dst 172.19.10.43 flowid 1:12
  23. tc filter add dev bond0.110 protocol ip u32 match ip dst 172.19.10.101 flowid 1:12
  24. tc filter add dev bond0.110 protocol ip u32 match ip dst 172.19.10.104 flowid 1:12
  25.  
  26. # third datacenter
  27. tc filter add dev bond0.110 protocol ip u32 match ip dst 172.19.10.32 flowid 1:13
  28. tc filter add dev bond0.110 protocol ip u32 match ip dst 172.19.10.44 flowid 1:13
  29. tc filter add dev bond0.110 protocol ip u32 match ip dst 172.19.10.102 flowid 1:13
  30. tc filter add dev bond0.110 protocol ip u32 match ip dst 172.19.10.105 flowid 1:13
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement