Just For Fun: Networking (revision 141030-r01KI)

Return to Lab 07

  1. Download Lab07.tar.bz2
    $ wget --no-check-certificate https://projects.ui.ac.id/attachments/download/7927/Lab07.tar.bz2
  2. See the file list in Lab07.tar.bz2, extract the files, then delete Lab07.tar.bz2.
  3. Change [NPM] and [TOKEN] in all of the .c files with your student ID and token. Change also [KELAS] with your class in Makefile.
  4. Compile all the c files using the make script
    $ make
  5. Run the server program:
    $ ./server 9001
  6. 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.
  7. Record the output to "catat-Lab07.txt"
    $ script -a catat-Lab07.txt
  8. Find out your IP:
    $ /sbin/ifconfig

    Look at eth0 (sometimes becoming eth1 / ethn)-> inet addr.
  9. Run the client program:
    $ ./client [your_IP] 9001

    Change [your_IP] with the ip address that you got in the previous command, for example
  10. Type your message, end it with Enter. See what happens in the first Terminal window that run server program.
  11. Now make a group with your classmates, minimum 3 people. The more member you have, the more score you will get.
  12. 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

    1. There is a group consists of 3 students.
    2. 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,,
    3. YOZA WIRATAMA will run the program ./clientserver 9002 null null
    4. ASAD FATCHUL ILMI will run the program ./clientserver 9002 9002
    5. ANANDRA A. RINALDO SOROINDA will run the program ./clientserver 9002 9002
  13. 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
    1. YOZA WIRATAMA will run the program ./clientserver null 9002
  14. See the result of your work.
  15. 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.
  16. This is the end of Just For Fun: Networking tutorial.

Return to Lab 07
Return to Wiki