-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbench-lab-3nodes.config
111 lines (98 loc) · 5.48 KB
/
bench-lab-3nodes.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/bin/sh
#Network diagram
# ------------------admin network (ssh)--------------------------------
# | | |
#+-----------------------+ +----------------------------------------+ +-----------------------+
#| Packet receiver | | Device under test | | Packet Generator |
#| pxetest1 | | pxetest4 | | pxetest3 |
#| | | | | |
#| | | cxl0: 198.18.0.4/24 |<=| vcxl0: 198.18.0.13/24 |
#| | | 2001:2::4/64 | | 2001:2::13/64 |
#| | | 00:07:43:39:79:b0 | | 00:07:43:30:f5:b1 |
#| | | | | |
#|vcxl1: 198.19.0.11/24 |<=| cxl1: 198.19.0.4/24 |<=| vcxl1:198.18.0.113/24 |
#| 2001:2:0:8000::11/64 | | 2001:2:0:8000::4/64 | | 2001:2:0:8000::3/64 |
#| 00:07:43:2e:c7:39 | | 00:07:43:39:79:b8 | | 00:07:43:30:f5:b9 |
#| | | | | |
#| | | static routes | | |
#| | | 198.18.0.0/16 > 198.18.0.13 | | |
#| | | 198.19.0.0/16 > 198.19.0.11 | | |
#| | | 2001:2::/49 > 2001:2::13 | | |
#| | | 2001:2:0:8000::/49 > 2001:2:0:8000::11 | | |
#| | | | | |
#| /boot/loader.conf: | | static arp | | /boot/loader.conf: |
#| hw.cxgbe.num_vis=2 | | 198.18.0.13 > 00:07:43:30:f5:b1 | | hw.cxgbe.num_vis=2 |
#| | | 198.19.0.11 > 00:07:43:2e:c7:39 | | hw.cxgbe.nnmrxq_vi=4 |
#| | | | | hw.cxgbe.nnmtxq_vi=4 |
#+-----------------------+ +----------------------------------------+ +-----------------------+
# Admin network IP
SENDER_ADMIN="pxetest3"
RECEIVER_ADMIN="pxetest1"
DUT_ADMIN="pxetest4"
REF_ADMIN=""
# LAB network IP and data
SENDER_LAB_IP="198.18.0.13"
SENDER_LAB_IP_2="198.18.0.113"
RECEIVER_LAB_IP="198.19.0.11"
#netmap pkt-gen need these information:
SENDER_LAB_IF="vcxl0"
SENDER_LAB_IF_MAC="00:07:43:30:f5:b1"
SENDER_LAB_IF_2="vcxl1"
SENDER_LAB_IF_MAC_2="00:07:43:30:f5:b9"
RECEIVER_LAB_IF="vcxl1"
RECEIVER_LAB_IF_MAC="00:07:43:2e:c7:39"
DUT_LAB_IF_MAC_SENDER_SIDE="00:07:43:39:79:b0"
DUT_LAB_IF_MAC_RECEIVER_SIDE="00:07:43:39:79:b8"
# PMC event to collect
: ${PMC_EVENT:="cpu_clk_unhalted.thread"}
REBOOT_TIMEOUT=120
#Is DUT online? This step allow the switch to fill its MAC table (avoiding to
# broadcast this storm to all ports)
IS_DUT_ONLINE_TARGET=${DUT_ADMIN}
IS_DUT_ONLINE_CMD="ping -c 2 ${RECEIVER_LAB_IP} && ping -c 2 ${SENDER_LAB_IP} && ping -c 2 ${SENDER_LAB_IP_2}"
# 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
# So, just generate 1 byte payload UDP packet with Ethernet padding
: ${PKT_SIZE:="43"}
##### DDoS bench
#Generate about 4000 flows 2x(20*100)
# pkt-gen1: From 198.18.2.1 to 198.18.2.255, at fixed 13Mpps rate (DDoS)
# pkt-gen2: From 198.18.1.1 to 198.18.1.255, at fixed 2Mpps rate (legitimate)
# WARNING: No routing table lookup for this destination
: ${AF:="4"}
: ${SENDER_LAB_NET:="198.18.2.1:2000-198.18.2.255:2200"}
: ${SENDER_LAB_NET_2:="198.18.1.1:2000-198.18.1.255:2200"}
: ${RECEIVER_LAB_NET:="198.19.0.11:2000"}
: ${PKT_TO_SEND:="1000000000"}
SENDER_START_CMD="pkt-gen -N -f tx -i ${SENDER_LAB_IF_2} -n ${PKT_TO_SEND} \
-${AF} -d ${RECEIVER_LAB_NET} -D ${DUT_LAB_IF_MAC_SENDER_SIDE} -w 2 \
-s ${SENDER_LAB_NET} -S ${SENDER_LAB_IF_MAC_2} -l ${PKT_SIZE} -p 1 -R 12000000"
SENDER_START_CMD_2="pkt-gen -N -f tx -i ${SENDER_LAB_IF} -n ${PKT_TO_SEND} \
-${AF} -d ${RECEIVER_LAB_NET} -D ${DUT_LAB_IF_MAC_SENDER_SIDE} -w 2 \
-s ${SENDER_LAB_NET_2} -S ${SENDER_LAB_IF_MAC} -l ${PKT_SIZE} -p 1 -R 2000000"
# $1 is the bench iteration 1
#CUSTOM_CMD='mount /data \&\& collect_stats -c 10 -r /tmp/$1.data \&\& umount /data'
##### Standard forwarding bench
#: ${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:="2000000000"}
#Bench commands
# to be able to use -p 4, hw.cxgbe.nnmtxq_vi=4 must be declared
# Generating 10Mpps x 4 = 40 Mpps
RECEIVER_START_CMD="pkt-gen -N -f rx -i ${RECEIVER_LAB_IF} -w 2 -W"
RECEIVER_STOP_CMD="pkill pkt-gen"
SENDER_STOP_CMD="pkill pkt-gen"
#DoS
#SENDER_START_CMD="pkt-gen -N -f tx -i ${SENDER_LAB_IF} -n ${PKT_TO_SEND} \
#-${AF} -d ${RECEIVER_LAB_NET} -D ${DUT_LAB_IF_MAC_SENDER_SIDE} -p 4 \
#-s ${SENDER_LAB_NET} -S ${SENDER_LAB_IF_MAC} -w 4 -l ${PKT_SIZE} -R 10000000"
#Standard
# Need to reduce this 40G NIC to 10G
#SENDER_START_CMD="pkt-gen -N -f tx -i ${SENDER_LAB_IF} -n ${PKT_TO_SEND} \
#-${AF} -d ${RECEIVER_LAB_NET} -D ${DUT_LAB_IF_MAC_SENDER_SIDE} -p 1 \
#-s ${SENDER_LAB_NET} -S ${SENDER_LAB_IF_MAC} -w 4 -l ${PKT_SIZE} -R 14000000"