Download presentation
Published byGladys Byrd Modified over 9 years ago
1
Definitions Protocol (1) An agreement between the communicating parties on how communication is to proceed. (2) A set of rules that governs how two or more communicating entities in a layer are to interact. Protocol Stack A list of the protocols used by a certain system, one protocol per layer. Peers The entities comprising the corresponding layers on different machines. CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
2
Why Layers? Layering simplifies design, implementation, and testing by partitioning overall communications process into parts Protocol in each layer can be designed separately from those in other layers Protocol makes “calls” for services from layer below Layering provides flexibility for modifying and evolving protocols and services without having to change layers below Monolithic non-layered architectures are costly, inflexible, and soon obsolete CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
3
Protocol Layers (1) Protocol layering is the main structuring method used to divide up network functionality. Each protocol instance talks virtually to its peer Each layer communicates only by using the one below Lower layer services are accessed by an interface At bottom, messages are carried by the medium CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
4
Protocol Layers (2) Example: the philosopher-translator-secretary architecture Each protocol at different layers serves a different purpose CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
5
Protocol Layers (3) Each lower layer adds its own header (with control inform- ation) to the message to transmit and removes it on receive Layers may also split and join messages, etc. CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
6
Example: HTTP HTTP is an application layer protocol
Retrieves documents on behalf of a browser application program HTTP specifies fields in request messages and response messages Request types; Response codes Content type, options, cookies, … HTTP specifies actions to be taken upon receipt of certain messages CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
7
HTTP Protocol HTTP Client HTTP Server
HTTP assumes messages can be exchanged directly between HTTP client and HTTP server In fact, HTTP client and server are processes running in two different machines across the Internet HTTP uses the reliable stream transfer service provided by TCP GET HTTP Client HTTP Server Response CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
8
Example: TCP TCP is a transport layer protocol
Provides reliable byte stream service between two processes in two computers across the Internet Sequence numbers keep track of the bytes that have been transmitted and received Error detection and retransmission used to recover from transmission errors and losses TCP is connection-oriented: the sender and receiver must first establish an association and set initial sequence numbers before data is transferred Connection ID is specified uniquely by (send port #, send IP address, receive port #, receiver IP address) CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
9
HTTP using the TCP service
server HTTP client Response GET Port 80 Port 1127 TCP 80, 1127 GET 1127, 80 bytes Response TCP GET Response TCP CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
10
Design Issues for the Layers
Each layer solves a particular problem but must include mechanisms to address a set of recurring design issues Issue Example mechanisms at different layers Reliability despite failures Codes for error detection/correction (§3.2, 3.3) Routing around failures (§5.2) Network growth and evolution Addressing (§5.6) and naming (§7.1) Protocol layering (§1.3) Allocation of resources like bandwidth Multiple access (§4.2) Congestion control (§5.3, 6.3) Security against various threats Confidentiality of messages (§8.2, 8.6) Authentication of communicating parties (§8.7) The point is that there are some issues that are not wholly the responsibility of any one layer, and they crop up again and again in the text. For example, reliability is often considered a key function of the transport layer (i.e., making transport reliable) yet reliability mechanisms also appear in other layers (error codes in the link layer, routing around failures in the network layer, and replication at the application layer). CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
11
Connection-Oriented vs. Connectionless
Service provided by a layer may be kinds of either: Connection-oriented, must be set up for ongoing use (and torn down after use), e.g., phone call Connectionless, messages are handled separately, e.g., postal delivery TCP provides a reliable bytestream service at the Transport layer, IP provides unreliable datagram service at the Network layer. More examples: RTP (used to carry VoIP data) provides unreliable connection service; (WiFi) provides acknowledged datagram service; Ethernet provides unreliable datagram service. CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
12
Service Primitives (1) A service is provided to the layer above as primitives Hypothetical example of service primitives that may provide a reliable byte stream (connection-oriented) service: CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
13
Service Primitives (2) Hypothetical example of how these primitives may be used for a client-server interaction Client Server LISTEN (0) ACCEPT RECEIVE SEND (4) DISCONNECT (6) CONNECT (1) SEND DISCONNECT (5) Connect request Accept response Request for data Reply Disconnect (2) (3) The primitives are called at the client and server by the higher layer using the service. The layer implements the primitives by sending messages using the services of the lower layer; these messages are assumed to be reliable for simplicity and the lower layer service is not otherwise described. This is similar to the way that simple Web browsers and Web servers work today. CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
14
Relationship of Services to Protocols
Recap: A layer provides a service to the one above [vertical] A layer talks to its peer using a protocol [horizontal] CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
15
OSI Reference Model A principled, international standard, seven layer model to connect different systems – Provides functions needed by users – Converts different representations – Manages task dialogs – Provides end-to-end delivery – Sends packets over multiple links – Sends frames of information – Sends bits as signals CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
16
7-Layer OSI Reference Model
Application Application End-to-End Protocols Application Layer Application Layer Presentation Layer Presentation Layer Session Layer Session Layer Transport Layer Transport Layer Network Layer Network Layer Network Layer Network Layer Data Link Layer Data Link Layer Data Link Layer Data Link Layer Physical Layer Physical Layer Physical Layer Physical Layer Communicating End Systems CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
17
Physical Layer Transfers bits across link
Definition & specification of the physical aspects of a communications link Mechanical: cable, plugs, pins... Electrical/optical: modulation, signal strength, voltage levels, bit times, … functional/procedural: how to activate, maintain, and deactivate physical links… Ethernet, DSL, cable modem, telephone modems… Twisted-pair cable, coaxial cable optical fiber, radio, infrared, …
18
Data Link Layer Transfers frames across direct connections
Groups bits into frames Detection of bit errors; Retransmission of frames Activation, maintenance, & deactivation of data link connections Medium access control for local area networks Flow control frames Data Link Layer Data Link Layer bits Physical Layer Physical Layer
19
Network Layer Transfers packets across multiple links and/or multiple networks Addressing must scale to large networks Nodes jointly execute routing algorithm to determine paths across the network Forwarding transfers packet across a node Congestion control to deal with traffic surges Connection setup, maintenance, and teardown when connection-based
20
Transport Layer Transfers data (segments or datagrams) end-to-end from process in a machine to process in another machine Reliable stream transfer or quick-and-simple single-block transfer Port numbers enable multiplexing Message segmentation and reassembly Connection setup, maintenance, and release Transport Layer Transport Layer Network Layer Network Layer Network Layer Network Layer Communication Network
21
Application & Upper Layers
Application Layer: Provides services that are frequently required by applications: DNS, web acess, file transfer, … Presentation Layer: machine-independent representation of data… Session Layer: dialog management, recovery from errors, … Application Layer Transport Application Layer Presentation Session Transport Incorporated into Application Layer
22
Headers & Trailers Each protocol uses a header that carries addresses, sequence numbers, flag bits, length indicators, etc… CRC check bits may be appended for error detection Application Application APP DATA Application Layer Application Layer AH APP DATA Transport Layer Transport Layer TH AH APP DATA Network Layer Network Layer NH TH AH APP DATA Data Link Layer Data Link Layer DH NH TH AH APP DATA CRC Physical Layer Physical Layer bits
23
TCP/IP Reference Model
A four layer model derived from experimentation; omits some OSI layers and uses the IP as the network layer. IP is the “narrow waist” of the Internet Network NIC The comment about the narrow waist refers to the fact that the network layer of the Internet is IP (Internet Protocol) such that the network layer is called the “Internet” layer. The significance is that all Internet devices speak IP, which provides a point of interoperability that enables innovation both above (new applications and transports) and below (new link technologies). Protocols are shown in their respective layers CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
24
Model Used in this Book It is based on the TCP/IP model but we call out the physical layer and look beyond Internet protocols. Port Numbers IP Address NIC MAC Address (eg. Ethernet Address) CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
25
TCP/IP Protocol Suite Distributed applications User
HTTP SMTP DNS RTP Distributed applications Reliable stream service User datagram service TCP UDP Best-effort connectionless packet transfer IP (ICMP, ARP) Network interface 1 Network interface 2 Network interface 3 Diverse network technologies
26
Critique of OSI & TCP/IP
Very influential model with clear concepts Models, protocols and adoption all bogged down by politics and complexity TCP/IP: Very successful protocols that worked well and thrived Weak model derived after the fact from protocols CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.