1 / 37

CSCE 515 : Computer Network Programming

CSCE 515 : Computer Network Programming. Wenyuan Xu Department of Computer Science and Engineering University of South Carolina. Course Goal:. Understand the basic principles of computer networks Network basic Basic design principles in network protocols Internet protocols

niveditha
Download Presentation

CSCE 515 : Computer Network Programming

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. CSCE 515:Computer Network Programming Wenyuan Xu Department of Computer Science and Engineering University of South Carolina

  2. Course Goal: • Understand the basic principles of computer networks • Network basic • Basic design principles in network protocols • Internet protocols • Wireless network protocols • Study the programming aspects of computer networks • Socket programming • Inter-process communication •  Understand how network research is done • How to determine what is important • What are the trend CSCE515 – Computer Network Programming – 2008 Fall

  3. Administrative • Course website: • http://www.cse.sc.edu/~wyxu/515Fall08/csce515.html • Announcements • Homework Assignments • Lecture Notes • Links to required/recommended readings • How to reach me: • Email: wyxu@cse.sc.edu • Office Hours: MW 4:00pm-5:00pm or by appointment • Office: SWGN 3A54 • Prerequisites: CSCE 311 Operating Systems CSCE515 – Computer Network Programming – 2008 Fall

  4. Textbook • Required: • Unix Network Programming, The Sockets Networking API, Volumes 1, by W Richard Stevens, Bill Fenner, Andrew M. Rudoff, published by Addison-Wesley (UNP) • Optional: • TCP/IP Illustrated Volumes 1, by W. Richard Stevens, published by Addison-Wesley, 1994 (TI). • Java Network Programming, by Merlin Hughes, Michael Shoffner, Derek Hamner, Maria Winslow, Conrad Hughes, published Manning Publications • Mailing list: • CSCE515-001@lists.cse.sc.edu CSCE515 – Computer Network Programming – 2008 Fall

  5. Tentative topics • OSI and TCP/IP Network models • TCP/IP • Socket programming • The Internet and Internet protocol • Web programming • Other network programming CSCE515 – Computer Network Programming – 2008 Fall

  6. Grading • 0% Homework (1-2) • Q&A • 50% Computer Projects (4 – three in C, one in Java) • 20% Midterm • 30% Final: closed book, and comprehensive. • Grading scale: • A : 90 — 100 • B+ : 87 — 89 • B : 80 — 86 • C+ : 77 — 79 • C : 70 — 76 • D : 60 — 69 • F <= 59 CSCE515 – Computer Network Programming – 2008 Fall

  7. Homework & projects • Programming Environments • Unix workstation lab.: • 1D39 (Sun + Linux) • 1D45 (Linux) • All students should have an account on Computer Science and Engineering Department Unix workstations • All grading will be done on CSE Linux! • Submission should be via Drop Box • Make sure you understand how to submit (practice first)! • Directions for submission will be posted on the course home page with the first assignment. CSCE515 – Computer Network Programming – 2008 Fall

  8. Project grading • It is expected that everyone is a good programmer • Comment your code! • Your code should be readable, structured! • 25% of the grade depends on the quality of the code. • Is the code easy to understand? • Is it easy to make a small change of the functionality? • Can code handle unexpected input, exceptions? • Programs must come with a makefile • Java programs must come with a shell script that starts them: • Sets CLASSPATH to the right value • Remember that I will try your programs in a directory with a different name than you! CSCE515 – Computer Network Programming – 2008 Fall

  9. Project grading • 25% of the grade depends on documentation • Documentations must contain: • Your name and student number • How to use your programs • Which program does what, which parameters are needed, screenshots • A description of your program’s design • Documentations must not contain: • Your code in words • “After spending the whole weekend and today at my girlfriend’s house trying to solve the exercises for the Network Programming course which are due today, I must confess that I did not succeed in solving them all”. CSCE515 – Computer Network Programming – 2008 Fall

  10. Grading • Horner code: • All submitted work should be yours!   • NO sharing of code • Do not copy code from Internet • Discussion is encouraged CSCE515 – Computer Network Programming – 2008 Fall

  11. Email Policies • Make sure you put your course (CSCE515)  in the subject of the message. • Remember that it is not my emergency if you need help at the last minute. I may check my messages in time to help you make a deadline, but this may not necessarily be the case. • Ask specific question instead of general question. • Bad example: “I don’t know why it does not work?” • In general, I will answer quick questions sooner than one that will take a long time to answer • In general I will monitor and respond to email during office hours, but in-person students will take precedence. CSCE515 – Computer Network Programming – 2008 Fall

  12. Your Best Strategy • Come to every lecture • Read articles related to network protocols and network programming • Do not wait till last minute to prepare for exam or work on project • Enjoy the fun! CSCE515 – Computer Network Programming – 2008 Fall

  13. Lectures need your help! • Ask questions • Correct Wenyuan! *Extra credit! • Make suggestions! • Read something interesting and relevant to this course? Announce it in class! CSCE515 – Computer Network Programming – 2008 Fall

  14. Introduction

  15. What is network? • The term network can refer to any interconnected group or system. • A computer network is composed of multiple computers connected together using a telecommunication system. • “…communication system for connecting end-systems” • End-systems a.k.a. “hosts” • PCs, workstations • dedicated computers • network components • Interconnection may be any medium capable of communicating information: • Copper wire • Lasers (optical fiber) • Radio /Satellite link • Cable (coax) • Example: Ethernet. CSCE515 – Computer Network Programming – 2008 Fall

  16. Why network? • Sharing resources • Resources become available regardless of the user’s physical location (server based, peer2peer) • Load Sharing/utilization • Jobs processed on least crowed machine • Resource can be shared • High reliability • Alternative source of supply (multiple copies) • Computer as a communication tools CSCE515 – Computer Network Programming – 2008 Fall

  17. Wide variety of types of networks • Circuit switched • dedicated circuit per call • performance (guaranteed) • call setup required • telephone system • Packet switched: • data sent thru net in discrete “chunks” • user A, B packets share network resources • resources used as needed • store and forward: packets move one hop at a time • The Internet (TCP/IP) CSCE515 – Computer Network Programming – 2008 Fall

  18. local ISP regional ISP company network What is Internet? • What is internet? • Network of networks • What is the Internet? • A global internet based on IP protocol • Internet applications: • Email • File transfer • Newsgroup • File sharing • Resource distribution • World wide web • Video conference • Gaming CSCE515 – Computer Network Programming – 2008 Fall

  19. Emerging networks • Embedded networks • Every physical object is connected • Open/close your garage via network • Know which milk can is about to expire • Sensor networks • Physical space is instrumented and connected • Detect presence of people in a room and set temperature accordingly • Know exactly how many cars on Route 26 • Disposable networks • One time use network • Disaster recovery, smart dust CSCE515 – Computer Network Programming – 2008 Fall

  20. Characteristics • Lots of them (density) • Cheap unreliable elements • Run on batteries • Location becomes a key attribute • Information sensing around users CSCE515 – Computer Network Programming – 2008 Fall

  21. Some terms • LAN • WAN • MAN CSCE515 – Computer Network Programming – 2008 Fall

  22. LAN - Local Area Network • connects computers that are physically close together ( < 1 mile). • high speed • multi-access • Technologies: • Ethernet 10 Mbps, 100Mbps • Token Ring 16 Mbps • FDDI 100 Mbps CSCE515 – Computer Network Programming – 2008 Fall

  23. WAN - Wide Area Network • connects computers that are physically far apart. “long-haul network”. • typically slower than a LAN. • typically less reliable than a LAN. • point-to-point • Technologies: • telephone lines • Satellite communications CSCE515 – Computer Network Programming – 2008 Fall

  24. MAN - Metropolitan Area Network • Larger than a LAN and smaller than a WAN - example: campus-wide network - multi-access network • Technologies: • coaxial cable • microwave CSCE515 – Computer Network Programming – 2008 Fall

  25. Network Protocols

  26. TCP connection reply. Get http://gaia.cs.umass.edu/index.htm Got the time? 2:00 <file> time What’s a protocol? • a human protocol and a computer network protocol: TCP connection req. Hi Hi protocols define format, order of msgs sent and received among network entities, and actions taken on msg transmission, receipt CSCE515 – Computer Network Programming – 2008 Fall

  27. ticket (complain) baggage (claim) gates (unload) runway landing airplane routing ticket (purchase) baggage (check) gates (load) runway takeoff airplane routing airplane routing Organization of air travel Although this course is about network programming (and not about networking in general), an understanding of a complete network model is essential. CSCE515 – Computer Network Programming – 2008 Fall

  28. ticket (complain) baggage (claim) gates (unload) runway landing airplane routing ticket (purchase) baggage (check) gates (load) runway takeoff airplane routing airplane routing Organization of air travel: a different view Layers: each layer implements a service • via its own internal-layer actions • relying on services provided by layer below CSCE515 – Computer Network Programming – 2008 Fall

  29. airplane routing airplane routing airplane routing Distributed implementation of layer functionality ticket (complain) baggage (claim) gates (unload) runway landing airplane routing ticket (purchase) baggage (check) gates (load) runway takeoff airplane routing arriving airport Departing airport intermediate air traffic sites CSCE515 – Computer Network Programming – 2008 Fall

  30. Application AH AH AH AH AH AH AH Data Data Data Data Data Data Data Presentation PH PH PH PH PH PH Session SH SH SH SH SH Transport Network Data link DH DH NH NH TH TH DT DT Physical DH Protocol Stack: ISO OSI Model Data Header encapsulation and stripping TH NH TH ISO: the International Standards Organization OSI: Open Systems Interconnection Reference Model (1984) CSCE515 – Computer Network Programming – 2008 Fall

  31. Host Host Application Protocol Application Application Presentation Protocol Presentation Presentation Session Protocol Session Session Transport Protocol Transport Transport Network Network Network Data link Data link Data link Physical Physical Physical Router Communicating between End Hosts interface CSCE515 – Computer Network Programming – 2008 Fall

  32. Why layering? • Divide a task into pieces and then solve each piece independently (or nearly so). • Establishing a well defined interface between layers makes porting easier. • Functions of each layer are independent of functions of other layers • Thus each layer is like a module and can be developed independently • Each layer builds on services provided by lower layers • Thus no need to worry about details of lower layers -- transparent to this layer • Major Advantages: • Code Reuse • Eases maintenance, updating of system CSCE515 – Computer Network Programming – 2008 Fall

  33. Programs & Processes • A program is an executable file. • A process or task is an instance of a program that is being executed. • A single program can generate multiple processes. CSCE515 – Computer Network Programming – 2008 Fall

  34. Client - Server • A server is a process - not a machine ! • A server waits for a request from a client. • A client is a process that sends a request to an existing server and (usually) waits for a reply. CSCE515 – Computer Network Programming – 2008 Fall

  35. Client - Server Examples • Server returns the time-of-day. • Server returns a document. • Server prints a file for client. • Server does a disk read or write. • Server records a transaction. CSCE515 – Computer Network Programming – 2008 Fall

  36. Sample questions: • Difference? • Subnet, a network, WAN • Protocols vs. interface CSCE515 – Computer Network Programming – 2008 Fall

  37. Assignment & Next time • Reading: • How NOT to go about a programming assignment • TI Ch.1 • Next Lecture: • OSI model • Data link layer CSCE515 – Computer Network Programming – 2008 Fall

More Related