Utilisateur
uses network ex. spotify netflix
runs software to support applications ex. mobil, dator, server
relays messages between incominh and outgoing links ex wifi
connecting nodes ex kabel, radio kanal
http = protocol
www.chalmers.se = host
en/Pages/default.aspx = path
-The browser opens a connection to the server using Transmission Control Protocol (TCP)
-Applications are addressed using port numbers
-The web server software always listens to port 80
-The web browser use a temporary (ephemeral) port number
hypertext transfere protocol
DNS (domain name system)
TCP (transport control protocol)
• A protocol is a set of rules that determines how two or more communicating entities in the same layer interact
– Messages are sent and received
– Actions are based on events (e.g., sending or receiving messages, expiration of timers)
The purpose of a protocol is to provide a service to the layer above
node(layer(protocal)))
• Both HTTP and DNS are application layer protocols
• This means that HTTP and DNS provide communication services to application programs, e.g., web browsers, email clients, etc.
• HTTP and DNS use transport layer service (i.e., TCP) to provide services to application programs
• A layer
– provides a service to the layer above by using the services of the layer below
• Each layer operates according to a number of protocols
• A set of layers with protocols is called a protocol stack
– Open System Interconnection (OSI) model
• 7 layers, very influential, but not used in practice
– Internet reference model
• 5 (or 4) layers, empirical, heavily used in practice
7 6 5 4 3 2 1
7. Application Program = Provide services frequently needed by application programs
6. Presentation = Conversions between different data representations
5. Session = Dialog management, error recovery
4. Transport = End-to-end transfer of messages
3. Network = Transfer of packets over several links
2. Data Link = Transfer of frames over a single link
1. Physical = Transfer of bits over a physical channel
7. application, presentation, session
4. transport
3. network
2. data link
1. phusical
1. header with control information: addresses, sequence numbers, length fields, etc.
2. data field (payload) carrying the data from the layer above
3. sometimes a trailer with check bits for error control or other control information
Communicating entities on the same layer but at different nodes are called peer processes
Layer-n peer processes communicate by exchanging Protocol Data Units (PDUs)
Layer n + 1 transfers information by invoking the services provided by the layer just below it,
i.e., layer n
Services are available at Service Access Points (SAPs), which have unique identifiers
– Ex: an HTTP process passes information to/from a TCP process via a specific transport layer SAP called port 80
Each layer passes data and control information to the layer below it until the physical layer is reached and transfer of bits occurs
• The data received from the layer above is called a Service Data Unit (SDU)
SDUs are encapsulated in PDUs
message,
segment, message
packet, segment
frame, packet
bits, frame
(example TCP)
1. Create a logical connection between the layer-n SAPs at the end nodes: allocate buffers, agree
on transmission parameters, etc.
2. Transmit layer (n + 1) data, i.e., n-SDUs
3. Tear down connection when communication session is done: release buffers and allocated resources
(example IP)
– Simply transmit n-SDUs, without first connecting to the destination or even checking that it is
ready to receive data •
Important: the service type is not necessarily dependent on the lower layer service type. Ex: TCP, which is connection-oriented, runs on top of IP, which is connectionless
• A layer may impose an upper limit on the size of a data
block that it can transfer for implementation or other
reasons
• Thus, a layer-n PDU may be too large to be handled as
a single unit by layer-(n − 1) n-PDU 1 n-PDU 2
• Sender side: a SDU is fragmented over multiple PDUs
• Receiver side: the SDU is reassembled from a
sequence of PDUs
• Layer n fragmentation is transparent to layer n + 1
• A layer may impose a lower limit on the size of a data
block that it can transfer for efficiency, implementation
or other reasons
• Thus, a layer-n PDU may be too small to be handled as
a single unit by layer-(n − 1)
• Sender side: multiple SDUs are aggregated into a single PDUs
• Receiver side: the SDUs are deaggregated from a single
PDUs
• Layer n aggregation is transparent to layer n + 1
• A layer n service is shared by multiple layer-(n + 1) entities
• A multiplexing tag or ID is required in the n-PDU to determine which layer-(n + 1) user the SDU belongs to
• A layer-(n + 1) entity may use multiple layer-n services
• The parallel n-SDU streams are combined to a single stream of SDUs at the receiving end
• Sequence number may be required to order SDUs correctly
• Service provides
– Transfer of frames across a physical channel (wires, fibers, etc.)
• Specification of the physical aspects of a communications link
– Mechanical: cable, plugs, pins...
– Electrical/optical: modulation, signal strength, voltage levels, etc.
– Functional/procedural: how to activate, maintain, and deactivate physical link
• Service provides
– transfer blocks of bits, called packets over a link that connects two nodes directly or via a transparent switch
• Implements (depending on service provided)
– framing, i.e., a way to insert markers in a bit stream such start and end of a frame can be detected
– flow control, i.e., regulate transmission speed to avoid overwhelming a slow receiver
– error control via error-detecting and error-correcting codes – medium access, i.e., rules for sharing a medium that is common to many transmitters (radio,LAN)
– multiplexing of network layer entities – link layer addressing, typically flat (MAC address)
– activation, maintenance, deactivation of data link connections
• Service provides
– transfer of segments over multiple links or multiple networks
• Implements (depending on service provided)
– fragmentation and reassembly of segments
– transfer of packets over multiple links and networks
– a routing algorithm that together with other nodes determines routes across the network
– forwarding of packets across a node
– a scalable addressing scheme (typically hierarchal)
– flow control
– multiplexing of network layer entities
– congestion control (avoid too much traffic inside the network)
– connection setup, maintenance, and release of network connections
– internetworking, i.e., routing over several, possibly different, networks
• Service provided
– end-to-end transfer of application layer messages, e.g.,
• reliable stream transfer
• unreliable datagram transfer
• Implements (depending on service provided)
– message fragmentation and reassembly
– end-to-end transfer of segments
– multiplexing of application layer entities by port numbers
– sequence control to deliver messages in correct order
– error control to provide reliable transmission
– flow and congestion control
– connection setup, maintenance, and release
• Session layer: controls in which manner data is transmitted, e.g., certain application might require half-duplex dialogs (take turns transmitting)
• Presentation layer: provides machine-independent representations of data (e.g., different character codes)
• Typically, the session and presentation layers are absorbed into the application layer
• The application layer provides useful services for application programs, e.g.,
– File transfer (e.g., FTP)
– Remote login (e.g., SSH)
– Transfer of emails (SMTP)
– Information about Internet names (DNS)