ECE 5595 Week 1
Outline Vocabulary Protocols Reference Models Types of service The client-server model Sockets Delay Delay-bandwidth product 2
Vocabulary (1) Network, Internetwork, WAN, MAN, CAN, LAN, PAN Stations, hosts, systems Subnet, Segment, Link Router, bridge, switch, hub, repeater Switching Point-to-Point (P2P) segment, Shared segment Contention, Collisions 3
Vocabulary (2) 4
Vocabulary (3) Simplex, Half-duplex, Full-duplex Unicast, Broadcast, Multicast Topology: the “shape” or pattern –Physical and logical topology may be different Mesh: P2P links between pairs of hosts –A fully connected mesh of N devices requires N*(N-1)/2 separate P2P links, i.e., its “Big O” is N squared. 5 Fully connected Partially connected
Vocabulary (4) Bus or backbone: Big O is N Ring: Big O is N Star (or hub and spoke): Big O is N –Physically the result of collapsing the backbone or ring into a “hub” in a communications closet –Each host is a “home run” to the closet –The result is called “structured wiring” –Often used with bus (Ethernet) or ring (FDDI) logical topologies 6
Vocabulary (5) Bus or backbone Collapsed backbone Ring Collapsed ring hub 7
Vocabulary (6) Multiplexing, De-multiplexing: Statistical multiplexing: relying on the network- usage statistics to allow oversubscription of a network resource 8
Outline Vocabulary Protocols Reference Models Types of service The client-server model Sockets Delay Delay-bandwidth product 9
Protocols (1) The network provides communication services Software objects called protocols implement these services –The networking problem is complex –The protocol objects are layered to split up the problem –“Protocol” also describes the operation and messages exchanged by one protocol object and its peer object in another device Networking creates patterns of interactions between protocol objects 10
Protocols (2) Each protocol object has two different interfaces –Service interface: The interface to a higher-layer protocol object on the same system It defines the operations that the higher-layer protocol object can perform on this protocol object A protocol accepts its Service Data Unit (SDU) or payload at the service interface –Peer-to-peer interface: the message interaction between this protocol object and its peer on another system Peer-to-peer communication is indirect (or virtual) except at the hardware layer A protocol sends Protocol Data Units (PDUs) on this interface 11
Protocols (3) 12
Protocols (4) A protocol object may provide service to multiple, higher-layer, protocol objects (via multiplexing) –As the PDU is created from the SDU a tag (or address) is added to the PDU to distinguish between the various higher-layer customers This allows the SDU to be extracted at this layer’s peer and handed back to the peer of the higher-layer customer The PDU may also include information to support fragmentation and re-assembly, error detection or correction, flow control, or any other service characteristics that the protocol object provides to its customers 13
Protocols (5) The PDU for a protocol object is created from the SDU by encapsulating the SDU (= the payload) between a header and a (optional) trailer –The header and optional trailer provide the additional information needed to support the service provided by the protocol object to its customers –The SDU contents and structure are opaque to the protocol object and the encapsulation process – the payload is just a bunch of bytes 14
Protocols (6) 15
Protocols (7) 16
Outline Vocabulary Protocols Reference Models Types of service The client-server model Sockets Delay Delay-bandwidth product 17
Reference Models (1) A reference model is the formal name for a protocol suite – a collection of protocols and layer definitions that provide network service We discuss 2 models –The 7-layer, Open Systems Interconnection (OSI) model created primarily by the phone companies –The hybrid model derived from the 5-layer Transmission Control Protocol (TCP) / Internet Protocol (IP) model created by the Internet Engineering Task Force (IETF) 18
Reference Models (2): OSI voltages, cabling framing routing end-to-end boundary synchronization “endian” issues 19
Reference Models (3): TCP/IP 20 Layer 3 is often called the network layer and Layer 2 the data-link layer – borrowing from the OSI model
Reference Models (4) Layer 1 = Physical Layer –Actually moves bits to its peer Layer 2 = Network Interface (aka Data Link) Layer –Creates frames from the Internet layer payload Having a unit of bytes called a frame permits checksums, for example, allows a header to be applied, etc. –Sends frames to the physical layer for transmission –Standards often describe a combination of layer 2 on a specific layer 1 medium 21
Reference Models (5) Layer 3 = Internet (aka Network) layer –Performs internetworking role Forwards packets between layer 2 networks This layer is end-to-end but multiple peer-to-peer hops may be needed to reach the destination Creates a virtual, uniform network on top of heterogeneous layer-2 network technologies –Creates packets from data sent by transport layer May perform fragmentation in the TCP/IP protocol suite –Sends packets to layer 2 to be sent through the data link layer 22
Reference Models (6) Layer 4 = Transport layer –Lowest layer that is completely end-to-end The peers are the endpoints rather than the intermediate hops –Provides service characteristics required by the application layer Reliable stream service: Transmission Control Protocol (TCP) Best-effort message service: User Datagram Protocol (UDP) Layer 5 = Application layer Other layers are added as necessary Not every object has protocol objects at every layer –The protocols, the flows between the protocol objects and the patterns that they form are what we study 23
Reference Models (7) 24
Reference Models (8) 25
Outline Vocabulary Protocols Reference Models Types of service The client-server model Sockets Delay Delay-bandwidth product 26
Types of service (1) Connection-oriented vs. Connectionless –Connection-oriented requires setup prior to use but has more predictable characteristics Reliable vs. Unreliable –Reliable service uses Acknowledgments and Timeouts as its fundamental mechanisms Datagram or message versus Stream –Datagram: connectionless, unreliable, many-to-many, sequence of discrete messages of finite length (UDP) –Stream: connection-oriented, reliable, one-to-one, sequence of individual bytes, arbitrary length (TCP) 27
Outline Vocabulary Protocols Reference Models Types of service The client-server model Sockets Delay Delay-bandwidth product 28
Client-Server (1) A server starts first and waits to be contacted –It does not know which clients will contact it –It continues to run after servicing one client A client starts second and initiates the connection –It must know what server to contact –It initiates contact only when necessary A computer can run –One or more clients of the same type, or multiple clients of different types, etc. –One or more servers for providing one or more services –A combination 29
Client-Server (2) An iterative server handles one request at a time A concurrent server handles multiple requests at a time with N+1 threads used for N requests –A main process handles receiving the requests and handing them off to child processes An application may have both server and client relationships to other applications –Circular relationships can lead to a deadlock –This is an example of a loop – and loops are a pattern that we must avoid at every layer 30
Client-Server (3) How does a client identify a server? –In TCP/IP an application service is identified in two steps: Identify the hardware interface where the service can be reached: an IP address Identify which service at that interface: a TCP, or UDP port number –The IP address is also used to locate the interface on the network at layer 3 –Typically a Domain Name Service (DNS) name is specified and that is translated by DNS into an IP address 31
Outline Vocabulary Protocols Reference Models Types of service The client-server model Sockets Delay Delay-bandwidth product 32
Sockets (1) A networking API called Sockets was distributed as part of the original UNIX An application creates a socket, and then invokes functions to adjust the socket details and to pass data through the socket –The socket descriptor returned by the socket call is an argument to those other functions –The result it that each function call is relatively simple, but it takes a sequence of function calls to actually pass data –Address to name, and byte reordering routines are also provided 33
Sockets (2) NameUsed ByDescription acceptserverAccept an incoming connection bindserverSpecify IP address and protocol port closeeitherTerminate communication connectclientConnect to a remote application (active open) getpeernameserverObtain client’s IP address getsocketoptserverObtain current options for a socket listenserverPrepare socket for use by a server (passive open) recveitherReceive incoming data or message recvmsgeitherReceive data (message transport) recvfromeitherReceive a message and sender’s address send (write)eitherSend outgoing data or message sendmsgeitherSend outgoing data (message transport) sendtoeitherSend outgoing message (variant of sendmsg) setsocketopteitherChange socket options shutdowneitherTerminate a connection (in one direction, i.e., half-close) socketeitherCreate a socket for use by the other functions 34
Sockets (3) Illustration of stream socket function calls 35
Outline Vocabulary Protocols Reference Models Types of service The client-server model Sockets Delay Delay-bandwidth product 36
Performance (1) There are several important measures of network performance –Throughput or capacity: data transferred per unit time Throughput is limited by the slowest link traversed –Delay or Latency: time required to complete some step of network activity; there are several different components of delay that are of interest –Jitter or variability: the statistical description of how the delay changes A user computes throughput as follows –Throughput = amount of data transferred / time it took 37
Performance (2) We are surprised when the throughput doesn’t match the data rate of the network, but data rate is an ideal number –Protocols have overhead such as headers –Helper protocols such as DNS consume time –Call setup for a connection consumes time –In general, the other desirable characteristics of a data communication come at the expense of throughput Congestion avoidance, reliability, etc. –Finally, the nominal data rate assumes the network is full of data all of the time This may not be true due to protocol limitations or configuration 38
Performance (3) Latency (delay) –Specifically the time between when the first bit is placed on the wire and when the last bit leaves the wire at the other end We discuss three elements of delay –Transmit time or delay (not considered in the textbook) –Propagation delay –Queuing delay (we include the textbook’s switching delay and access delay in this category) –We ignore the text’s server delay as a non-network delay 39
Performance (4) Transmit time for a message is the time needed to put that message into the network –It is also the time for the message to transit past a single point Transmit time = message size / data rate –For a typical file on a LAN this is the predominant delay component so we mistakenly believe this is the only component under all circumstances Transmit delay is based on data rate – so we can throw money at it –i.e., buy a higher data-rate network 40
Performance (5) Propagation delay is the time for an event to travel from point A to point B –Event: start of a bit, end of a bit, etc. Propagation delay = distance / propagation_velocity –For most network media the propagation velocity is a fraction of the speed of light In general – one cannot buy lower propagation delay –May be able to switch from a geo-synch satellite to a land-line in some circumstances –Protocol design must work around expected delay 41
Performance (6) Queuing delay is time spent in network equipment –In store and forward switching you store the entire inbound frame before forwarding on the output port As a minimum this adds another transmit time for the frame –A newly arrived frame once it is switched into an output queue must wait for all previous frames to be transmitted, i.e., the transmit time for all of those frames –Variation in overall delay is called jitter and that is often the result of variations in queuing delay To minimize jitter we want smaller atomic units of data, (often called frames or packets) but that compromises efficiency with a poor ratio of header to payload –Increases in data rate also reduce queuing delay 42
Performance (7) 43
Outline Vocabulary Protocols Reference Models Types of service The client-server model Sockets Delay Delay-bandwidth product 44
Delay-bandwidth (1) A school (file) full of people (bits) must be moved to a new school A fleet of taxicabs carries people 4 at a time (a frame) to the new school The cabs enter the highway at a fixed rate (the data rate = frame rate x bits per frame) –Controlled by a policeman at the intersection, for example 45
Delay-bandwidth (2) All cabs travel the same route at the speed limit (the propagation velocity) and experience the same delays at intersections (queuing delays) Time to transfer the whole school will be the time between when the first and the last cab leave the parking lot (transmit time), plus the time it takes for the last cab (= time for any cab) to make the trip (propagation delay and queuing delay) Does the rate at which cabs enter the highway have any bearing on how far a cab travels? No! –The data rate does not affect the propagation delay 46
Delay-bandwidth (3) Assume we could send 20-person buses at the same interval – but otherwise follow the same rules - we have 5 times higher data rate. Does the bus get there any faster than a cab? No –The data rate does not affect the propagation delay Will the transfer be completed faster with the buses? Yes, but it won’t be 5 times faster –It will be close to 5 if the new school is just down the street (minimum propagation delay so the reduction in transmit time is the predominant effect) –It will be much less significant a savings if the new school is across the country 47
Delay-bandwidth (4) What if we only had one taxi and we had to wait for it to get back before we could send it again? To achieve the fastest transfer we must have enough taxis so we can keep sending them at the data rate until the first one gets back and can be sent again Assume we send a cab every 2 minutes (data rate) and they take 120 minutes (round-trip delay) to get back 48
Delay-bandwidth (5) Amount of data “in the pipe” or “in flight” is determined by the delay-bandwidth product –It is really the delay-”data rate” product Round-Trip Time (RTT) is used because acknowledgement is involved –One-way-delay * data rate will have been received and one-way-delay * data rate will still be in the pipe before the acknowledgement gets back to the sender that the first data has arrived For the school analogy – 30 cabs on the way out, 30 cabs on the way back at any time 49
Delay-bandwidth (6) Sender One-way Delay = 100 Receiver Assume sender can use the full bandwidth and has 200 * data_rate of data t=0 t=50 t=100 first unit of data arrives; first acknowledgement starts back 50 th time unit of data arrives; 50 acks on the way back t=150 t= th time unit of data arrives; 100 acks on the way back; sender sees ack for first unit of data 50
Delay-bandwidth (7) Delay used in computation is often just the round trip propagation delay –Usually computed in a WAN setting where the propagation delay dominates –Queuing delay is often estimated or ignored –Transmit delay component would be for a single frame, and a single ACK in the other direction: usually too small to matter in a WAN A sender must buffer the RTT delay-data_rate product amount of data to keep the pipe full if there is any requirement to resend lost data 51
Delay-bandwidth (8) Sender One-way Delay = 100 Receiver Assume sender can use the full data_rate and is only allowed 50 * data_rate unacknowledged due to buffer limitations t=0 t=50 t=150 t=100 t=200 t=225 t=250 52