1 / 13

NTU CSIE Computer Networks 2009 Spring

Project 1 HTTP Client/Server. NTU CSIE Computer Networks 2009 Spring. Project Goal. In this Project 1, students are asked to get familiar with packet sniffing tool (Wireshark) and socket programming by implementing a simple HTTP client/server. Wireshark.

tstephenson
Download Presentation

NTU CSIE Computer Networks 2009 Spring

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Project 1 HTTP Client/Server NTU CSIE Computer Networks 2009 Spring

  2. Project Goal • In this Project 1, students are asked to get familiar with packet sniffing tool (Wireshark) and socket programming by implementing a simple HTTP client/server.

  3. Wireshark • “Wireshark is a free packet sniffer computer application. It is used for network troubleshooting, analysis, software and communications protocol development, and education.”-- Wikipedia http://en.wikipedia.org/wiki/Wireshark • Wireshark

  4. Goal 1: Monitor Your Internet Traffic • Use Wireshark to capture packets when you are using Internet • 5 minutes is enough • Try to describe those packets • Where does a packet come from? • Using a pie chart to show what % of packets using a specific protocol (TODO: 放圖) • Etc. • Pick at least one HTTP traffic and analyze it • What does each packet do?

  5. Goal 2: Build an HTTP server and client • HTTP server • Waits for requests on specific port • Sends back web pages • HTTP client • Read an URL, send requests to the server • Save the retrieved web pages to disk

  6. File system a.html b.html Project Scenario Other HTTP Server Your HTTP Server Saved pages FireFox / IE YourHTTP Client

  7. Requirements • Write your programs on R217 workstations • The page saved by client should be the same as the one on server • Normal web browsers should work with your server (at least FireFox and IE) • Your client should work with other websites (e.g. http://www.csie.ntu.edu.tw ) • Every request URL would have following form: • http://some.server.name:port/file.name

  8. Intro. to Socket Programming • Socket programming

  9. Tips • Use Wireshark to see how web browsers communicate with web servers • Also use it to debug when things go wrong • You cannot do packet sniffing on R217 workstations • Run on Cygwin

  10. Score • Basic function – 60% • Makefile and command – 10% • make clean  // clean obj(*.o) and executable • make        // compile source code • ./http_client URL file_to_save // Run client • ./http_server port_no // Run server • Report (.pdf) – 30% • Wireshark monitoring results, and • Report of your HTTP client/server

  11. File format • Max. 2 people in one group • Please tell TA your group members by mail:artoo@csie.ntu.edu.tw • Tar your file • tar zcvf bXXXXXXXX_bOOOOOOOO_prj1.tar.gz Makefile report.pdf file1 file2 … • Use “bXXXXXXXX_prj1.tar.gz” if you do not team with others • DO NOT have any directory in .tar file; all files should be extract to current directory when using “tar zxvf bXXXXXXXX_prj1.tar.gz” • Send your file tohttp://www.csie.ntu.edu.tw/~artoo/CN2009/hws.htm

  12. Deadline • 2009/4/7 24:00 • There WOULD BE penalty for late submission. The penalty for the first day is 10 points, the second day is 20 points, etc. Please turn in your code in time.

  13. References • Http Protocol (RFC) • http://www.faqs.org/rfcs/rfc2616.html • Makefile • http://www.csie.cyut.edu.tw/~dywang/linuxProgram/node41.html

More Related