professor ayse karaman [email protected]. csc 458/csc 2209 – computer networksuniversity of...

52
Handout # 2: Course Logistics and Introduction Professor Ayse Karaman [email protected] CSC 458/2209 – Computer Networks Fall 2015, Section L0201 Department of Computer Science University of Toronto

Upload: baldric-lee

Post on 30-Dec-2015

221 views

Category:

Documents


0 download

TRANSCRIPT

Slide 1

Handout # 2:Course Logistics and IntroductionProfessor Ayse Karaman

[email protected] 458/2209 Computer NetworksFall 2015, Section L0201Department of Computer ScienceUniversity of Toronto1CSC 458/CSC 2209 Computer NetworksUniversity of Toronto Fall 2015TodayOutlineWhat this course is aboutLogisticsCourse structure, assignments, evaluation What is expected from youWhat you can expect from this courseReviewSimple example mail vs. FTPFoundations and basic concepts22CSC 458/CSC 2209 Computer NetworksUniversity of Toronto Fall 2015What is This Course About?Undergrad course; can be taken by gradsComputer networksBasics: Layers, naming, and addressing, network (socket) programming, packet switching, routing, congestion control, Advanced networking: HTTP, web, peer-to-peer, routers and switches, security, multimedia, online social networks, software-defined networking,

Theory vs. PracticeCSC 358: foundation and theoryCSC 458: advanced networking and network programming33CSC 458/CSC 2209 Computer NetworksUniversity of Toronto Fall 2015Logistics Prerequisites, ReadingsPrerequisitesAlgorithmsBasic probability theoryStrong background in C programming and Unix environment

CSC 358 is not a prerequisite.

ReadingsWill be posted on course schedule web pageRead before class44CSC 458/CSC 2209 Computer NetworksUniversity of Toronto Fall 2015Logistics Textbooks TextbookComputer Networks: A Systems Approach, (5th Edition), Peterson, Davie, 2011

Recommended booksUNIX Network Programming, Volume I: The Sockets Networking API, W. Richard Stevens, Bill Fenner, and Andrew M. Rudoff, 3rd edition, 2003TCP/IP Illustrated, Volume 1: The Protocols, W. Richard Stevens, 199355Logistics Hours, Web, AnnouncementsOffice hoursThu. 3-4 PM, Bahen 3219Or by appointmentEmail

Course web pagehttp://www.cs.toronto.edu/~yganjali/courses/csc458/http://www.cdf.toronto.edu/~karaman/csc458/CourseOutline.html Please check the class web page regularly for announcements.

CSC 458/CSC 2209 Computer Networks6University of Toronto Fall 20156Logistics Sections This course is offered in three sectionsL0201: the section you are currently attending

Other sectionsL0101: Tue. 1-3PML5101: Tue. 6-8PM

Might have slight differences in contentAssignments and exams are coordinatedCSC 458/CSC 2209 Computer Networks7University of Toronto Fall 2015Alireza Shekaramiz [email protected] Norouzi [email protected] [email protected] Arezoumand [email protected] Zhang [email protected] [email protected] [email protected] Liu [email protected] [email protected]

Logistics Teaching AssistantsCSC 458/CSC 2209 Computer Networks8University of Toronto Fall 20158Logistics TA hours, TutorialsCheck class web page for TA hours.

Tutorials and discussion sessionFri. 11-12 PM, SS1085

First tutorial: Tomorrow!

CSC 458/CSC 2209 Computer Networks9University of Toronto Fall 20159Logistics Mailing List, Bulletin BoardBulletin boardWe will use Piazza for announcements and Q&APost all technical/general questions related to the course.Check previous posts before asking a question.We guarantee to respond within 48 hours.

Class mailing listBased on e-mail address you have defined on ROSI.The TAs and I will use this list for announcements only.Do not send e-mails to this list!CSC 458/CSC 2209 Computer Networks10University of Toronto Fall 201510Logistics GradingAssignments: 50%Problem sets: 20% - 2*10% Programming: 30% - 12% + 18%Midterm exam: 20%October 29th, in class Other sections: please check with your instructorDifferent times and locationsFinal exam: 30% - TBA Same grading scheme for graduate and undergraduate students

CSC 458/CSC 2209 Computer Networks11University of Toronto Fall 201511Logistics - DeadlinesAssignment deadlinesOne free late submission of 24 hoursUse on assignment of your choiceE-mail TAs before the deadline10% deduction for each day lateUp to 20%Assignment not accepted after two days

CSC 458/CSC 2209 Computer Networks12University of Toronto Fall 201512Logistics Programming AssignmentsTo be completed in teams 2-3 or individually.

You can submit your assignment during a 7-10 day period before the deadlineAnd have the results of basic tests backLimited to 2-3 submissions.Please see details on course web-page

Socket ProgrammingMiniNetYour very own virtual network!You will create and program your own networkVM available on CDF machinesMore detail on this later.

This is a heavy course, but manageable!CSC 458/CSC 2209 Computer Networks13University of Toronto Fall 201513Logistics Academic IntegrityAcademic IntegrityAll submissions must present original, independent work.We take academic offenses very seriously. Please read Handout # 1 (course information sheet)Guideline for avoiding plagiarismhttp://www.cs.toronto.edu/~fpitt/documents/plagiarism.htmlAdvice about academic offenseshttp://www.cs.toronto.edu/~clarke/acoffences/ CSC 458/CSC 2209 Computer Networks14University of Toronto Fall 201514Logistics - AccessibilityAccessibility NeedsThe University of Toronto is committed to accessibility. If you require accommodations or have any accessibility concerns, please visit http://studentlife.utoronto.ca/accessibility as soon as possible.

CSC 458/CSC 2209 Computer Networks15University of Toronto Fall 201515AcknowledgementsSpecial thanks to:Nick McKeown from Stanford UniversityJennifer Rexford from Princeton UniversityDavid Wetherall from University of WashingtonNick Feamster from Georgia TechYashar Ganjali from University of TorontoCSC 458/CSC 2209 Computer Networks16University of Toronto Fall 201516Quick SurveyHave you taken CSC358 before?Have you taken any networking course?Are you familiar with Socket programming?Ethernet, framing, encoding, error detection/correction?UDP, TCP and congestion control?DNS, SNMP, BGP?BitTorrent?Voice and video over IP?Control plane vs. data path? Network security?

CSC 458/CSC 2209 Computer Networks17University of Toronto Fall 201517CSC 458/CSC 2209 Computer NetworksUniversity of Toronto Fall 2015Questions?What else do you want to know about this course?1818AnnouncementFirst tutorial Friday, Sep. 18th , 11-12AMIn classCovers socket programmingYoull need this information for your first programming assignment, which will be posted next week.CSC 458/CSC 2209 Computer Networks19University of Toronto Fall 2015An Introduction to the Mail SystemCSC 458/CSC 2209 Computer Networks20University of Toronto Fall 2015YasharNickU of TStanford

AdminAdmin

20An Introduction to the Mail SystemCSC 458/CSC 2209 Computer Networks21University of Toronto Fall 2015YasharNickU of TStanford

AdminAdmin

Application LayerTransport LayerNetwork LayerLink Layer21CSC 458/CSC 2209 Computer Networks22University of Toronto Fall 2015An Introduction to the InternetYasharNickcs.toronto.eduleland.stanford.eduNetwork LayerLink LayerApplication Layer

Transport Layer O.S. O.S.

HeaderDataHeaderDataDatagram22Characteristics of the InternetEach packet is individually routed.No time guarantee for delivery.No guarantee of delivery in sequence.No guarantee of delivery at all!Things get lostAcknowledgementsRetransmissionHow to determine when to retransmit? Timeout?Need local copies of contents of each packet.How long to keep each copy?What if an acknowledgement is lost? CSC 458/CSC 2209 Computer Networks23University of Toronto Fall 201523Characteristics of the Internet ContdNo guarantee of integrity of data.Packets can be fragmented.Packets may be duplicated.CSC 458/CSC 2209 Computer Networks24University of Toronto Fall 201524CSC 458/CSC 2209 Computer NetworksUniversity of Toronto Fall 2015Some Questions About the Mail SystemHow many sorting offices are needed and where should they be located?How much sorting capacity is needed?Should we allocate for Mothers Day?How can we guarantee timely delivery?What prevents delay guarantees?Or delay variation guarantees?How do we protect against fraudulent mail deliverers, or fraudulent senders?2525CSC 458/CSC 2209 Computer NetworksUniversity of Toronto Fall 2015Layering in the InternetTransport LayerProvides reliable, in-sequence delivery of data from end-to-end on behalf of application.Network LayerProvides best-effort, but unreliable, delivery of datagrams.Link LayerCarries data over (usually) point-to-point links between hosts and routers; or between routers and routers.2626CSC 458/CSC 2209 Computer NetworksUniversity of Toronto Fall 2015Outline Foundations & Basic ConceptsA detailed FTP exampleLayeringPacket switching and circuit switching

2727Example: FTP over the InternetUsing TCP/IP and EthernetCSC 458/CSC 2209 Computer Networks28University of Toronto Fall 2015AppOSR2R3R4R1R5EthernetA U of TB Stanford

Ethernet

AppOS123467201918175910812131115161428

CSC 458/CSC 2209 Computer NetworksUniversity of Toronto Fall 2015In the Sending Host1. Application-Programming Interface (API)Application requests TCP connection with B2. Transmission Control Protocol (TCP)Creates TCP Connection setup packetTCP requests IP packet to be sent to B

TCPDataTCPHeaderTCP PacketType = Connection SetupEmpty2929

CSC 458/CSC 2209 Computer NetworksUniversity of Toronto Fall 2015In the Sending Host Contd3. Internet Protocol (IP)Creates IP packet with correct addresses.IP requests packet to be sent to router.

IPDataTCP PacketEncapsulationIPHeaderIP PacketDestination Address: IP BSource Address: IP AProtocol = TCPTCPDataTCPHeader3030

In the Sending Host Contd4. Link (MAC or Ethernet) ProtocolCreates MAC frame with Frame Check Sequence (FCS). Wait for Access to the line.MAC requests PHY to send each bit of the frame.

CSC 458/CSC 2209 Computer Networks31University of Toronto Fall 2015EthernetDataIP PacketEthernetFCSEthernetHeaderEthernet PacketDestination Address: MAC R1Source Address: MAC AProtocol = IPIPDataIPHeaderEncapsulation31

CSC 458/CSC 2209 Computer NetworksUniversity of Toronto Fall 2015In Router R15. Link (MAC or Ethernet) ProtocolAccept MAC frame, check address and Frame Check Sequence (FCS). Pass data to IP Protocol.

EthernetDataIP PacketEthernetFCSEthernetHeaderEthernet PacketDestination Address: MAC R1Source Address: MAC AProtocol = IPIPDataIPHeaderDecapsulation3232CSC 458/CSC 2209 Computer NetworksUniversity of Toronto Fall 2015In Router R16. Internet Protocol (IP)Use IP destination address to decide where to send packet next (next-hop routing).Request Link Protocol to transmit packet.

IPDataIPHeaderIP PacketDestination Address: IP BSource Address: IP AProtocol = TCP

3333

In Router R17. Link (MAC or Ethernet) ProtocolCreates MAC frame with Frame Check Sequence (FCS). Wait for Access to the line.MAC requests PHY to send each bit of the frame.

CSC 458/CSC 2209 Computer Networks34University of Toronto Fall 2015EthernetDataIP PacketEthernetFCSEthernetHeaderEthernet PacketDestination Address: MAC R2Source Address: MAC R1Protocol = IPIPDataIPHeaderEncapsulation34

CSC 458/CSC 2209 Computer NetworksUniversity of Toronto Fall 2015In Router R516. Link (MAC or Ethernet) ProtocolCreates MAC frame with Frame Check Sequence (FCS). Wait for Access to the line.MAC requests PHY to send each bit of the frame.EthernetDataIP PacketEthernetFCSEthernetHeaderEthernet PacketDestination Address: MAC BSource Address: MAC R5Protocol = IPIPDataIPHeaderEncapsulation3535

CSC 458/CSC 2209 Computer NetworksUniversity of Toronto Fall 2015In the Receiving Host17. Link (MAC or Ethernet) ProtocolAccept MAC frame, check address and Frame Check Sequence (FCS). Pass data to IP Protocol.

EthernetDataIP PacketEthernetFCSEthernetHeaderEthernet PacketDestination Address: MAC BSource Address: MAC R5Protocol = IPIPDataIPHeaderDecapsulation3636

CSC 458/CSC 2209 Computer NetworksUniversity of Toronto Fall 2015In the Receiving Host - Contd18. Internet Protocol (IP)Verify IP address.Extract/decapsulate TCP packet from IP packet.Pass TCP packet to TCP Protocol.

IPDataTCP PacketDecapsulationIPHeaderIP PacketDestination Address: IP BSource Address: IP AProtocol = TCPTCPDataTCPHeader3737

CSC 458/CSC 2209 Computer NetworksUniversity of Toronto Fall 2015In the Receiving Host - Contd19. Transmission Control Protocol (TCP)Accepts TCP Connection setup packetEstablishes connection by sending Ack.20. Application-Programming Interface (API)Application receives request for TCP connection with A.

TCPDataTCPHeaderTCP PacketType = Connection SetupEmpty3838CSC 458/CSC 2209 Computer NetworksUniversity of Toronto Fall 2015Outline Foundations & Basic ConceptsA detailed FTP exampleLayeringPacket switching and circuit switching

3939Layering The OSI ModelCSC 458/CSC 2209 Computer Networks40University of Toronto Fall 2015SessionNetworkLinkPhysicalPhysicalPhysicalApplicationPresentationTransportNetworkLinkLinkNetworkTransportSessionPresentationApplicationNetworkLinkPhysicalPeer-layer communicationlayer-to-layer communicationRouterRouter1234567123456740CSC 458/CSC 2209 Computer Networks41University of Toronto Fall 2015Layering Our FTP ExampleNetworkLinkTransportApplicationPresentationSessionTransportNetworkLinkPhysicalThe 7-layer OSI ModelThe 4-layer Internet modelApplicationFTPASCII/BinaryIPTCPEthernet41CSC 458/CSC 2209 Computer NetworksUniversity of Toronto Fall 2015Outline Foundations & Basic ConceptsA detailed FTP exampleLayeringPacket switching and circuit switching

4242CSC 458/CSC 2209 Computer NetworksUniversity of Toronto Fall 2015Circuit SwitchingIts the method used by the telephone network.A call has three phases:Establish circuit from end-to-end (dialing),Communicate,Close circuit (tear down).Originally, a circuit was an end-to-end physical wire. Nowadays, a circuit is like a virtual private wire: each call has its own private, guaranteed data rate from end-to-end. ABSourceDestination4343CSC 458/CSC 2209 Computer Networks44University of Toronto Fall 2015Circuit Switching Telephone NetworkSourceCallerCentral OfficeC.O.

DestinationCalleeCentral OfficeC.O.TrunkExchange

Each phone call is allocated 64kb/s. So, a 10Gb/s trunk line can carry about 156,000 calls.44CSC 458/CSC 2209 Computer NetworksUniversity of Toronto Fall 2015Packet SwitchingIts the method used by the Internet.Each packet is individually routed packet-by-packet, using the routers local routing table.The routers maintain no per-flow state.Different packets may take different paths.Several packets may arrive for the same output link at the same time, therefore a packet switch has buffers.

AR1R2R4R3BSourceDestination4545CSC 458/CSC 2209 Computer Networks46University of Toronto Fall 2015Packet Switching Simple Router ModelR1Link 1Link 2Link 3Link 4Link 1, ingressLink 1, egressLink 2, ingressLink 2, egressLink 3, ingressLink 3, egressLink 4, ingressLink 4, egressChooseEgressChooseEgressChooseEgressChooseEgress4446CSC 458/CSC 2209 Computer Networks47University of Toronto Fall 2015Statistical Multiplexing Basic Idea

timetimetimerateOne flowTwo flowsAverage rateMany flowsNetwork traffic is bursty.i.e. the rate changes frequently.Peaks from independent flowsgenerally occur at different times.Conclusion: The more flows we have, the smoother the traffic.

Average rates of: 1, 2, 10, 100, 1000 flows.raterate47CSC 458/CSC 2209 Computer Networks48University of Toronto Fall 2015Packet Switching Statistical MultiplexingLink rate, RX(t)Dropped packetsBDropped packetsQueue LengthX(t)TimePacket bufferPackets for one outputDataHdrDataHdrDataHdrRRRBecause the buffer absorbs temporary bursts, the egress link need not operate at rate N.R.But the buffer has finite size, B, so losses will occur.12N48CSC 458/CSC 2209 Computer Networks49University of Toronto Fall 2015Statistical MultiplexingBAtimetimeRateRateCCACBC49Statistical multiplexingImportant if traffic is burstyLess expensiveContention requires bufferingVariable delay => no QoS guarantees

CSC 458/CSC 2209 Computer Networks50University of Toronto Fall 2015Statistical Multiplexing GainABR2CR < 2CA+BtimeRateStatistical multiplexing gain = 2C/R

Other definitions of SMG: The ratio of rates that give rise to a particular queue occupancy, or particular loss probability.50Statistical multiplexingImportant if traffic is burstyLess expensiveContention requires bufferingVariable delay => no QoS guarantees

CSC 458/CSC 2209 Computer NetworksUniversity of Toronto Fall 2015Why Packet Switching in the Internet?Efficient use of expensive links:The links are assumed to be expensive and scarce. Packet switching allows many, bursty flows to share the same link efficiently.Circuit switching is rarely used for data networks, ... because of very inefficient use of the links - GallagerResilience to failure of links & routers:For high reliability, ... [the Internet] was to be a datagram subnet, so if some lines and [routers] were destroyed, messages could be ... rerouted Tanenbaum

5151Breaking message into packets allows parallel transmission across all links, reducing network latency.In summary the benefits that of packet switched networks can be summarized as follows:They use the bandwidth efficiently, meaning that a trunk link uses less resources than the sum of its tributaries, as they multiplex and conserve bandwidthThey have little state in the intermediate nodesThey are robust, some claim that they were designed to withstand a nuclear attackThey do not have a central authority from whom we need permission to run experiments

Final Comments, DiscussionBest effort serviceMade the rapid growth of the Internet possibleMakes providing any guarantees very difficult

Packet switchingStore and forwardEnables statistical multiplexingWe need extremely fast routers

RoutingHop-by-hopHow does a router know which output port to send the packet to?CSC 458/CSC 2209 Computer Networks52University of Toronto Fall 201552