computer communication networks foundation
play

Computer Communication Networks Foundation IECE / ICSI 416 Spring - PowerPoint PPT Presentation

Computer Communication Networks Foundation IECE / ICSI 416 Spring 2020 Prof. Dola Saha 1 Why this course? How do you get to watch your most favorite youtube video? 2 Impact on our lives 3 1970s Trunk Call 8:00AM Call


  1. Cost-Effective Resource Sharing Ø FDM: Frequency Division Multiplexing § Statistical Multiplexing § Data is transmitted based on demand of each flow. Ø What is a flow? § Packets vs. Messages § FIFO, Round-Robin, Priorities (Quality-of- A switch multiplexing packets Service (QoS)) from multiple sources onto one § Congested? shared link § LAN, MAN, WAN § SAN (System Area Networks) 34

  2. Packet-switching: store-and-forward L bits per packet 3 2 1 source destination R bps R bps one-hop numerical takes L / R seconds to transmit (push out) L -bit packet into Ø example: link at R bps § L = 7.5 Mbits store and forward: entire packet must arrive at router Ø § R = 1.5 Mbps before it can be transmitted on next link § one-hop transmission end-end delay = 2 L / R v delay = 5 sec (assuming zero propagation more on delay shortly … delay) 35

  3. Packet Switching: queueing delay, loss C R = 100 Mb/s A D R = 1.5 Mb/s B E queue of packets waiting for output link queuing and loss: If arrival rate (in bits) to link exceeds transmission rate of link for a period of time: v § packets will queue, wait to be transmitted on link § packets can be dropped (lost) if memory (buffer) fills up 36

  4. Two key network-core functions forwarding : move packets from router ’ s input to appropriate router routing: determines source-destination output route taken by packets § routing algorithms routing algorithm local forwarding table header value output link 1 0100 3 0101 2 2 0111 2 3 1001 1 0111 dest address in arriving packet ’ s header Network Layer 37

  5. Alternative core: circuit switching end-end resources allocated to, reserved for “ call ” between source & dest: In diagram, each link has four circuits. Ø call gets 2 nd circuit in top link and 1 st circuit in right link. § dedicated resources: no sharing Ø circuit-like (guaranteed) performance § circuit segment idle if not used by call (no sharing) Ø Commonly used in traditional telephone networks Ø 38

  6. Circuit switching: FDM versus TDM Example: FDM 4 users frequency time TDM frequency time 39

  7. Packet switching versus circuit switching Ø example: packet switching allows more users to § 1 Mb/s link use network! § each user: • 100 kb/s when “ active ” ….. N • active 10% of time users 1 Mbps link Ø circuit-switching: § 10 users Ø packet switching: Q: how did we get value 0.0004? § with 35 users, probability > 10 active at same Q: what happens if > 35 users ? time is less than .0004 * 40

  8. Packet switching versus circuit switching Is packet switching a “ slam dunk winner? ” great for bursty data Ø § resource sharing § simpler, no call setup excessive congestion possible: packet delay and loss Ø § protocols needed for reliable data transfer, congestion control Q: How to provide circuit-like behavior? Ø § bandwidth guarantees needed for audio/video apps § still an unsolved problem Q: human analogies of reserved resources (circuit switching) versus on-demand allocation (packet-switching)? 41

  9. Internet structure: network of networks Ø End systems connect to Internet via access ISPs (Internet Service Providers) § Residential, company and university ISPs Ø Access ISPs in turn must be interconnected. § So that any two hosts can send packets to each other Ø Resulting network of networks is very complex § Evolution was driven by economics and national policies Ø Let ’ s take a stepwise approach to describe current Internet structure 42

  10. Internet structure: network of networks Question: given millions of access ISPs, how to connect them together? … … access access net net access net access net access net access access net net … … access access net net access net access net access net access net … access … access net net access net 43

  11. Internet structure: network of networks Option: connect each access ISP to every other access ISP? … … access access net net access net access … net access … net access access net net … connecting each access ISP to … each other directly doesn’t scale: … access access … O( N 2 ) connections. net net access net access net access net access … net … access … access net net access net 44

  12. Internet structure: network of networks Option: connect each access ISP to a global transit ISP? Customer and provider ISPs have economic agreement. … … access access net net access net access net access net access access net net … … global ISP access access net net access net access net access net access net … access … access net net access net 45

  13. Internet structure: network of networks But if one global ISP is viable business, there will be competitors …. … … access access net net access net access net access net access access net ISP A net … … access access ISP B net net ISP C access net access net access net access net … access … access net net access net 46

  14. Internet structure: network of networks But if one global ISP is viable business, there will be competitors …. which must be interconnected Internet exchange point … … access access net net access net access net access net IXP access access net ISP A net … … IXP access access ISP B net net ISP C access net access net peering link access net access net … access … access net net access net 47

  15. Internet structure: network of networks … and regional networks may arise to connect access nets to ISPS … … access access net net access net access net access net IXP access access net ISP A net … … IXP access access ISP B net net ISP C access net access net access regional net net access net … access … access net net access net 48

  16. Internet structure: network of networks … and content provider networks (e.g., Google, Microsoft, Akamai ) may run their own network, to bring services, content close to end users … … access access net net access net access net access net IXP access access net ISP A net … … Content provider network IXP access access ISP B net net ISP B access net access net access regional net net access net … access … access net net access net 49

  17. Internet structure: network of networks Tier 1 ISP Tier 1 ISP Google IXP IXP IXP Regional ISP Regional ISP access access access access access access access access ISP ISP ISP ISP ISP ISP ISP ISP at center: small # of well-connected large networks Ø § “ tier-1 ” commercial ISPs (e.g., Level 3, Sprint, AT&T, NTT), national & international coverage § content provider network (e.g, Google): private network that connects it data centers to Internet, often bypassing tier-1, regional ISPs 50

  18. Tier-1 ISP: e.g., Sprint POP: point-of-presence to/from backbone peering … … … … … to/from customers 51

  19. Support for Common Services Ø Logical Channels § Application-to-Application communication path or a pipe Process communicating over an abstract channel 52

  20. Common Communication Patterns Ø Client/Server Ø Two types of communication channel § Request/Reply Channels § Message Stream Channels 53

  21. Reliability Ø Network should hide the errors Ø Bits are lost § Bit errors (1 to a 0, and vice versa) § Burst errors – several consecutive errors Ø Packets are lost (Congestion) Ø Links and Node failures Ø Messages are delayed Ø Messages are delivered out-of-order Ø Third parties eavesdrop 54

  22. Network Architecture Example of a layered network system 55

  23. Network Architecture Layered system with alternative abstractions available at a given layer 56

  24. What is a protocol? Protocols define format, order of messages sent and received among network entities, and actions taken on message transmission and receipt. Ø Human Protocols: Ø Network Protocols: § What’s the time? § Nodes / machines in the network participate § I have a question…. § Communication activity in § Hi, I am XYZ…. Internet is governed by Network § Hello, how are you? Protocols § Are you alive? § Do you know the route to node X? 57

  25. What is a protocol? Ø Human Protocols: Ø Network Protocols: Hi TCP connection request Hi TCP connection response Got the Get http://www.albany.edu/faculty/dsaha/ time? 2:00 <file> time 58

  26. Protocols Ø Protocol defines the interfaces between the layers in the same system and with the layers of peer system Ø Building blocks of a network architecture Ø Each protocol object has two different interfaces § service interface: operations on this protocol § peer-to-peer interface: messages exchanged with peer Ø Term “protocol” is overloaded § specification of peer-to-peer interface § module that implements this interface 59

  27. Interfaces Service and Peer Interfaces 60

  28. Protocols Ø Protocol Specification: prose, pseudo-code, state transition diagram Ø Interoperable: when two or more protocols that implement the specification accurately Ø IETF: Internet Engineering Task Force 61

  29. Protocol Graph Message Stream Protocol Request Reply Protocol Host-to-Host Protocol Example of a protocol graph nodes are the protocols and links the “ depends-on ” relation 62

  30. Protocol Layers Ø Networks are complex, with many “pieces”: § hosts § routers § links of various media § applications § protocols § hardware, software Question: is there any hope of organizing structure of network? 63

  31. Organization of air travel ticket (complain) ticket (purchase) baggage (claim) baggage (check) gates (unload) gates (load) runway landing runway takeoff airplane routing airplane routing airplane routing 64

  32. Layering of airline functionality ticket (purchase) ticket (complain) ticket baggage (check) baggage (claim baggage gates (load) gates (unload) gate runway (takeoff) runway (land) takeoff/landing airplane routing airplane routing airplane routing airplane routing airplane routing departure intermediate air-traffic arrival airport control centers airport Ø layers : each layer implements a service § via its own internal-layer actions § relying on services provided by layer below 65

  33. Why layering? Ø dealing with complex systems: § explicit structure allows identification, relationship of complex system’s pieces o layered reference model for discussion Ø modularization eases maintenance, updating of system § change of implementation of layer’s service transparent to rest of system § e.g., change in gate procedure doesn’t affect rest of system Ø layering considered harmful? 66

  34. OSI Architecture The OSI 7-layer Model OSI – Open Systems Interconnection 67

  35. Description of Layers Ø Physical Layer § Handles the transmission of raw bits over a communication link Ø Data Link Layer § Collects a stream of bits into a larger aggregate called a frame § Network adaptor along with device driver in OS implement the protocol in this layer § Frames are actually delivered to hosts Ø Network Layer § Handles routing among nodes within a packet-switched network § Unit of data exchanged between nodes in this layer is called a packet The lower three layers are implemented on all network nodes 68

  36. Description of Layers Transport Layer Ø § Implements a process-to-process channel § Unit of data exchanges in this layer is called a message Session Layer Ø § Provides a name space that is used to tie together the potentially different transport streams that are part of a single application Presentation Layer Ø § Concerned about the format of data exchanged between peers Application Layer Ø § Standardize common type of exchanges The transport layer and the higher layers typically run only on end-hosts and not on the intermediate switches and routers 69

  37. Internet Protocol Stack (RFC 1122, 1989) Ø application: supporting network applications application § FTP, SMTP, HTTP transport Ø transport: process-process data transfer § TCP, UDP network Ø network: routing of datagrams from source to destination § IP, routing protocols link Ø link: data transfer between neighboring network elements physical § Ethernet, 802.11 (WiFi) Ø physical: bits “on the wire” / “over the air” 70

  38. Encapsulation High-level messages are encapsulated inside of low-level messages 71

  39. Encapsulation message M application segment H t transport H t M network datagram H n H n H t M link frame H l H n H t M physical source link physical switch destination network H n H t M M application link H l H n H t M H n H t M H t M transport physical H n H t network M H l H n H t M link router physical 72

  40. Internet Architecture Alternative view of the Internet architecture. The “ Network ” layer shown here is sometimes Internet Protocol Graph referred to as the “ sub-network ” or “ link ” layer. 73

  41. Internet Architecture Ø Defined by IETF (The Internet Engineering Task Force) Ø Three main features § Does not imply strict layering. The application is free to bypass the defined transport layers and to directly use IP or other underlying networks § An hour-glass shape – wide at the top, narrow in the middle and wide at the bottom. IP serves as the focal point for the architecture § In order for a new protocol to be officially included in the architecture, there needs to be both a protocol specification and at least one (and preferably two) representative implementations of the specification 74

  42. Application Programming Interface Ø Interface exported by the network Ø Since most network protocols are implemented (those in the high protocol stack) in software and nearly all computer systems implement their network protocols as part of the operating system, when we refer to the interface “ exported by the network ” , we are generally referring to the interface that the OS provides to its networking subsystem Ø The interface is called the network Application Programming Interface (API) 75

  43. Application Programming Interface (Sockets) Ø Socket Interface was originally provided by the Berkeley distribution of Unix § Now supported in virtually all operating systems Ø Each protocol provides a certain set of services , and the API provides a syntax by which those services can be invoked in this particular OS 76

  44. Socket Ø What is a socket? § The point where a local application process attaches to the network § An interface between an application and the network § An application creates the socket Ø The interface defines operations for § Creating a socket § Attaching a socket to the network § Sending and receiving messages through the socket § Closing the socket 77

  45. Sockets Ø process sends/receives messages to/from its socket Ø socket analogous to door between application process & end-end- transport § sending process shoves message out door § sending process relies on transport infrastructure on other side of door to deliver message to socket at receiving process application application socket controlled by process process app developer transport transport controlled network network by OS link link Internet physical physical 78

  46. Socket programming Two socket types for two transport services: § User Datagram Protocol (UDP): o unreliable datagram § Transmission Control Protocol (TCP): o reliable, byte stream-oriented Application Example: 1. client reads a line of characters (data) from its keyboard and sends data to server 2. server receives the data and converts characters to uppercase 3. server sends modified data to client 4. client receives modified data and displays line on its screen 79

  47. Socket programming with UDP UDP: no “connection” between client & server no handshaking before sending data Ø sender explicitly attaches IP destination address and port # to each packet Ø receiver extracts sender IP address and port# from received packet Ø UDP: transmitted data may be lost or received out-of-order Application viewpoint: Ø UDP provides unreliable transfer of groups of bytes (“datagrams”) between client and server 80

  48. Port Numbers Ø Commonly used: § 21 : File Transfer Protocol (FTP) § 22 : Secure Shell (SSH) § 23 : Telnet remote login service § 25 : Simple Mail Transfer Protocol (SMTP) § 80 : Hypertext Transfer Protocol (HTTP) used in the World Wide Web § 110 : Post Office Protocol (POP3) § 123 : Network Time Protocol (NTP) § 143 : Internet Message Access Protocol (IMAP) § 443 : HTTP Secure (HTTPS) Ø The registered ports are those from 1024 through 49151. IANA maintains the official list of registered ports. Ø The dynamic or private ports are those from 49152 through 65535. 81

  49. Client/server socket interaction: UDP client server (running on serverIP ) create socket: create socket, port= x: clientSocket = serverSocket = socket(AF_INET,SOCK_DGRAM) socket(AF_INET,SOCK_DGRAM) Create datagram with server IP and port=x; send datagram via read datagram from clientSocket serverSocket write reply to read datagram from serverSocket clientSocket specifying client address, close port number clientSocket 82

  50. Socket programming with TCP client must contact server when contacted by client, server TCP Ø creates new socket for server process to server process must first be running Ø communicate with that particular client server must have created socket (door) Ø § allows server to talk with multiple that welcomes client’s contact clients client contacts server by: § source port numbers used to distinguish clients (more in Chap 3) Creating TCP socket, specifying IP Ø address, port number of server process when client creates socket: client TCP Ø establishes connection to server TCP application viewpoint: TCP provides reliable, in-order byte-stream transfer ( “ pipe ” ) between client and server 83

  51. Client/server socket interaction: TCP server (running on hostid ) client create socket, port= x , for incoming request: serverSocket = socket() wait for incoming create socket, TCP connection request connect to hostid , port= x connection setup connectionSocket = clientSocket = socket() serverSocket.accept() send request using read request from clientSocket connectionSocket write reply to read reply from connectionSocket clientSocket close close connectionSocket clientSocket 84

  52. Socket Programming in C Ø http://beej.us/guide/bgnet/ 85

  53. C Program Output UDP Client UDP Server TCP Server TCP Client 86

  54. Performance Ø Bandwidth § Width of the frequency band § Number of bits per second that can be transmitted over a communication link Ø 1 Mbps: 1 x 10 6 bits/second = 1x2 20 bits/sec Ø 1 x 10 -6 seconds to transmit each bit or imagine that a timeline, now each bit occupies 1 micro second space. Ø On a 2 Mbps link the width is 0.5 micro second. Ø Smaller the width more will be transmission per unit time. 87

  55. Bandwidth Bits transmitted at a particular bandwidth can be regarded as having some width: (a) bits transmitted at 1Mbps (each bit 1 µs wide); (b) bits transmitted at 2Mbps (each bit 0.5 µs wide). 88

  56. How do loss and delay occur? packets queue in router buffers packet arrival rate to link (temporarily) exceeds output link capacity Ø packets queue, wait for turn Ø packet being transmitted (delay) A B packets queueing (delay) free (available) buffers: arriving packets dropped (loss) if no free buffers 89

  57. Four sources of packet delay transmission A propagation B nodal queueing processing d nodal = d proc + d queue + d trans + d prop d proc : nodal processing d queue : queueing delay § time waiting at output link for § check bit errors transmission § determine output link § depends on congestion level of router § typically < msec 90

  58. Four Sources of Packet Delay transmission A propagation B nodal queueing processing d nodal = d proc + d queue + d trans + d prop d trans : transmission delay: d prop : propagation delay: § § L : packet length (bits) d : length of physical link § § R : link bandwidth (bps) s : propagation speed in medium (~3x10 8 m/sec) § d trans = L/R § d prop = d / s d trans and d prop very different 91

  59. Caravan analogy 100 km 100 km ten-car toll toll caravan booth booth time to “ push ” entire caravan through cars “ propagate ” at Ø Ø toll booth onto highway = 12*10 = 100 km/hr 120 sec toll booth takes 12 sec to service car Ø time for last car to propagate from 1st (bit transmission time) Ø to 2nd toll both: 100km/(100km/hr) = car~bit; caravan ~ packet Ø 1 hr Q: How long until caravan is lined up Ø A: 62 minutes Ø before 2nd toll booth? 92

  60. Caravan analogy (more) 100 km 100 km ten-car toll toll caravan booth booth suppose cars now “ propagate ” at 1000 km/hr Ø and suppose toll booth now takes one min to service a car Ø Q: Will cars arrive to 2nd booth before all cars serviced at first booth? Ø Ø A: Yes! after 7 min, 1st car arrives at second booth; three cars still at 1st booth. 93

  61. Queueing delay (revisited) R: link bandwidth (bps) Ø L: packet length (bits) Ø average queueing a: average packet arrival rate Ø delay traffic intensity La/R ~ 0: avg. queueing delay small = La/R v La/R -> 1: avg. queueing delay large v La/R > 1: more “ work ” arriving v than can be serviced, average delay infinite! La/R -> 1 La/R ~ 0 94

  62. “ Real ” Internet delays and routes Ø what do “ real ” Internet delay & loss look like? Ø traceroute program: provides delay measurement from source to router along end-end Internet path towards destination. For all i: § sends three packets that will reach router i on path towards destination § router i will return packets to sender § sender times interval between transmission and reply. 3 probes 3 probes 3 probes 95

  63. Real Internet Delays, routes traceroute to openairinterface.org From UAlbany 3 delay measurements trans-oceanic link * means no response (probe lost, router not replying) From Home 96

  64. Packet loss Ø queue (aka buffer) preceding link in buffer has finite capacity Ø packet arriving to full queue dropped (aka lost) Ø lost packet may be retransmitted by previous node, by source end system, or not at all buffer packet being transmitted (waiting area) A B packet arriving to full buffer is lost 97

  65. Throughput Ø throughput: rate (bits/time unit) at which bits transferred between sender/receiver § instantaneous: rate at given point in time § average: rate over longer period of time link capacity server, with link capacity pipe that can carry pipe that can carry server sends bits R s bits/sec file of F bits R c bits/sec fluid at rate fluid at rate (fluid) into pipe to send to client R s bits/sec) R c bits/sec) 98

  66. Throughput (more) Ø R s < R c What is average end-end throughput? R s bits/sec R c bits/sec v R s > R c What is average end-end throughput? R s bits/sec R c bits/sec bottleneck link link on end-end path that constrains end-end throughput 99

  67. Throughput: Internet scenario Ø per-connection end- end throughput: R s min(R c ,R s ,R/10) R s R s Ø in practice: R c or R s is R often bottleneck R c R c R c 10 connections (fairly) share backbone bottleneck link R bits/sec 100

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend