aboutsummaryrefslogtreecommitdiffstats
path: root/tests/2-nodes-hicn-light.yml
blob: 674df3ea41a7564f211a64afe17b002cc9f0e0c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
version: "3"
services:
  client:
    container_name: ${TEST_LIGHT}-client
    command:
      - |
        if [ -d /workspace/build-dev ]; then
          ninja -C /workspace/build-dev install
        fi

        sudo ip link add br0 type bridge
        sudo ip addr add 192.168.1.1/24 dev br0
        sudo ip link set eth0 master br0
        sudo ip link set eth0 up
        sudo ip link set br0 up
        sudo ip route add 192.168.1.2 via 192.168.1.1 dev br0
        tee -a /tmp/hicn-light.conf <<EOF
        add listener udp local0 192.168.1.1 9199 br0
        add connection udp conn0 192.168.1.2 9199 192.168.1.1 9199
        add route conn0 b002::/64 1
        EOF

        rm -f /tmp/lite_client.log

        sudo hicn-light-daemon \
          --daemon \
          --log-file /tmp/lite_client.log \
          --config /tmp/hicn-light.conf

        tail -f /dev/null

  server:
    container_name: ${TEST_LIGHT}-server
    command:
      - |
        if [ -d /workspace/build-dev ]; then
          ninja -C /workspace/build-dev install
        fi

        sudo ip link add br0 type bridge
        sudo ip addr add 192.168.1.2/24 dev br0
        sudo ip link set eth0 master br0
        sudo ip link set eth0 up
        sudo ip link set br0 up

        tee -a /tmp/hicn-light.conf <<EOF
        add listener udp local0 192.168.1.2 9199 br0
        add connection udp conn0 192.168.1.1 9199 192.168.1.2 9199
        add route conn0 b002::/64 1
        EOF

        rm -f /tmp/lite_server.log

        sudo hicn-light-daemon \
          --daemon \
          --log-file /tmp/lite_server.log \
          --config /tmp/hicn-light.conf --capacity 0

        sleep 4

        hiperf -q -z hicnlight_module -S -R -B 4000kbps ${RTC_PRODUCER} -P 2 &
        hiperf -q -z hicnlight_module -S ${RAAQM_PRODUCER}/128 &
        hicn-ping-server -q -z hicnlight_module -s 0 -n ${PING_PRODUCER}/128 &

        tail -f /dev/null