-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
88 lines (88 loc) · 2.87 KB
/
Copy pathdocker-compose.yml
File metadata and controls
88 lines (88 loc) · 2.87 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
version: "3"
services:
vpp_client:
build: .
stdin_open: true
tty: true
working_dir: /workspace
container_name: vpp_client
hostname: client
volumes:
- /tmp/memif:/memif
- ..:/workspace
entrypoint: [/bin/bash, -c]
command:
- |
cd build-dev
make install
mkdir -p /var/log/vpp
tee -a /etc/vpp/startup.conf <<EOF
cpu { main-core 1 }
plugins {
plugin default { disable }
plugin acl_plugin.so { enable }
plugin dpdk_plugin.so { enable }
plugin ping_plugin.so { enable }
plugin memif_plugin.so { enable }
plugin nsim_plugin.so { enable }
plugin hicn_plugin.so { enable }
}
unix { exec | startup-config /etc/vpp/client-up.txt }
EOF
tee -a /etc/vpp/client-up.txt <<EOF
create memif socket id 1 filename /memif/memif1.sock
create interface memif id 0 socket-id 1 slave
set int state memif1/0 up
set int ip addr memif1/0 192.168.1.1/24
set int ip addr memif1/0 2001::1/64
ip route add b002::1/64 via 2001::2 memif1/0
EOF
sleep 5
vpp -c /etc/vpp/startup.conf &
sleep 20
vppctl hicn enable b002::1/64
hiperf -C -R b002::1
/bin/bash
vpp_server:
build: .
stdin_open: true
tty: true
working_dir: /workspace
container_name: vpp_server
hostname: server
volumes:
- /tmp/memif:/memif
- ..:/workspace
entrypoint: [/bin/bash, -c]
command:
- |
cd build-dev
make install
mkdir -p /var/log/vpp
tee -a /etc/vpp/startup.conf <<EOF
cpu { main-core 2 }
plugins {
plugin default { disable }
plugin acl_plugin.so { enable }
plugin dpdk_plugin.so { enable }
plugin ping_plugin.so { enable }
plugin memif_plugin.so { enable }
plugin nsim_plugin.so { enable }
plugin hicn_plugin.so { enable }
}
unix { exec | startup-config /etc/vpp/server-up.txt }
EOF
tee -a /etc/vpp/server-up.txt <<EOF
create memif socket id 1 filename /memif/memif1.sock
create interface memif id 0 socket-id 1 master
set int state memif1/0 up
set int ip addr memif1/0 192.168.1.2/24
set int ip addr memif1/0 2001::2/64
set nsim delay 20 ms bandwidth 0.1 gbit packet-size 128
nsim output-feature enable-disable memif1/0
EOF
sleep 2
vpp -c /etc/vpp/startup.conf &
sleep 10
hiperf -S -R -B 4000kbps b002::1
/bin/bash