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