1# LTP Network Tests 2 3## Pre-requisites 4Enable all the networking services on both client and server machines: 5rshd, nfsd, fingerd. 6 7## Server Configuration 8* Verify that the below daemon services are running. If not, please install 9and start them: 10rsh-server, telnet-server, finger-server, rdist, rsync, dhcp-server, http-server. 11 12Note: If any of the above daemon is not running on server, the test related to 13that service running from client will fail. 14 15* Edit the "/root/.rhosts" file. Please note that the file may not exist, 16so you must create one if it does not. You must add the fully qualified 17hostname of the machine you are testing on to this file. By adding the test 18machine's hostname to this file, you will be allowing the machine to rsh to itself, 19as root, without the requirement of a password. 20 21```sh 22echo $client_hostname >> /root/.rhosts 23``` 24 25You may need to re-label '.rhost' file to make sure rlogind will have access to it: 26 27```sh 28/sbin/restorecon -v /root/.rhosts 29``` 30 31* Add rlogin, rsh, rexec into /etc/securetty file: 32 33```sh 34for i in rlogin rsh rexec; do echo $i >> /etc/securetty; done 35``` 36 37## FTP setup 38* In “/etc/ftpusers” [or vi /etc/vsftpd.ftpusers], comment the line containing 39“root” string. This file lists all those users who are not given access to do ftp 40on the current system. 41 42* If you don’t want to do the previous step, put following entry into /root/.netrc 43machine <remote_server_name> login root password <remote_root_password>. 44Otherwise, ftp,rlogin & telnet fails for ‘root’ user & hence needs to be 45executed using ‘test’ user to get successful results. 46 47## NFS setup 48* In “/etc/exports“, add the following: 49 50``` 51/ <local_machine_ip>/255.255.255.0(rw,no_root_squash,sync) 52``` 53 54* Then run “exportfs” to get a list of exported file system. 55 56## LTP setup 57Install LTP testsuite on both client and server machines. 58Make sure testcases and network tools are in PATH, e.g.: 59 60```sh 61export PATH=/opt/ltp/testcases/bin:/usr/bin:$PATH 62``` 63 64The RHOST variable name should be set to the hostname of the server 65(test management link) and PASSWD should be set to the root password 66of the remote server. 67 68Default values for all network variables are set in testcases/lib/test_net.sh. 69If you need to override some parameters please export them before test run or 70specify them when running ltp-pan or testscripts/network.sh. 71 72## Running the tests 73To run the test type the following: 74 75```sh 76TEST_VARS ./network.sh OPTIONS 77``` 78Where 79* TEST_VARS - non-default network parameters (see testcases/lib/test_net.sh), they 80 could be exported before test run; 81* OPTIONS - test group(s), use '-h' to see available ones. 82 83## Analyzing the results 84Generally this test must be run more than 24 hours. When you want to stop the test 85press CTRL+C to stop ./network.sh. 86 87Search failed tests in LTP logfile using grep FAIL <logfile>. For any failures, 88run the individual tests and then try to come to the conclusion. 89