80 likes | 184 Views
Midterm Exam Review. Time: Oct. 11 (Thursday, in class, close book) Knowledge questions True or false statement (explain why) Protocols Calculations. Knowledge Question Examples. Difference between TCP and UDP? Why UDP is better than TCP in some applications?
E N D
Midterm Exam Review • Time: • Oct. 11 (Thursday, in class, close book) • Knowledge questions • True or false statement (explain why) • Protocols • Calculations
Knowledge Question Examples • Difference between TCP and UDP? • Why UDP is better than TCP in some applications? • How many layers in computer networking? • What’s usage of TTL field in DNS record? IP packet? • Why asymmetric speed in DSL and Cable Modem? • What service port used by DNS, HTTP, SMTP, SSH, POP3,etc? • Why use window in TCP packet transmission? • What service provided by DNS? • TCP or UDP used in which applications (HTTP, SMTP, DNS, VOIP, etc)?
Knowledge Question Examples • What is HTTP cookie used for? • TCP socket programming: • the basic socket APIs and their orders • (Page 13, Chapter2-part3.ppt) • TCP/UDP header fields, header size (Page 3, Chapter3-part3.ppt) • User email agent uses the same protocol for sending/receiving email? • Why email with an attachment sent out is much bigger than the attachment? • What is a torrent file? A tracker in BitTorrent? • Ethernet switch checks what layer’s header? Router? Firewall? • What is SYN flooding attack? Why it is hard to defend?
Protocol Problem Examples • Show what sender/receiver reacts when a specific incident (bit-error, lose, timeout) happens • Use graph to show reactions for TCP’s SR or GBN • Example (P.16, 20 in Chapter3-part2.ppt) • Show for rdt3.0 (no test on rdt1.x to rdt2.x) • Example (P. 7,8 in Chapter3-part2.ppt) • TCP syn/ack number changes in a connection • Example (P. 5, Chapter3-part3.ppt) • Draw packet transmission time-line scenario • Example (P. 14, 15, Chapter3-part3.ppt) • TCP three-way connection setup procedure • SYN, SYN/ACK, ACK and changes of seq/ack number • Example (P.25, chapter3-part3.ppt)
Protocol Problem Examples • Why TCP delays its ACK “Wait up to 500ms for next segment. If no next segment, send ACK”? • DNS RR entries setup for an Email/Web server in a company (HW1, problem 6) • TCP AIMD (HW2, problem 6) • Email SMTP command and manual send spam • HTTP protocol (HW1, problem 4) • TCP congestion window low-pass filter (Quiz 1)
Calculation Problem Examples • Proxy impact (access time) • HW1, problem 7 • M/M/1 queue (formula given to you) • Example, P. 9, MM1-queue.ppt • UDP checksum calculation • Packet switching advantage • HW1, problem 1 • TCP window usage • HW2, problem 7
Try to go over homework problems • Try to go over my lecture notes
What’s wrong? Socket programming: If ( new_fd = accept(sockfd, (sockaddr *)&remote_addr, &sizeof(sockaddr)) == -1){ perror(“accept error\n”); exit(1); } send(new_fd, welcomeStr, strlen(welcomeStr), 0); recvNumByte=recv(new_fd, recvStr, MAXDATASIZE-1, 0); printf(“%s\n”, recvStr); Low-pass filter programming: void main(void){ alpha = 0.125; for (int i=0; i<N;i++) EstimateRTT[i] = EstimateRTT[i-1] + alpha*SampleRTT[i]; }