Skip to content

Commit

Permalink
Merge pull request #65 from YutaroHayakawa/basic_bufferbloat
Browse files Browse the repository at this point in the history
Add an example to demonstrate bufferbloat
  • Loading branch information
slankdev authored Aug 8, 2021
2 parents ac7ae5c + 14b9fd3 commit c1690a5
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/basic_bufferbloat/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Bufferbloat demonstration

Simple demonstration of the [bufferbloat](https://www.bufferbloat.net/projects/) problem.

![](./topo.png)
84 changes: 84 additions & 0 deletions examples/basic_bufferbloat/spec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
nodes:
- name: R1
image: nicolaka/netshoot
interfaces:
- { name: net0, type: direct, args: R2#net0 }
- { name: net1, type: direct, args: C1#net0 }
- { name: net2, type: direct, args: C2#net0 }
- name: R2
image: nicolaka/netshoot
interfaces:
- { name: net0, type: direct, args: R1#net0 }
- { name: net1, type: direct, args: C3#net0 }
- { name: net2, type: direct, args: C4#net0 }
- name: C1
image: nicolaka/netshoot
interfaces:
- { name: net0, type: direct, args: R1#net1 }
- name: C2
image: nicolaka/netshoot
interfaces:
- { name: net0, type: direct, args: R1#net2 }
- name: C3
image: nicolaka/netshoot
interfaces:
- { name: net0, type: direct, args: R2#net1 }
- name: C4
image: nicolaka/netshoot
interfaces:
- { name: net0, type: direct, args: R2#net2 }
node_configs:
- name: R1
cmds:
- cmd: ip addr add 10.0.0.1/24 dev net1
- cmd: ip addr add 10.0.1.1/24 dev net2
- cmd: ip addr add 10.0.2.1/24 dev net0
- cmd: ip route add default via 10.0.2.2
- cmd: tc qdisc add dev net0 root netem rate 500mbit
- name: R2
cmds:
- cmd: ip addr add 10.0.2.2/24 dev net0
- cmd: ip addr add 10.0.3.1/24 dev net1
- cmd: ip addr add 10.0.4.1/24 dev net2
- cmd: ip route add default via 10.0.2.1
- cmd: tc qdisc add dev net0 root netem rate 500mbit
- name: C1
cmds:
- cmd: ip addr add 10.0.0.2/24 dev net0
- cmd: ip route add default via 10.0.0.1
- name: C2
cmds:
- cmd: ip addr add 10.0.1.2/24 dev net0
- cmd: ip route add default via 10.0.1.1
- name: C3
cmds:
- cmd: ip addr add 10.0.3.2/24 dev net0
- cmd: ip route add default via 10.0.3.1
- name: C4
cmds:
- cmd: ip addr add 10.0.4.2/24 dev net0
- cmd: ip route add default via 10.0.4.1
test:
- cmds:
- cmd: echo "=========================================="
- cmd: echo "iperf from C1 to C3"
- cmd: echo "=========================================="
- cmd: docker exec C3 iperf -s -i 1 &
- cmd: sleep 3
- cmd: docker exec C1 iperf -c 10.0.3.2 2>&1 > /dev/null
- cmd: docker exec C3 pkill iperf
- cmd: echo "=========================================="
- cmd: echo "ping from C2 to C4"
- cmd: echo "=========================================="
- cmd: docker exec C2 ping -c 10 10.0.4.2
- cmd: echo "=========================================="
- cmd: echo "ping from C2 to C4 while iperf-ing from C1 to C3"
- cmd: echo "=========================================="
- cmd: docker exec C3 iperf -s 2>&1 > /dev/null &
- cmd: sleep 3
- cmd: docker exec C1 iperf -c 10.0.3.2 -t 60 2>&1 > /dev/null &
- cmd: sleep 3
- cmd: docker exec C2 ping -c 10 10.0.4.2
- cmd: docker exec C1 pkill iperf
- cmd: sleep 3
- cmd: docker exec C3 pkill iperf
Binary file added examples/basic_bufferbloat/topo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c1690a5

Please sign in to comment.