Lecture 2 Communication services The Trasport Layer Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it
The structure edge: applications and hosts core: routers of s access s, media: communication links Access Backbone Access
The edge end systems (hosts): run application programs e.g., WWW, email at edge of client/server model client host requests, receives service from server e.g., WWW client (browser)/ server; email client/server peer-peer model: host interaction symmetric e.g.: teleconferencing, file sharing
The Network Core The fundamental question: how is data transferred through the?. Network as a graph. Resources: Links: Bandwidth (bit/sec) Multiplexing: how different flows* can share the same link Nodes: Processing capability Switching: forward data from the incoming interface to the proper outgoing interface * flow (end-to-end data stream): the traffic relationship among a source host and a destination host
Link Multiplexing Static: link bandwidth divided into pieces (channels) each channel is allocated to a single flow Link multiplexing techniques: Time Division Multiplexing (TDM), Frequency Division Multiplexing (FDM)..
Link Multiplexing Dynamic: Link bandwidth not divided When using the link, the whole bandwidth is available Contentions among different flows Resource used as needed (temporary) Data packets (to make possible the flow identification into the )
Node forwarding Direct: Static multiplexing The forwarding action is pre-defined for each flow -> no processing of data at nodes Fixed delay Store and forward: Dynamic multiplexing The node has to process all the incoming packets Variable delay
The Network Core The fundamental question: how is data transferred through the? Circuit Switching: Static multiplexing Direct Forwarding Reservation procedure Example: telephone Packet Switching: Dynamic multiplexing Store and Forward Packet Header needed Example: Internet
Network Core: Packet Switching resource contention: aggregate resource demand can exceed amount available congestion: packets queue, wait for link use store and forward: packets move one hop at a time transmit over link wait turn at next link DELAYS
Node operations Incoming Interfaces Processing Buffer Transmission Buffer Node (Router)
Delay in packet-switched s packets experience delay on end-to-end path four sources of delay at each hop A transmission propagation nodal processing: check bit errors determine output link queueing time waiting at output link for transmission depends on congestion level of router B nodal processing queueing
Transmission and propagation Transmission delay: R=link bandwidth (bps) L=packet length (bits) time to send bits into link = L/R Propagation delay: d = length of link s = propagation speed in medium (~2x10 8 m/sec) propagation delay = d/s A transmission propagation B nodal processing queueing
Queueing delay R=link bandwidth (bps) L=packet length (bits) a=average packet arrival rate traffic intensity = La/R r r r La/R ~ 0: average queueing delay small La/R -> 1: delays become large La/R > 1: more work arriving than can be serviced, average delay infinite!
Statistical multiplexing A 10 Mbs Ethernet statistical multiplexing C B queue of packets waiting for output link 1.5 Mbs 45 Mbs D E Ability to efficiently use the resources
Packet switching versus circuit switching Packet switching allows more users to use! 1 Mbit link each user: 100Kbps when active active 10% of time circuit-switching: 10 users packet switching: with 35 users, probability > 10 active less that.004 N users 1 Mbps link
Network core: Circuit-like Switching End-end resources reserved for call dedicated resources: no sharing (for audio/video apps) circuit-like (guaranteed) performance call setup required (dedicated protocol: RSVP) virtual circuit : tag for packets identification (MPLS)
The (old) telephone Reservation procedure TDM Voice signal Ls = 8 bit Voice signal: (8kHz, 8 bit for sample)
The Transport Layer
Network Applications (1/2) Network Application: communicating, distributed processes running in hosts in user space exchange messages to implement app e.g., email, file transfer, the Web Application-layer protocols one piece of an app define messages exchanged by apps and actions taken user services provided by lower layer protocols application transport application transport application transport
Network Applications (2/2) A process is a program that is running within a host. Within the same host, two processes communicate with interprocess communication defined by the OS. Processes running in different hosts communicate with an application-layer protocol A user agent is an interface between the user and the application. Web:browser E-mail: mail reader streaming audio/video: media player
Client-server paradigm Typical app has two pieces: client and server Client: initiates contact with server ( speaks first ) typically requests service from server, for Web, client is implemented in browser; for e-mail, in mail reader Server: provides requested service to client e.g., Web server sends requested Web page, mail server delivers e-mail application transport request reply application transport
Transport services and protocols provide logical communication between app processes running on different hosts transport protocols run in end systems transport vs layer services: application transport layer: data transfer between end systems transport layer: data transfer between processes relies on, enhances, layer services application transport
Transport-layer protocols Transport protocols: User Datagram Protocol (UDP): unreliable ( besteffort ), unordered data delivery Transmission Control Protocol (TCP): reliable, inorder data delivery application transport congestion flow control connection setup application transport
Multiplexing/demultiplexing Multiplexing: gathering data from multiple app processes, enveloping data with header (later used for demultiplexing) Demultiplexing: delivering received segments to correct app layer processes segment header segment application-layer data Ht M Hn segment P1 M application transport P3 M receiver M application transport P4 M P2 application transport
Multiplexing/demultiplexing multiplexing/demultiplexing is based on sender, receiver port numbers, IP addresses source, dest port #s in each segment the port number identifies the process well-known port numbers for specific applications 16 bit 0-1023 (well-known) 1024-65535 available 32 bits source port # dest port # other header fields application data (message) TCP/UDP segment format
Multiplexing/demultiplexing: examples host A source port: x dest. port: 23 server B host C source port:23 dest. port: x connectionless Source IP: C Dest IP: B source port: y dest. port: 80 Source IP: C Dest IP: B source port: x dest. port: 80 host A Source IP: A Dest IP: B source port: x dest. port: 80 server B connection oriented
UDP: User Datagram Protocol [RFC 768] best effort service, UDP segments may be: lost delivered out of order to app connectionless: no handshaking between UDP sender, receiver each UDP segment handled independently of others Why is there a UDP? no connection establishment (which can add delay) simple: no connection state at sender, receiver small segment header no congestion control: UDP can blast away as fast as desired
UDP: more often used for streaming multimedia apps loss tolerant rate sensitive reliable transfer over UDP: add reliability at application layer application-specific error recover! Length, in bytes of UDP segment, including header 32 bits source port # dest port # length Application data (message) checksum UDP segment format
UDP checksum Goal: detect errors (e.g., flipped bits) in transmitted segment Sender: treat segment contents as sequence of 16-bit integers checksum: addition (1 s complement sum) of segment contents sender puts checksum value into UDP checksum field Receiver: compute checksum of received segment check if computed checksum equals checksum field value: NO - error detected YES - no error detected. But maybe errors nonethless? More later.