-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbench-lab-2nodes.config
96 lines (86 loc) · 4.08 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/bin/sh
#Network diagram
# -------------admin network (ssh)--------------------
# | |
#+----------------------------------------+ +-----------------------+
#| Device under test | | Packet receiver |
#| 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 |
#| | | |
#| cxl1: 198.19.0.4/24 |=>| vcxl1: 198.19.0.13/24 |
#| 2001:2:0:8000::4/64 | | 2001:2:0:8000::13/64 |
#| 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.13 | | |
#| 2001:2::/49 > 2001:2::13 | | |
#| 2001:2:0:8000::/49 > 2001:2:0:8000::13 | | |
#| | | |
#| static arp | | /boot/loader.conf: |
#| 198.18.0.13 > 00:07:43:30:f5:b1 | | hw.cxgbe.num_vis=2 |
#| 198.19.0.13 > 00:07:43:30:f5:b9 | | hw.cxgbe.nnmrxq_vi=4 |
#| | | hw.cxgbe.nnmtxq_vi=4 |
#+----------------------------------------+ +-----------------------+
# Admin network IP
SENDER_ADMIN="pxetest3"
RECEIVER_ADMIN="pxetest3"
DUT_ADMIN="pxetest4"
REF_ADMIN=""
# LAB network IP and data
SENDER_LAB_IP="198.18.0.13"
RECEIVER_LAB_IP="198.19.0.13"
#netmap pkt-gen need these information:
SENDER_LAB_IF="vcxl0"
SENDER_LAB_IF_MAC="00:07:43:30:f5:b1"
RECEIVER_LAB_IF="vcxl1"
RECEIVER_LAB_IF_MAC="00:07:43:30:f5:b9"
DUT_LAB_IF_MAC_SENDER_SIDE="00:07:43:39:79:b0"
DUT_LAB_IF_MAC_RECEIVER_SIDE="00:07:43:39:79:b8"
##### DDoS bench
#Generate about 2000 flows (20*100)
# From 198.18.1.240 to 198.18.1.255 = 15 (%), simulating 6Mpps of legitimate
# From 198.18.2.0 to 98.18.2.84 = 85 (%), simulating 34Mpps of DDoS
# WARNING: No routing table lookup for this destination
#: ${AF:="4"}
#: ${SENDER_LAB_NET:="198.18.1.240:2000-198.18.2.84:2200"}
#: ${RECEIVER_LAB_NET:="198.19.0.13:2000"}
#: ${PKT_TO_SEND:="1000000000"}
##### 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:="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
# So, just generate 1 byte payload UDP packet with Ethernet padding
#: ${PKT_SIZE:="43"}
: ${PKT_SIZE:="60"}
# 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}"
#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"
#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 2 -l ${PKT_SIZE} -R 14800000"