Click here to see a PREVIEW of important rules that was posted before the semester started.

This is an undergraduate level course covering the fundamental concepts of networking as embodied in the Internet. Topics covered in this are: design principles, layering, protocol design/analysis of the global Internet; networked applications; the structure/architecture of the Internet; protocols for network transport and congestion control; network layer and routing; link layer/MAC; and network security.

You will also learn to write multi-threaded programs to create a network of communicating servers using "socket programming" (which some would consider as "system programming") in C++. You will learn to make "system calls" to interact with "the system". There will be 5 programming assignments and some of them can be quite time-consuming and challenging to implement and debug. Therefore, the workload of this class can be quite high and it's important to keep up with the pace of the class and try to avoid starting a lab or programming assignment only when the deadline approaches.

Instructor Bill Cheng (click to see office hours)
E-mail: <>.  (Please do not send HTML-only e-mails. They will not be read.)
Time MW 12:00pm - 1:50pm 
Location SGM 123 
Course Producers / Graders
Shuhan Shen <>, Helpdesk Hours: Tue/Thu 7:00pm - 9:00pm on Zoom
Zeyu Yu <>, Helpdesk Hours: Tue/Wed 4:00pm - 6:00pm on Zoom
Hengquan Zhang <>, Helpdesk Hours: Mon/Thu 3:30pm - 5:30pm on Zoom
Midterm Exam (NEW) 12pm-12:40pm, Mon, 3/15/2021 (firm).
Final Exam 11am-1:00pm, Fri, 5/7/2021 (firm).
Class Resources
Description   :   textbooks, topics covered, grading policies, additional resources, etc.
Lectures   :   information about lectures (and lectures slides in PDF format).
Videos   :   information about D2L lectures and discussion sections videos.
Labs   :   information about discussion sections and labs.
Programming   :   programming assignments (please also see important information about programming assignments at the bottom of this web page.)
Forum   :   Piazza Forum for discussing course materials and assignments. You are required to be a member of this group. (This group is by invitation only.) Please do not send request to join this group until after the first lecture.

(in reversed chronological order)
  • 4/1/2021:
    • For students who have opt'ed out of the midterm exam, below are the midterm exam questions. Other than what's already discussed in class, I will not give answers to midterm exams since most of the answers are straight from the lecture slides. Please feel free to have discussions about the exams in the class Piazza with other students.

  • 3/14/2021:
    • Someone pointed out a mistake in the last buttlet on slide 34 of Lecture 13. It should be:
          (,, MX)
      I have just fixed the slide (but not the video).

  • 3/11/2021: Midterm rehearsal is today at 1pm (i.e., start time is 13:00:00) USC time. Here is the instructions for the midterm rehearsal (this will also be the instructions for your midterm exam). If anything is not clear, please feel free to ask me.

    For this web page, we will use the notation that the midterm rehearsal starts at X:00:00 and ends at X:40:00 (for the midterm rehearsal, X = 13). As usual for this class, the left side of a time interval is "closed" (i.e., including the left timestamp) and the right side of a time interval is "open" (i.e., upto but not including the right timestamp). If your exam time is different, please make adjustments accordingly.

    • Make sure you have setup an e-mail filter to never miss an e-mail from <> (and never have it go into your spam folder).

    • To get ready, please do the following 5 minutes BEFORE X:00:00.

    • Watch your inbox. You will get an e-mail from me right before X:00:00 and you can start working on the exam as soon you get my e-mail. There will be 2 links in the e-mail. The first link is for downloading a ZIP file which contains the exam questions (PDF file) and an answers text file. Click on it to download the ZIP file and then open it. (With some browsers, you will have to copy and link and paste it into a new browser tab to download.) Save a copy of the answers text file on your desktop for easy access (don't make a copy of it, just work on this copy). The second link is for submitting your answers text file when you are done. You should click on it immediately to open a new tab in your browser and look at the submission web page. Right above the submission web form, you should see the current time on the submission server. If that time does not correspond to your desktop clock app, you need to figure out how to fix your desktop clock app to sync your desktop clock with a recommended clock server for your computer.

    • If by X:00:00, you have not received my e-mail, please send me an e-mail to as soon as possible. (But please keep in mind that e-mail can take a very very long time to get delivered.)

    • Go to your desktop and click open the answers text file and work on your exam and save your modified answers text file regularly. Feel free to make submissions if you are done early. It's not a good idea to work on a copy of the answers text file because you may end up submitting the wrong answers text file and there's nothing I can do about it!

    • When your alarm goes off at X:39:00, you need to wrap things up and get ready to submit your exam answers text file.

    • At X:40:00, you must stop working on your answers. Save your answers text file and go to the submission web page. (Of course, if you have already made a successful submission and have saved a copy of the ticket you got and you haven't changed your answers, you are done and you can stop right here.)

    • Reload/refresh the submission web page and make sure that you are seeing the current time on the submission server right above the submission web form. If reloading the web page failed, you must follow the instructions to use Panopto to record your desktop and your exam answers and take photos of your answers and e-mail photos of your exam answers to me.

    • If reloading the web page was successful, you must fill out the submission web form and click on the Choose File button and select the answers text file that you have just filled out saved. Click on the Upload button. If you get any popup messages, please read them carefully and follow the suggestions there. If the submission server is busy, you should not be surprised because many students are making submissions simultaneously. So, all you have to do is to keep submitting your answers text file repeatedly until you can make a successful submission (i.e., you are presented with a submission ticket and the ticket looks right). You should save a copy of that ticket by saving the web page you see as a PDF file. It's your responsibility that you have submitted the correct answers text file.

      If you cannot reach the submission server after many tries, but still have Internet connectivity, it is possible (although unlikely) that the server is down or unresponsive. In this case, you should go to the e-mail mentioned above and click Reply, attach your answers text file, check to make sure that the e-mail recipient is either <> or <> and click Send to send a backup copy of your answers text file, just in case the submission sever is actually down. It's best if you also follow the instructions to use Panopto to record your desktop and your exam answers and take photos of your answers and e-mail photos of your exam answers to me. (Of course, for the rehearsal, you probably shouldn't click Send, or you can change the recipient e-mail address to yourself and then click Send.) Then go back and continue to make a submission using the web form and maybe you will be able to connection to the submission server this time around.

    Since this is a rehearsal, I would strongly recommand and everyone try out the procedure to use the Panopto Recorder to record your desktop and your exam answers and take photos of your exam answers (and you can e-mail the photos to yourself as a test) and try it for a few times until you feel comfortable with the procedure just in case you may lose your Internet connection when you are submitting the exam answers during the real exam.

    Please understand that if you submit late (i.e., any time at or after X:43:00), I have to follow the rules I mentioned in class and deduct 5% for every late minute. I cannot make an exception. If you are not familiar with all the rules, please watch the recorded live Lecture 14 video.

  • 3/9/2021:
    • Please download, fill out, sign, and submit Midterm Exam Academic Integrity Honor Code Pledge when you get a chance. Please understand that if I don't get a signed pledge from you, I will not send you a midterm exam next Monday. It's best if you can submit this as early as possible using the submission web form there.

  • 3/6/2021: The midterm exam will be a 40-minutes long take-home, open book, open notes exam. No matter how late you start your exam, your exam must end at the same time as everyone else. So, please make sure that you are ready and available during the scheduled exam time indicated at the top of this web page.

    The midterm exam will cover everything from the beginning of the semester to the last slide of Lecture 14 on 3/8/2021 and Ch 1 & Ch 2 of the Kurose & Ross textbook.

    Regarding what types of questions will be on the midterm, please see the Exams section of the course description web page and the midterm information slides (PDF), which I will go over during live lecture on 3/8/2021. Regarding regrade policy, please see the Regrade section of the course description web page.

    Here is a quick summary of the midterm exam topics (not all topics covered may be listed):

    • Ch 1 - Computer Networks and the Internet
      • (1.1) what is the Internet
      • (1.2) the network edge
      • (1.3) the network core
      • (1.4) delay, loss, and throughput in packet-switched networks
      • (1.5) protocol layers and their service models
      • (1.6) network under attack
      • (1.7) history of computer networking and the Internet (excluded from the exam)
    • Ch 2 - Application Layer
      • (2.1) principles of network applications
      • (2.2) the web and HTTP
      • (2.3) electronic mail in the Internet
      • (2.4) DNS - the Internet's directory service
      • (2.5) peer-to-peer applications
      • (2.6) video streaming and conent distribution networks
      • (2.7) socket programming: creating network applications
    • Labs and programming assignments
      • sockets programming
      • multithreading parts 1, 2, & 3
      • PA1, PA2, and Labs 1 through 7
        • specs
        • FAQs
        • various discussions about these assignments

  • 2/4/2021:
    • I have a plumber coming to my house this afternoon and I may not be available. I think it's best that I move my office hour to tomorrow (Friday) at 2pm. If you need to talk to me today, please make an appointment for some time tonight. Sorry about the inconvenience.

  • 1/12/2021:
    • Watch this area for important announcements.

    • Due to security concerns, we cannot post Zoom meeting IDs in public area of the class website. You should watch the first lecture video to get some of the Zoom meeting IDs. The rest of the Zoom meeting IDs will be sent to you either via e-mail or will be posted in the password-protected area of the class website.

    • To get user ID and password for accessing protected area of this web site, please visit the request access page after semester starts and submit the requested information. (You do not have to be registered for the course to get the password. You just need to have an USC e-mail address.)

    • Please do not send request to join the class Piazza Forum until after the first lecture.

The prerequisite for this course is CSCI 201 (Principles of Software Development). Please see the CS Course Catalog for information about CSCI 201.

According to the CS Course Catalog, the prerequisite for CSCI 201 is CSCI 104L, and the prerequisite for CSCI 104L is CSCI 103L. Therefore, you will be expected to have had at least two semesters of experience programming in C++ from these courses.

In addition, a corequisite of CSCI 104L is CSCI 170, and graphs and basic graph algorithms are covered in CSCI 170. Therefore, you will be expected to be familiar with graph representations (e.g., nodes and edges for abstract representation, adjacency list data structure, etc.) and basic graph algorithms such as breadth-first-search (BFS).

This is not an introductory class. We will assume that you know how to program because you are supposed to have satisfied all the prerequisites of this course. If you somehow were able to satisfy all the prerequisites of this course without being reasonably proficient in software development, it's not our job to teach you how to program. If you are not reasonably proficient in programming, may be you should consider taking this course at a later time when you are better at it. Or, you should get ready to spend a lot of time doing the labs and the programming assignments and start doing all your assignments as early as possible and seek help from the instructors and the course producers whenever you are stuck.

All programming assignments (include labs) are to be done in standard C++ (i.e., c++11, c++14, etc.). No other programming languages will be accepted. (Sorry, no Java, no Python, and no C++ with Microsoft, Mac, or Google extensions.) Since the standard C++ does not support networking, all networking related programming assignments are required to be done by making system calls (with a C interface) and without using any C++ networking libraries. C is a proper subset of standard C++. If you know standard C++, you already know C. Standard C++ is designed to work with system calls and we will learn about networking system calls in this class.

Your program must compile and run with a Makefile on a standard 32-bit Ubuntu 16.04 machine running inside VirtualBox. Grading for programming assignments can ONLY be done on a standard 32-bit Ubuntu 16.04 machine running inside VirtualBox. Even if you can demonstrate that your code runs perfectly on some other system, it cannot be considered for grading and you won't get any partial credit for it. Please install a 32-bit Ubuntu 16.04 into VirtualBox on your laptop/desktop as soon as possible and start using it with the very first programming assignment.

If the only computer you have access to is the new Mac running on a non-Intel/AMD CPU, then it may not be possible to install VirtualBox into your machine. If that's the case, you must do all your labs and programming assignments on the system specified here.

If you are not familiar with Linux/Unix, please read Unix for the Beginning Mage, a tutorial written by Joe Topjian. (Unfortunately, looks like this book has just disappeared from the web.) You can also visit UNIX Tutorial for Beginners or Learn tcsh in Y Minutes. If you already know how to use Unix/Linux before and just need a refresher, please review my summary of some commonly used Unix commands and my tcsh scripting tutorial. It's a good idea to be familiar with the terminal-based Unix/Linux development environment (vi/pico/emacs, gcc/g++, make, etc.).

If a student registered late for this class or could not be present at the beginning of the semester, the student is still required to turn all the assignments on time or the student will receive a score of 0 for these assignments. No exceptions!