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