xref: /aosp_15_r20/external/ltp/testcases/network/stress/README (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1*49cdfc7eSAndroid Build Coastguard Worker
2*49cdfc7eSAndroid Build Coastguard WorkerNOTE:
3*49cdfc7eSAndroid Build Coastguard Worker
4*49cdfc7eSAndroid Build Coastguard WorkerPhysical Topology
5*49cdfc7eSAndroid Build Coastguard Worker=================
6*49cdfc7eSAndroid Build Coastguard Worker
7*49cdfc7eSAndroid Build Coastguard WorkerThese tests require two machines. And each machine needs to have 2 or more
8*49cdfc7eSAndroid Build Coastguard Workerinterfaces. These tests assume that they run on the following topology.
9*49cdfc7eSAndroid Build Coastguard Worker
10*49cdfc7eSAndroid Build Coastguard Worker                              Control Link
11*49cdfc7eSAndroid Build Coastguard Worker                +------------------------------------+
12*49cdfc7eSAndroid Build Coastguard Worker                |                                    |
13*49cdfc7eSAndroid Build Coastguard Worker        +-------+-------+                    +-------+-------+
14*49cdfc7eSAndroid Build Coastguard Worker        |               +---- Test Link 0 ---+               |
15*49cdfc7eSAndroid Build Coastguard Worker        |  Local Host   +          :         +  Remote Host  |
16*49cdfc7eSAndroid Build Coastguard Worker        |               +---- Test Link n ---+               |
17*49cdfc7eSAndroid Build Coastguard Worker        +---------------+                    +---------------+
18*49cdfc7eSAndroid Build Coastguard Worker
19*49cdfc7eSAndroid Build Coastguard WorkerControl Link is used by the local host to control the remote host.
20*49cdfc7eSAndroid Build Coastguard Worker`control' means, for example, changing the setting of the interfaces that are
21*49cdfc7eSAndroid Build Coastguard Workerconnected to the test links. The setting of the interfaces connected to the
22*49cdfc7eSAndroid Build Coastguard Workercontrol link is never changed.
23*49cdfc7eSAndroid Build Coastguard Worker
24*49cdfc7eSAndroid Build Coastguard WorkerTest Links are the place where the stress tests run. For example, test packets
25*49cdfc7eSAndroid Build Coastguard Workerflow those links. The number of test links must be at least 1. The setting of
26*49cdfc7eSAndroid Build Coastguard Workerthe interfaces connected to the test links would be changed by the tests.
27*49cdfc7eSAndroid Build Coastguard WorkerTherefore, each test link should not belong to any external network. It is
28*49cdfc7eSAndroid Build Coastguard Workerrecommended to connect each pair of interfaces with the ether cross cables.
29*49cdfc7eSAndroid Build Coastguard Worker
30*49cdfc7eSAndroid Build Coastguard WorkerCurrently, different NIC testcases for ICMP/UDP/TCP/Multicast require plural
31*49cdfc7eSAndroid Build Coastguard Workertest links.  Other testcases uses only 1 test link. (Test Link 0)
32*49cdfc7eSAndroid Build Coastguard Worker
33*49cdfc7eSAndroid Build Coastguard Worker
34*49cdfc7eSAndroid Build Coastguard Worker
35*49cdfc7eSAndroid Build Coastguard WorkerInstallation
36*49cdfc7eSAndroid Build Coastguard Worker============
37*49cdfc7eSAndroid Build Coastguard Worker
38*49cdfc7eSAndroid Build Coastguard WorkerLike the other network tests, the remote host must have the LTP installed
39*49cdfc7eSAndroid Build Coastguard Workerin the same exact location as the local host have. Please refer the `Detailed
40*49cdfc7eSAndroid Build Coastguard WorkerInstallation 5.' section in INSTALL.
41*49cdfc7eSAndroid Build Coastguard Worker
42*49cdfc7eSAndroid Build Coastguard Worker
43*49cdfc7eSAndroid Build Coastguard Worker
44*49cdfc7eSAndroid Build Coastguard WorkerExecution
45*49cdfc7eSAndroid Build Coastguard Worker=========
46*49cdfc7eSAndroid Build Coastguard Worker
47*49cdfc7eSAndroid Build Coastguard WorkerTo run the network stress testcases, use network.sh script, located in
48*49cdfc7eSAndroid Build Coastguard Workertestscripts directory. For documentation about using network.sh see INSTALL
49*49cdfc7eSAndroid Build Coastguard Workerand testcases/network/README.md
50*49cdfc7eSAndroid Build Coastguard Worker
51*49cdfc7eSAndroid Build Coastguard WorkerSome stress tests originally designed to be tested with rsh for accessing
52*49cdfc7eSAndroid Build Coastguard Workerremote host are now using ssh using the current user. Old behavior (using rsh
53*49cdfc7eSAndroid Build Coastguard Workercan be achieved with setting LTP_RSH variable).
54*49cdfc7eSAndroid Build Coastguard Worker
55*49cdfc7eSAndroid Build Coastguard WorkerThe behaviour of network stress tests is configurable with environment
56*49cdfc7eSAndroid Build Coastguard Workervariables (See `Environment Variable' section).
57*49cdfc7eSAndroid Build Coastguard Worker
58*49cdfc7eSAndroid Build Coastguard Worker
59*49cdfc7eSAndroid Build Coastguard WorkerAttention for HTTP/FTP stress tests
60*49cdfc7eSAndroid Build Coastguard Worker===================================
61*49cdfc7eSAndroid Build Coastguard Worker
62*49cdfc7eSAndroid Build Coastguard WorkerWhen you run http or ftp stress tests, you have to start http or ftp server
63*49cdfc7eSAndroid Build Coastguard Workerbefore running the tests.
64*49cdfc7eSAndroid Build Coastguard WorkerAbout ssh and dns tests, you don't need to run the ssh or dns server.  Each
65*49cdfc7eSAndroid Build Coastguard Workertest runs named or sshd automatically.
66*49cdfc7eSAndroid Build Coastguard Worker
67*49cdfc7eSAndroid Build Coastguard WorkerThose tests requires that the remote host has `curl' command in order to
68*49cdfc7eSAndroid Build Coastguard Workerupload/download files to/from the local host.
69*49cdfc7eSAndroid Build Coastguard Worker
70*49cdfc7eSAndroid Build Coastguard WorkerWhen you run the ftp upload tests, please make sure the local host have
71*49cdfc7eSAndroid Build Coastguard Workerenough disk space to upload somes files. The size of file is able to
72*49cdfc7eSAndroid Build Coastguard Workerspecify the environment variable (See `Environment Variable' section).
73*49cdfc7eSAndroid Build Coastguard Worker
74*49cdfc7eSAndroid Build Coastguard Worker
75*49cdfc7eSAndroid Build Coastguard WorkerEnvironment Variable
76*49cdfc7eSAndroid Build Coastguard Worker====================
77*49cdfc7eSAndroid Build Coastguard Worker
78*49cdfc7eSAndroid Build Coastguard WorkerThe nestwork stress testcases require the following environment variables:
79*49cdfc7eSAndroid Build Coastguard Worker
80*49cdfc7eSAndroid Build Coastguard Worker  RHOST
81*49cdfc7eSAndroid Build Coastguard Worker  LHOST_HWADDRS
82*49cdfc7eSAndroid Build Coastguard Worker  RHOST_HWADDRS
83*49cdfc7eSAndroid Build Coastguard Worker  HTTP_DOWNLOAD_DIR	(for http stress test)
84*49cdfc7eSAndroid Build Coastguard Worker  FTP_DOWNLOAD_DIR	(for ftp stress test)
85*49cdfc7eSAndroid Build Coastguard Worker  FTP_UPLOAD_DIR	(for ftp stress test)
86*49cdfc7eSAndroid Build Coastguard Worker  FTP_UPLOAD_URLDIR	(for ftp stress test)
87*49cdfc7eSAndroid Build Coastguard Worker
88*49cdfc7eSAndroid Build Coastguard WorkerYou are able to configure the behavior of the testcases with the following
89*49cdfc7eSAndroid Build Coastguard Workerenvironment variables:
90*49cdfc7eSAndroid Build Coastguard Worker
91*49cdfc7eSAndroid Build Coastguard Worker  LTP_RSH
92*49cdfc7eSAndroid Build Coastguard Worker  NS_DURATION		(for the continual test)
93*49cdfc7eSAndroid Build Coastguard Worker  NS_TIMES		(for the repetition test)
94*49cdfc7eSAndroid Build Coastguard Worker  CONNECTION_TOTAL	(for creating a large number of connection test)
95*49cdfc7eSAndroid Build Coastguard Worker  IP_TOTAL		(for adding large number of IP address test)
96*49cdfc7eSAndroid Build Coastguard Worker  IP_TOTAL_FOR_TCPIP	(for multi IP address/alias test in icmp/udp/tcp)
97*49cdfc7eSAndroid Build Coastguard Worker  ROUTE_TOTAL		(for adding large number of route test)
98*49cdfc7eSAndroid Build Coastguard Worker  MTU_CHANGE_TIMES	(for changing mtu test)
99*49cdfc7eSAndroid Build Coastguard Worker  IF_UPDOWN_TIMES	(for interface up/down test)
100*49cdfc7eSAndroid Build Coastguard Worker  MCASTNUM_NORMAL	(for multicast test)
101*49cdfc7eSAndroid Build Coastguard Worker  MCASTNUM_HEAVY	(for multicast test)
102*49cdfc7eSAndroid Build Coastguard Worker  DOWNLOAD_BIGFILESIZE	(for http/ftp downloading stress test)
103*49cdfc7eSAndroid Build Coastguard Worker  DOWNLOAD_REGFILESIZE	(for http/ftp downloading stress test)
104*49cdfc7eSAndroid Build Coastguard Worker  UPLOAD_BIGFILESIZE	(for ftp uploading stress test)
105*49cdfc7eSAndroid Build Coastguard Worker  UPLOAD_REGFILESIZE	(for ftp uploading stress test)
106*49cdfc7eSAndroid Build Coastguard Worker
107*49cdfc7eSAndroid Build Coastguard WorkerIn these value, NS_DURATION is important if you'd like to reduce the test time.
108*49cdfc7eSAndroid Build Coastguard Worker
109*49cdfc7eSAndroid Build Coastguard WorkerRequired environment variables
110*49cdfc7eSAndroid Build Coastguard Worker------------------------------
111*49cdfc7eSAndroid Build Coastguard Worker
112*49cdfc7eSAndroid Build Coastguard Worker o RHOST
113*49cdfc7eSAndroid Build Coastguard Worker   The host name of the remote host to access it via the control link.
114*49cdfc7eSAndroid Build Coastguard Worker
115*49cdfc7eSAndroid Build Coastguard Worker o LHOST_HWADDRS
116*49cdfc7eSAndroid Build Coastguard Worker   The blank-separated hardware address list of the interfaces which are
117*49cdfc7eSAndroid Build Coastguard Worker   connected to a test link at the local host.
118*49cdfc7eSAndroid Build Coastguard Worker   This value have to have at least one address. The sequence of the hardware
119*49cdfc7eSAndroid Build Coastguard Worker   address have to be same to the test link sequence.
120*49cdfc7eSAndroid Build Coastguard Worker
121*49cdfc7eSAndroid Build Coastguard Worker o RHOST_HWADDRS
122*49cdfc7eSAndroid Build Coastguard Worker   The blank-separated hardware address list of the interfaces which are
123*49cdfc7eSAndroid Build Coastguard Worker   connected to a test link at the remote host.
124*49cdfc7eSAndroid Build Coastguard Worker   This value have to have at least one address. The sequence of the hardware
125*49cdfc7eSAndroid Build Coastguard Worker   address have to be same to the test link sequence.
126*49cdfc7eSAndroid Build Coastguard Worker
127*49cdfc7eSAndroid Build Coastguard Worker o HTTP_DOWNLOAD_DIR (for http stress test)
128*49cdfc7eSAndroid Build Coastguard Worker   The directory out of which the http server will serve the documents.
129*49cdfc7eSAndroid Build Coastguard Worker   In the apache case, the value of this variable is same as DocumentRoot
130*49cdfc7eSAndroid Build Coastguard Worker   value in httpd.conf
131*49cdfc7eSAndroid Build Coastguard Worker
132*49cdfc7eSAndroid Build Coastguard Worker o FTP_DOWNLOAD_DIR (for ftp stress test)
133*49cdfc7eSAndroid Build Coastguard Worker   The directory out of which the ftp server will serve the files.
134*49cdfc7eSAndroid Build Coastguard Worker
135*49cdfc7eSAndroid Build Coastguard Worker o FTP_UPLOAD_DIR (for ftp stress test)
136*49cdfc7eSAndroid Build Coastguard Worker   The directory which the ftp server will store the uploaded files.
137*49cdfc7eSAndroid Build Coastguard Worker
138*49cdfc7eSAndroid Build Coastguard Worker o FTP_UPLOAD_URLDIR (for ftp stress test)
139*49cdfc7eSAndroid Build Coastguard Worker   The directory part of URL where the client specifys to upload.
140*49cdfc7eSAndroid Build Coastguard Worker   Namely, when the URL to upload is ftp://ltp.sourceforge.net/upload ,
141*49cdfc7eSAndroid Build Coastguard Worker   /upload is the value to set the environment variable.
142*49cdfc7eSAndroid Build Coastguard Worker
143*49cdfc7eSAndroid Build Coastguard Worker
144*49cdfc7eSAndroid Build Coastguard WorkerOptional environment variables
145*49cdfc7eSAndroid Build Coastguard Worker------------------------------
146*49cdfc7eSAndroid Build Coastguard Worker
147*49cdfc7eSAndroid Build Coastguard Worker o LTP_RSH
148*49cdfc7eSAndroid Build Coastguard Worker   The name of the remote shell command, namely ssh (the default) or rsh.
149*49cdfc7eSAndroid Build Coastguard Worker   In ether case, the remote host must accept the login from the local host
150*49cdfc7eSAndroid Build Coastguard Worker   without password.
151*49cdfc7eSAndroid Build Coastguard Worker
152*49cdfc7eSAndroid Build Coastguard Worker o NS_DURATION (for the continual test)
153*49cdfc7eSAndroid Build Coastguard Worker   The duration of the continual test. The time unit is `second'.
154*49cdfc7eSAndroid Build Coastguard Worker   This variable affects all icmp/tcp/udp tests. The number of the testcase
155*49cdfc7eSAndroid Build Coastguard Worker   in them is big. Therefore, the test time is reduced when you set small
156*49cdfc7eSAndroid Build Coastguard Worker   value to the this variable.
157*49cdfc7eSAndroid Build Coastguard Worker   Except icmp/tcp/udp tests, this variable affects ssh, ftp and http tests.
158*49cdfc7eSAndroid Build Coastguard Worker
159*49cdfc7eSAndroid Build Coastguard Worker o NS_TIMES (for the repetition test)
160*49cdfc7eSAndroid Build Coastguard Worker   The number of repetition times for the repetition tests.
161*49cdfc7eSAndroid Build Coastguard Worker   This value affects IP adress add/del testcase, IP address change testcase
162*49cdfc7eSAndroid Build Coastguard Worker   route add/del testcase and dns query tests.
163*49cdfc7eSAndroid Build Coastguard Worker
164*49cdfc7eSAndroid Build Coastguard Worker o CONNECTION_TOTAL (for creating a large number of connection test)
165*49cdfc7eSAndroid Build Coastguard Worker   The total number of connection when the testcase requires plural connection.
166*49cdfc7eSAndroid Build Coastguard Worker   This value affects udp/tcp multi-connection to the same/different port
167*49cdfc7eSAndroid Build Coastguard Worker   testcases, ftp and http testcases.
168*49cdfc7eSAndroid Build Coastguard Worker
169*49cdfc7eSAndroid Build Coastguard Worker o IP_TOTAL		(for adding large number of IP address test)
170*49cdfc7eSAndroid Build Coastguard Worker   The total number of IP address to add an interface.
171*49cdfc7eSAndroid Build Coastguard Worker   This value affect interface tests to add large number of IP address.
172*49cdfc7eSAndroid Build Coastguard Worker
173*49cdfc7eSAndroid Build Coastguard Worker o IP_TOTAL_FOR_TCPIP	(for multi IP address/alias test in icmp/udp/tcp)
174*49cdfc7eSAndroid Build Coastguard Worker   The total number of IP address to add an interface for TCP/IP testcases.
175*49cdfc7eSAndroid Build Coastguard Worker   This value affects udp/tcp multi-connection to the different IP
176*49cdfc7eSAndroid Build Coastguard Worker   address/alias testcases.
177*49cdfc7eSAndroid Build Coastguard Worker
178*49cdfc7eSAndroid Build Coastguard Worker o ROUTE_TOTAL		(for adding large number of route test)
179*49cdfc7eSAndroid Build Coastguard Worker   The total number of route to add an interface.
180*49cdfc7eSAndroid Build Coastguard Worker   This value affect interface tests to add large number of route.
181*49cdfc7eSAndroid Build Coastguard Worker
182*49cdfc7eSAndroid Build Coastguard Worker o MTU_CHANGE_TIMES	(for changing mtu test)
183*49cdfc7eSAndroid Build Coastguard Worker   The times of change the mtu value of an interface. The interval of
184*49cdfc7eSAndroid Build Coastguard Worker   changing mtu is 5 seconds. Therefore, mtu changing tests requires
185*49cdfc7eSAndroid Build Coastguard Worker   5 x MTU_CHANGE_TIMES [sec].
186*49cdfc7eSAndroid Build Coastguard Worker   This value affect interface tests of changing mtu.
187*49cdfc7eSAndroid Build Coastguard Worker
188*49cdfc7eSAndroid Build Coastguard Worker o IF_UPDOWN_TIMES	(for interface up/down test)
189*49cdfc7eSAndroid Build Coastguard Worker   The up/down times of the interface tests. To up/down an interface takes
190*49cdfc7eSAndroid Build Coastguard Worker   time. If you specify 10,000 into this value, it takes 6 hours.
191*49cdfc7eSAndroid Build Coastguard Worker   This value affect interface tests of upping/down the interface.
192*49cdfc7eSAndroid Build Coastguard Worker
193*49cdfc7eSAndroid Build Coastguard Worker o MCASTNUM_NORMAL	(for multicast tests)
194*49cdfc7eSAndroid Build Coastguard Worker   The number of multicast group to join. This variable is used for
195*49cdfc7eSAndroid Build Coastguard Worker   the stress test after joining some multicast groups. It is not the
196*49cdfc7eSAndroid Build Coastguard Worker   main target for joining lots of multicast.
197*49cdfc7eSAndroid Build Coastguard Worker
198*49cdfc7eSAndroid Build Coastguard Worker o MCASTNUM_HEAVY	(for multicast tests)
199*49cdfc7eSAndroid Build Coastguard Worker   The number of multicast group to join. This variable is used for
200*49cdfc7eSAndroid Build Coastguard Worker   the stress test for joining lots of multicast group. This value is the
201*49cdfc7eSAndroid Build Coastguard Worker   limit of the joining multicast group.
202*49cdfc7eSAndroid Build Coastguard Worker
203*49cdfc7eSAndroid Build Coastguard Worker o DOWNLOAD_BIGFILESIZE	(for http/ftp downloading stress test)
204*49cdfc7eSAndroid Build Coastguard Worker   The file size of the downloading large size file tests.
205*49cdfc7eSAndroid Build Coastguard Worker   This value affects ftp download and http tests.
206*49cdfc7eSAndroid Build Coastguard Worker
207*49cdfc7eSAndroid Build Coastguard Worker o DOWNLOAD_REGFILESIZE	(for http/ftp downloading stress test)
208*49cdfc7eSAndroid Build Coastguard Worker   The file size of the downloading file by many clients.
209*49cdfc7eSAndroid Build Coastguard Worker   This value affects ftp download and http tests.
210*49cdfc7eSAndroid Build Coastguard Worker
211*49cdfc7eSAndroid Build Coastguard Worker o UPLOAD_BIGFILESIZE	(for ftp uploading stress test)
212*49cdfc7eSAndroid Build Coastguard Worker   The file size of the uploading large size file tests.
213*49cdfc7eSAndroid Build Coastguard Worker   The server must have UPLOAD_BIGFILESIZE as free disk space.
214*49cdfc7eSAndroid Build Coastguard Worker   This value affects ftp upload tests.
215*49cdfc7eSAndroid Build Coastguard Worker
216*49cdfc7eSAndroid Build Coastguard Worker o UPLOAD_REGFILESIZE	(for ftp uploading stress test)
217*49cdfc7eSAndroid Build Coastguard Worker   The file size of the downloading file by many clients.
218*49cdfc7eSAndroid Build Coastguard Worker   The server must have UPLOAD_REGFILESIZE x CONNECTION_NUM as free disk space.
219*49cdfc7eSAndroid Build Coastguard Worker   This value affects ftp download and http tests.
220*49cdfc7eSAndroid Build Coastguard Worker
221*49cdfc7eSAndroid Build Coastguard Worker--- Mitsuru Chinen <[email protected]>
222