Just For Fun: Networking (revision 151123-r01)¶
Return to Lab 10
- Download Lab10.tar.bz2
$ wget --no-check-certificate https://projects.ui.ac.id/attachments/download/8326/Lab10.tar.bz2
- See the file list in Lab10.tar.bz2, extract the files, then delete Lab10.tar.bz2.
- Change [NPM] in all of the .c files with your student ID. 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 Lab10 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-Lab10.txt"
$ script -a catat-Lab10.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 22.214.171.124.
- 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 126.96.36.199, 188.8.131.52, 184.108.40.206.
- YOZA WIRATAMA will run the program ./clientserver 9002 null null
- ASAD FATCHUL ILMI will run the program ./clientserver 9002 220.127.116.11 9002
- ANANDRA A. RINALDO SOROINDA will run the program ./clientserver 9002 18.104.22.168 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 22.214.171.124 9002
- See the result of your work.
- Gather as many friends 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 (REG, INT, MTX) participating as one group, you will be given bonus score of 15 for REG, bonus score of 10 for INT and 5 points for MTX. INT and MTX can get the 15 score bonus if you join REG.
- This is the end of Just For Fun: Networking tutorial.
Return to Lab 10
Return to Wiki