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". You will be implementing several programming assignments and some of them can be quite time-consuming and challenging to implement and debug.

Please note that this is a Computer Science class and not a "tech class", i.e., it is not about the latest products and standards. The course material and assignments are meant to give students background in understanding designs, algorithms, and techniques used in the current Internet products and standards.

Required:
  • J. Kurose and K. Ross, Computer Networking: A Top-Down Approach, 7th Edition, Pearson, 2016. (Please note that there are major differences between this book and the 6th Edition version of this book, starting with Ch 4. We will stick to the 7th Edition of this book.) This book comes with a companion web site. You can gain access using the access code in the inside cover of your copy of the textbook. (I think each access code is unique and you cannot share your access code.)

Recommended resources: (You can also use any equivalent resource you can find on the Internet. We will not refer to these book at all.)

  • Scott Chacon, Pro Git (a free online book). You may want to use git when you do your programming assignments.

  • Joe Topjian, Unix for the Beginning Mage. (If you are not familiar with Unix/Linux, please read this tutorial as soon as possible.)
The following schedule and topics are tentative and are subject to change without notice. The chapter numbers refers to the chapters in the required textbook.
  • Wk 1-2: Computer Networks and the Internet (Ch 1)
  • Wk 3-5: Application Layer (Ch 2)
  • Wk 6-8: Transport Layer (Ch 3)
  • Wk 9-11: The Network Layer: Data Plane (Ch 4)
  • Wk 11-12: The Network Layer: Control Plane (Ch 5)
  • Wk 13-14: The Link Layer and LANs (Ch 6)
  • Wk 14: Wireless and Mobile Networks (Ch 7)
  • Wk 15: Security in Computer Networks (Ch 8)
At the end of very book chapters, there are exercises. Students should treat them as additional resources. These exercises will not be collected or graded, although students are encouraged to work on them if there is time.

You will be expected to complete a sequence of programming assignments to gain experience in developing networking applications.

All programming assignments must be done in C or C++. No other programming language will be accepted. There will be one warmup programming assignment at the beginning of the semester to make sure that you are up to speed with C/C++.

For more information, please see the programming assignments web page.

A midterm and a final examination will be given. The date of the midterm examination will be posted near the top of the class home page. The date of the final examination is firm and it is also listed near the top of the class home page. Any scheduling conflicts regarding the midterm exam date must be resolved with the instructor at least one week before the exam date.

Exam Locations

Unless otherwise specified, all exams will take place in the lecture class room of your respective section. If an exam is to take place in a room different from the lecture class room, information will be explicited provided in the corresponding item in the General Information section of the class web page.

Exam Questions

I often get questions such as (1) can I get a copy of an old exam and (2) what types of questions should I expect? The answer to question (1) is "no". I'm sorry, but I do not give out old exams. That's just my policy. The answer to question (2) is the following.

There are three types of exam questions that I usually ask. The first type is a calculation-type question. Pretty much anything that can be calculated using equations or computed by running algorithms can be asked in an exam. For example, I can ask you to compute a shortest-path tree using one of the algorithms in PA1. I can also ask you to calculate probability of queueing for an out-going link of a router give some networking parameters. (Calculators will not be permitted during exams, but you can leave your answers as fractions for non-integer answers.) For this type of questions, if your calcualtion is incorrect, you get partial credit up to the point of your first mistake. You may get additional partial credt after that point, although there is no guarantee and may be unlikely.

The second type is multiple-choice questions. Unless explicitly stated, each multiple-choice question has only one correct answer and you need to select the correct answer (or if you don't think any of the answers are correct, you should select the best answer). If a multiple-choice question explicitly asked you to select two answers, it means that the question has two correct answers and you need to select two correct answers (or if you don't think that there are two correct answers, you should select the best two answers). Please note that an incorrect statement can never be a correct answer (unless the question asks you to select statements that are incorrect).

The scoring of multiple-choice questions is as follows.

Multiple-choice questions are worth 1 point each and you are given 5 selections for each such question. If the question has only one correct answer, the rule for grading is as follows.
  • If you select only one answer, if the answer is the same as the one in the solution key, you get 1 point; otherwise, you get 0 point.
  • If you select two answers, if one of the answer is the same as the one in the solution key, you get 0.5 point; otherwise, you get 0 point.
  • If you select more than two answers, you get 0 point.
If the question has two correct answers, the rule for grading is as follows.
  • If you select only one answer and if the answer is one of the correct answers, you get 0.5 point; otherwise, you get 0 point.
  • If you select two answers, if both of the answers are in the solution key, you get 1 point; if only one of them is in the solution key, you get 0.5 point; otherwise, you get 0 point.
  • If you select three answers, if two of the answers are in the solution key, you get 0.5 point; otherwise, you get 0 point.
  • If you select more than three answers, you get 0 point.

The third type is to ask you to give the best answer for a given question. If a question says, "In N words or less...", it's giving you a hint that the answer should be N words or less. You don't have to answer in N words or less. There is one exception though. If the question is of the fill-in-the-blanks type where N is small, then you must not use more than N words.

For this type of question, you get credit for including the "best answer". You may get deductions for including "bad answers". What you need to demonstrate is that you can distinguish between answers of different quality and write down the best answer. (For these questions, there is no need to write complete English sentences when you answer exam questions. Just give me the important stuff!)

Let me give a couple of silly examples (with questions that's not in the scope of any exam).

  • "For programming assignments (well, this is not our policy, I'm just using this as an example), when is 'plagiarism' considered taking place? If your answer is "when you take someone else's work and claim it to be yours", then you will get full credit. If your answer is, "when you submit someone else's work", you probably will not get full credit (since you are allowed to use code given to you in another class that you have taken if you cite it properly).

  • "What is the fairness policy of this class?" If your answer is, "whatever the instructor offer to one student, he must offer it to the rest of the class," then you will get full credit. If your answer is, "the instructor must be fair to every student," you probably will not get much partial credit because your answer is not well-defined.

Old Exams

Below is the midterm exam from Fall 2021: Below is the final exam from Fall 2021:

Exam Grading

In order to be fair to the entire class, we can only grade based on what you put down on the exam paper. We must not take into consideration what's in your mind when you wrote your answers. We have to assume that you wrote what you meant and meant what you wrote.

In general, better answers may score more points. If you give very high level and generic answer that's generally true or basically just repeat the question, you probably will get very little partial credit for it! You need to answer a specific question with a specific answer. On the other hand, if the question called for a general answer and the answer you gave only applies to some specific examples, you probably will get very little partial credit for your answer. You must not give examples to answer general questions.

If I asked a question straight from lecture slides (or textbook), the best/correct answer is the one on the lecture slides (or textbook). If you disagree with what's on the slides (or textbook), you must complain when you are studying for the exam, i.e., before the exam. Once the exam starts, it's too late to complain that you don't like the answer on the lecture slides. In an exam, if you give an answer that's different from the lecture slides, you may receive partial credits, at the discretion the instructor. Finally, I reserve the right to ask about things that I think you should know but not on lecture slides or textbook.

Finally, multiple questions are tricky! I can take a correct statement and add some words to it and/or delete some words from it and it's still a correct statement. I can also add some words to it and/or delete some words from it and make it into an incorrect statement. In order to pick the correct answer, you need to combine critical thinking with the knowledge you gained from this class. Often times, students failed to pick the correct answer because they were not thinking critically enough or they based their choice on incorrect things they have read on the Internet and not from the course material. If you think critically enough about an incorrect answer, you should be able to form an argument that clearly shows that that particular answer is incorrect.

The grading breakdown is as follows:
Labs:   10%  
Programming Assignments:   35%  
Midterm Exam:   27%  
Final Exam:   28%  
The above percentages will be used to calculate a numeric score.

Two methods will be used to calculate your final letter grade:

(1)    Use a modified curve (i.e., we won't necessarily assign an equal number of failing grades as passing grades) based on the numeric score calculated above
 
(2)    Use the following fixed scale (to encourage cooperation and friendly association amongst students):
Percentage Letter Grade
94% or higher A
88-94% A-
82-88% B+
76-82% B
70-76% B-
64-70% C+
58-64% C
52-58% C-
46-52% D+
40-46% D
34-40% D-
below 34% F
Your class letter grade will be the higher grade based on (1) or (2).

Please also note the following:

  • No other methods will be considered. (So, please do not ask the instructor to take how much you have improved since the beginning of the semester into account. You are expected to try your best from the beginning!)

  • According to the above guidelines, it should be clear that it is possible to get a grade of D or below for individuals who perform very poorly (i.e., you should not assume a C- or even D+ if you perform very poorly, according to the guidelines above.) However, we hope that everyone will perform well.

  • We will not assign incompletes unless you miss the final exam for documented illness or documented family emergency (in accordance with USC policy).
All programming assignments must be turned in on time. Late submissions will receive severe penalties. Due to clock skews, electronic submissions of programming assignments will be accepted within 15 minutes after the specified deadlines without penalties (i.e., has a 15 minutes grace period). Starting at midnight of the submission deadline, you will lose 1% every 5 minutes. When the penalty reaches 0%, it flattens out and won't go negative. For example, if your submission has a timestamp that is 32 minutes after midnight, 7% will be deducted from your assignment after grading; if your submission has a timestamp that is 8 hours, 20 minutes, and one second after the grace period, you will receive a score of zero (and your assignment will not be graded). The figure below summarize the deductions for programming assignments.

For a lab assignment, if you are late, you lose 10% for each of the first 3 days. Afterwards, starting at the beginning of day 4 at midnight, you will lose 1% every 5 minutes (and it would take 350 minutes to lose the remaining 70%).

If you are unable to complete a assignment due to illness or family emergency, please send e-mail to the instructor as soon as possible to get an extension. A documented official proof of illness or family emergency is required in order to get an extension (doctor's note is required as proof of illness). In general, when you get sick, it's best to see a doctor and get a note just in case you may need it later (although during the pandemic, the rules are more relaxed because doctors don't want you to go see them just to get a note).

You also get 5 late days that can be applied to programming assignments or labs and you get to decide how you want to distribute these 5 late days. You can apply them all on one programming assignment or one lab, or spread it any way you'd like among all the programming assignments and labs (a whole day at a time). Although for PA5, you can use at most one late day. If you want to apply late days to a particular programming assignment or lab, you must inform the instructor (not the TA or the grader) soon after you have made your final submission.

By the way, even if you have an approved extension, all your work must be submitted before any final exam starts (which is on the Wednesday of the final exam week). If you have a prolonged illness and cannot finish your assignment before that, your only option is to take a grade of INCOMPLETE and complete your missing assignments within a year. But please understand that, in this case, you are only eligible for a grade of INCOMPLETE if you cannot take the final exam due to documented illness or family emergency. Once you have taken the final exam, the option of getting an INCOMPLETE is no longer possible.

It is the policy of USC Student Health that they will not issue a "note from a doctor". If you are sick, in order for it to be considered a documented illness, all I need is something that shows that you have visited a medical facility. I would assume that if you were at a medical facility, you must have been sick. For Student Health, you can get a Medical Absence form from them and you can fill it out, date it and sign it and send a digital copy of it to me and that would satisfy the requirement.

So, anything from Student Health (or doctor's office) with your name on it and the date of your visit would satisfy the requirement. It doesn't have to say why you were at the doctor's office! It just has to say which day you were at the doctor's office. Please do not ask Student Health to give you a "doctor's note" because they won't do it.

If you have questions or concerns, please send an e-mail to the instructor.

IMPORTANT: Due to COVID, USC Student Health is swamped and they do NOT want you to visit them just to get a "note from a doctor"! You should go to Student Health only if you are "sick enough" that you need to see a doctor. Therefore, "a note from the doctor" as proof for documented illness is not required for this semester. If you just have a cold/flu symptom, please checkout the Student Health web site and follow their recommendations. If your symptoms are severe enough and you cannot work on your assignment, please contact the instructor regarding getting an extension.

Assignment Regrades

All requests to change grading of labs or programming assginments must be submitted in writing within one week of the time the initial grade was announced to you. Requests must be specific and explain why you feel your answer deserves additional credit. A request to re-grade an assignment can result in the entire assignment being re-evaluated and as a result the score of any part of the assignment be increased or lowered as appropriate.

If you have made multiple submissions and after you have received your grade and you noticed that what we graded wasn't the submission you wanted us to grade, you may ask us to to grade a different submission. In this case, we will deduct 20 points. By default, we will grade the last submission. What you should do is to go through the verification procedure and make sure that we are grading the submission you want us to grade. If you discover that the submission we are grading is not the one you want us to grade and if you tell us soon after grading starts, there would be no penalty.

Exam Regrades

I have to use one standard when grading all the exams. Therefore, regrade for exams is not about arguing for points but about whether I have made a mistake in grading or not. If you think that I have made a mistake, you should write down (on the cover page of the exam) which problem/subproblem needs to be regraded and why you think that I have made a mistake. Plese limit the description of your rationale to be only one sentence long (e.g., "my answer is also correct", "I deserve more partial credit", etc.) followed by a brief justification. There is no need to discuss your answer or your rationale in length since I am required to grade entirely based on what you wrote on the exam paper (and thus must ignore everything you said during a regrade session).

Please be familiar with the grading rules for multiple choice questions. I must stick to those rules when giving points for multiple choice questions.

In case there are a lot of regrade requests, I will only send you a private e-mail informing you that I have updated my grading records if there is a grade change. If your grade stays the same, I will not send you an e-mail. Therefore, if you don't get such an e-mail from me, it means that your grade did not change.

To be fair to all, we must assume that you wrote what you meant and meant what you wrote. Every student gets a maximum of one regrade appointment. So, please use your time wisely during a regrade session and not spending much time telling me what you were thinking when you were writing down your answers since the I must grade based on what you wrote and not what you were thinking..

My office hours are held four hours each week. Please feel free to come to chat with me to clarify lecture material and get hints about programming assignments. You do not need an appointment to see me during office hours.

Regarding lecture materials, please understand the purpose of office hours is to clarify lecture materials. I will not repeat lecture materials during office hours. If you miss a lecture, it's your responsibility to figure out how to make up for the missing lecture materials.

If you need to see me outside of office hours, it's best that you make an appointment (and reserve a timeslot) so I can make sure to be in my office when you visit. Making an appointment is not a big deal! Just send an e-mail to me and tell me when you are available to meet and go from there.

To encourage you to do your programming assignments early, you will get extra credit if you turn in programming assignment more than 2 days before the original submission deadline.
  • If your submission is more than 72 hours before the posted deadline, you get an extra 10%, i.e., your actual score will be 1.1 times your graded assignment score.
  • If your submission is between 48 and 72 hours before the posted deadline, you get an extra 5%, i.e., your actual score will be 1.05 times your graded assignment score.
The figure below summarize the early submission extra credit schemes.
Please note that due to my fairness policy, I cannot offer any individual extra credit work.

Unless otherwise specified, programming assignments and exams must be that of the individual student (for group programming assignments, the work must be completely that of the group members). It is often productive to study with other students. However, if any portions of the programming assignments are found to be shared between two (or more) students, zero credit will be given to all students concerned and all students will be disciplined. This policy is in the interest of those students who do their own work, which hopefully applies to all of you in this class.

This policy also holds for programming assignments. In this class, we will use sophisticated automated program checkers to detect cheating. Be aware that the program checkers have demonstrated very good results and are widely used within the academic community. Any student caught cheating will be given zero credit and will be disciplined.

It is the students responsibility to submit their assignments electronically in time.

For students who satisfied the prerequisite at other universities or through work experience, this course assumes that you understand data structures, basic algorithms, and UNIX programming. You should be able to write large programs in C. No special assistance or consideration will be offered if your background is inadequate.

During the semester you are responsible for completing the assigned lecture videos, programming assignments, and exams.

You must keep up with the assigned lecture videos. Please watch the lecture videos before the corresponding live class. This course is designed so that the lecture videos prepares you for doing the labs and the programming assignments. If you fall behind in viewing the lectue videos, you will have a difficult time doing the assignments.

  • Some lecture videos have textbook section numbers associated with them.  You can read the corresponding sections of the textbook if you'd like.
  • Some lecture videos talks about labs and programming assignments.  You should read the corresponding labs and programming assignment specs.
  • Some lecture videos (such as Lecture 4 videos) give you background for labs and programming assignments. There are no assigned readings for these (other than the corresponding lecture slides). Please watch the videos and if you have question, please ask me during live lectures, come to office hours, send me e-mail, or post your question in Piazza. There is too much stuff on the Internet about socket programming and multithreading and I cannot find something that's just right for our class. My recommendation is to focus on the materials covered by these lectures so not to get confused or distracted by all the stuff on the Internet!
If you happen to miss a live lecture, you are still responsible for viewing the administrative information that's given at the beginning of a live lecture. Since live lectures are recorded, you need to make sure you catch up with what you have missed.

Exams will take place during the assigned times. You are expected be available during class time on the date of the midterm exam and during the assigned time for the final exam.

The instructor must treat all students equally and cannot give special treatment to any particular student. Therefore, please do not ask special favors from the instructor because of your circumstances. This may seem unfair to you because you believe that your circumstances are special (understandably, everone does). Other than the exceptions setup at the beginning of the semester (whatever they may be), the rule the instructor must follow is that whatever he offers you, he must offer to the entire class.

Students who are registered with the Disability Services and Programs (DSP) must inform the instructor regarding the type of accommodations that have been approved by the university. Please send a copy of your Letter of Accommodation from DSP to the instructor by the end of the 3rd week of classes so that the instructor can make sure that the required accommodations will be satisfied.

Auditing "unofficially" is not permitted for this class.

E-mail is a serious communication tool. For this class, you should setup your e-mail server so that you do not drop any e-mail from me.

Pretty much all class related announcements will be sent through the class Piazza Forum. Therefore, you are required to be a member of this Piazza Forum. As messages are posted to the class Piazza Forum, you will receive e-mail notifications and you should read all these class-related e-mails. Please see instructions on how to get on this group (you should do this as soon as possible).

You are strongly encouraged to send private e-mail messages to me if you have questions about programming assignments or lectures. If the answer is appropriate for the entire class, I would normally anonymize the reply and send the reply through the class Piazza Forum and bcc a copy to you. So, please don't be shy about asking questions!

One type of question I often get is the following:

I am thinking about not following the spec or grading guidelines and would like to do this instead. Is it acceptable (or is this okay)?
What you are really asking is whether you will receive full credit or not. Please just stick to the spec and the grading guidelines. (Of course, if there is a conflict between the spec and the grading guidelines, you should let me know and ask me to fix one of them.)

Please make sure you read the Academic Integrity Policy of this course.

The diversity of the participants in this course is a valuable source of ideas, problem solving strategies, and engineering creativity. I encourage and support the efforts of all of our students to contribute freely and enthusiastically. We are members of an academic community where it is our shared responsibility to cultivate a climate where all students and individuals are valued and where both they and their ideas are treated with respect, regardless of their differences, visible or invisible.

A link to the USC Spring 2022 academic calendar is provided here for your convenience.
A link to the USC Spring 2022 CS schedule of classes is provided here for your convenience.

(These resources below are provided for your information. Please note that the instructor has not read most of them. Please use these resources at your own risk!)

Programming:

C++ 11:

Unix/Linux (although they are not the same things, they are quite similar):