Just For Fun: Networking (revision 141030-r01KI)¶
Return to Lab 07
- Download Lab07.tar.bz2
$ wget --no-check-certificate https://projects.ui.ac.id/attachments/download/7927/Lab07.tar.bz2
- See the file list in Lab07.tar.bz2, extract the files, then delete Lab07.tar.bz2.
- Change [NPM] and [TOKEN] in all of the .c files with your student ID and token. Change also [KELAS] with your class in Makefile.
- Compile all the c files using the make script
- Run the server program:
$ ./server 9001
- Open new Terminal window and get into Lab07 directory. So now you've opened two Terminal window, one still running the server program above. Do the following using the second Terminal window.
- Record the output to "catat-Lab07.txt"
$ script -a catat-Lab07.txt
- Find out your IP:
Look at eth0 (sometimes becoming eth1 / ethn)-> inet addr.
- Run the client program:
$ ./client [your_IP] 9001
Change [your_IP] with the ip address that you got in the previous command, for example 184.108.40.206.
- Type your message, end it with Enter. See what happens in the first Terminal window that run server program.
- Now make a group with your classmates, minimum 3 people. The more member you have, the more score you will get.
- Do the message sending with your friends:
student 1: ./clientserver 9002 null null
student 2: ./clientserver 9002 [IP_student_1] 9002
student 3: ./clientserver 9002 [IP_student_2] 9002
student N: ./clientserver 9002 [IP_student_N-1] 9002
- There is a group consists of 3 students.
- Student 1 is class REG140 0706166503 YOZA WIRATAMA, student 2 is 0806316303 ASAD FATCHUL ILMI, student 3 is 0906510035 ANANDRA A. RINALDO SOROINDA. Based on where they sit, the students have IP 220.127.116.11, 18.104.22.168, 22.214.171.124.
- YOZA WIRATAMA will run the program ./clientserver 9002 null null
- ASAD FATCHUL ILMI will run the program ./clientserver 9002 126.96.36.199 9002
- ANANDRA A. RINALDO SOROINDA will run the program ./clientserver 9002 188.8.131.52 9002
- After all the students run the program like above, the first student moves to the second Terminal window in his/her Tiny Core, and executes the following:
student 1: ./clientserver null [IP_student_N] 9002
- YOZA WIRATAMA will run the program ./clientserver null 184.108.40.206 9002
- See the result of your work.
- Gather as much friend as you can so that your group chain becomes longer. Please remember that the best grade is given to the group that has the longest chain, and if the whole students of each class (REG142, EXT142 atau INT142) participating as one group, you will be given bonus score of 15 for REG142 and EXT142, bonus score of 5 for INT142. INT142 can get the 15 score bonus if they join either REG142 or EXT142.
- This is the end of Just For Fun: Networking tutorial.
Return to Lab 07
Return to Wiki