-
Notifications
You must be signed in to change notification settings - Fork 11
/
bench-lab-2nodes.config
80 lines (72 loc) · 4 KB
/
bench-lab-2nodes.config
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
#!/bin/sh
# Configuration example for forwarding/routing performance with netmap pkt-gen:
#
# ------admin network: 192.168.1.0/24 (ssh)----------
# | .1 | .10
#+------------------------------------------+ +-------+ +------------------------------+
#| Device under test | |Juniper| | Packet generator & receiver |
#| | | QFX | | |
#| ix0: 198.18.0.1/24 |=| < |=| vcxl0: 198.18.0.110/24 |
#| 2001:2::1/64 | | | | 2001:2::110/64 |
#| (90:e2:ba:84:20:38) | | | | (00:07:43:2e:e4:71) |
#| | | | | |
#| ix1: 198.19.0.1/24 |=| > |=| vcxl1: 198.19.0.110/24 |
#| 2001:2:0:8000::1/64 | | | | 2001:2:0:8000::110/64 |
#| (90:e2:ba:84:20:39) | +-------+ | (00:07:43:2e:e4:79) |
#| | | |
#| static routes | | |
#| 192.18.0.0/16 => 198.18.0.110 | | |
#| 192.19.0.0/16 => 198.19.0.110 | | |
#| 2001:2::/49 => 2001:2::110 | | |
#| 2001:2:0:8000::/49 => 2001:2:0:8000::110 | | |
#| | | |
#| static arp and ndp | | /boot/loader.conf: |
#| 198.18.0.110 => 00:07:43:2e:e4:71 | | hw.cxgbe.num_vis=2 |
#| 2001:2::110 | | hw.cxgbe.nm_txcsum="1" |
#| | | |
#| 198.19.0.110 => 00:07:43:2e:e4:79 | | |
#| 2001:2:0:8000::110 | | |
#+------------------------------------------+ +------------------------------+
# Admin network IP
SENDER_ADMIN="192.168.1.10"
RECEIVER_ADMIN="192.168.1.10"
DUT_ADMIN="192.168.1.1"
REF_ADMIN=""
# LAB network IP and data
SENDER_LAB_IP="198.18.0.110"
RECEIVER_LAB_IP="198.19.0.110"
#netmap pkt-gen need these information:
SENDER_LAB_IF="vcxl0"
SENDER_LAB_IF_MAC="00:07:43:2e:e4:71"
RECEIVER_LAB_IF="vcxl1"
RECEIVER_LAB_IF_MAC="00:07:43:2e:e4:79"
DUT_LAB_IF_MAC_SENDER_SIDE="90:e2:ba:84:20:38"
DUT_LAB_IF_MAC_RECEIVER_SIDE="90:e2:ba:84:20:39"
#Generate about 2000 flows (20*100)
# source/dest IP and port can be modified
# Number of packet or packet size too
# Used for testing different value of flows as examples
: ${AF:="4"}
: ${SENDER_LAB_NET:="198.18.10.1:2001-198.18.10.71"}
: ${RECEIVER_LAB_NET:="198.19.10.1:2001-198.19.10.70"}
: ${PKT_TO_SEND:="1000000000"}
# Netmap pkt size didn't include CRC (4 Bytes)
# RFC2544 ask to try with:
# 64, 128, 256, 512, 1024, 1280, 1518
# This mean for netmap pktgen:
# 60, 124, 252, 508, 1020, 1276, 1514
# But need to add 2 for inet6
: ${PKT_SIZE:="43"}
# PMC event to collect
: ${PMC_EVENT:="cpu_clk_unhalted.core_p"}
#Timeout: Number of seconds / 5 to wait before declaring a problem for DUT rebooting process
REBOOT_TIMEOUT=120
#Is DUT online: Test command (fill switch MAC table and ARP cache)
IS_DUT_ONLINE_TARGET=${DUT_ADMIN}
IS_DUT_ONLINE_CMD="ping -c 2 ${RECEIVER_LAB_IP} && ping -c 2 ${SENDER_LAB_IP}"
#Bench commands
RECEIVER_START_CMD="pkt-gen -N -f rx -i ${RECEIVER_LAB_IF} -w 2 -W"
RECEIVER_STOP_CMD="pgrep -q pkt-gen && pkill pkt-gen"
SENDER_START_CMD="pkt-gen -N -f tx -w 2 -i ${SENDER_LAB_IF} -n ${PKT_TO_SEND} \
-${AF} -d ${RECEIVER_LAB_NET} -D ${DUT_LAB_IF_MAC_SENDER_SIDE} -T 2000 \
-s ${SENDER_LAB_NET} -S ${SENDER_LAB_IF_MAC} -p 2 -l ${PKT_SIZE}"