THE OSI REFERENCE MODEL NIRMAL KANTI DEBNATH INTRODUCTION
THE OSI REFERENCE MODEL NIRMAL KANTI DEBNATH
INTRODUCTION In order to reduce computer networks design complexity, they are organized as a series of layers, each one built upon its predecessor. The OSI Reference Model is based on a proposal developed by the International Organization for Standardization (ISO). The model is called ISO OSI (Open Systems Interconnection) Reference Model because it deals with connecting open systems - that is, systems that are open for communication with other systems. NIRMAL 2
THE APPLIED PRINCIPLES The principles that were applied to arrive at the seven layers: 1. A layer should be created where a different level of abstraction is needed. Each layer should perform a well defined function. The function of each layer should be chosen with an eye toward defining internationally standardized protocols. The layer boundaries should be chosen to minimize the information flow across the interfaces. The number of layers should be large enough that distinct functions need not be thrown together in the same layer out of necessity, and small enough that the 3 architecture does not become unwieldy. 2. 3. 4. 5. NIRMAL
NETWORK ARCHITECTURE 4 NIRMAL
THE PHYSICAL LAYER This layer is concerned with two things: bits and signals. Functions: � controls the actual transmission of ones and zeros. � ensures that when the sender transmits a signal that is a 1, the receiver receives that signal as a 1. � decides exactly how many volts equal a binary 1 or a binary 0. � establishes how long a signal needs to be in duration to be considered a valid 1 or 0. � decides whether or not communications can proceed in both directions simultaneously, or only one direction at a time. � decides how many wire pairs are needed for a given type of network, the required quality of the wire, etc. 5 NIRMAL
THE PHYSICAL LAYER – CONT. This layer receives frames of data from Layer 2, the Data Link Layer, and sends them out onto the transmission media as a serial stream of ones and zeros. It receives ones and zeros from the transmission media, and sends them up to Layer 2 so they can be assembled into frames. Informally, the physical transmission media tends to be called Layer zero. 6 NIRMAL
THE DATA LINK LAYER Main NIRMAL task - to supply the network layer a free of transmission errors link. The sender breaks the input data up into data frames, transmit the frames sequentially, and processes the acknowledgment frames sent back by the receiver. Since the physical layer accepts and transmits a stream of bits without any regard to meaning of structure, it is up to the data link layer to create and recognize frame boundaries. 7
THE DATA LINK LAYER – CONT. When receiving a frame, it ensures the contents of the frame arrived with the correct content. A noise burst on the line can destroy a frame, in this case, the data link layer on the source machine must retransmit the frame. Multiple transmissions of the same frame introduce the possibility of duplicate frames. It is up to this layer to solve the problems caused by damaged, lost, and duplicate frames. 8 NIRMAL
THE NETWORK LAYER The NIRMAL network layer is concerned with controlling the operation of the subnet. A key design issue is determining how packets are routed from source to destination. Routes could be based on static tables that are "wired into" the network and rarely changed. They could also be determined at the start of each conversation, for the data transfer of this conversation. They could be highly dynamic, being determined anew for each packet, to reflect the current network load. 9
THE TRANSPORT LAYER The basic function of the transport layer, is to accept data from the session layer, split it up into smaller units if needed, pass these to the network layer, and ensure that the pieces all arrive correctly at the other end. On the other hand, it gets data from the network layer, union the pieces if they were split and pass them to the session layer. NIRMAL 10
THE TRANSPORT LAYER – CONT. It determines what type of service to provide to the users of the network. point-to-point channel in-order packets etc. NIRMAL error-free The type of service is determined when the connection is established. 11
THE TRANSPORT LAYER – CONT. The transport layer is a true source-to-destination or end-to-end layer. Hosts are multi-programmed - multiple connections entering and leaving each host. There must be a way to determine which message belongs to which connection. This information appears in the transport header. NIRMAL 12
THE TRANSPORT LAYER – CONT. The NIRMAL transport layer must take care of establishing and deleting connections across the network. This requires some kind of naming mechanism, so that process on one machine has a way of describing with whom it wishes to converse. There must also be a mechanism to regulate the flow of information, so that a fast host cannot overrun a slow one. The flow control at the host level is different from the flow control at the subnet level, but similar principles are implemented. 13
THE SESSION LAYER The NIRMAL session layer allows users on different machines to establish sessions between them. One of the services of the session layer is to manage dialogue control. Sessions can allow traffic to go in both directions at the same time, or in only one direction at a time. If traffic can only go one way at a time, the session layer can help keep track of whose turn it is. 14
THE SESSION LAYER – CONT. A related session service is token management. For some protocols, it is essential that both sides do not attempt the same operation at the same time. To manage these activities, the session layer provides tokens that can be exchanged. Only the side holding the token may perform the critical operation. NIRMAL 15
THE PRESENTATION LAYER The presentation layer is concerned with the syntax and semantics of the information transmitted. Programs exchange things such as people's names, dates, amounts of money, etc. These items are represented as character strings, integers, floating point numbers, and data structures composed of several simpler items. Different computers have different codes for representing character strings, integers and so on, so there must be standard encoding. Other aspects: NIRMAL data compression - reduce the number of transmitted bits cryptography - privacy and authentication. 16
THE APPLICATION LAYER The layer that we are most used. The 'application' in Application Layer is not the actual user application, such as Netscape, or Out. Look, it is the application of the network for those applications, such as e-mail, FTP, HTTP, etc. For example, to get new mail, an e-mail application would create an Application Layer request for POP 3 services. This request is then processed through all the lower layers to the network, and up through the layers at the server. 17 NIRMAL
DATA TRANSMISSION NIRMAL 18
TCP/IP MODEL NIRMAL
TCP/IP REFERENCE MODEL 20 NIRMAL
PACKET FORMAT NIRMAL 21
HYBRID MODEL The hybrid reference model: NIRMAL 22
THE APPLICATION LAYER The higher level protocols include the session and presentation layer details. The application layer handles high-level protocols, issues of representation, encoding, and dialog control. This model combines all application-related issues into one layer, and assures this data is properly packaged for the next layer. NIRMAL 23
THE TRANSPORT LAYER This layer deals with the quality-of-service issues of reliability, flow control, and error correction. One of its protocols, the transmission control protocol (TCP), provides excellent and flexible ways to create reliable, well-flowing, low-error network communications. TCP is a connection-oriented protocol. Another protocol at this layer is UDP (which is connectionless). NIRMAL 24
THE INTERNET/NETWORK LAYER The NIRMAL purpose of the Network layer is to send source packets from any network on the internetwork and have them arrive at the destination independent of the path and networks they took to get there. The specific protocol that governs this layer is called the Internet protocol (IP). Think of it in terms of the postal system: When you mail a letter, you do not know how it gets there (there are various possible 25 routes), but you do care that it arrives.
ROUTING Goal: determine “good” path (sequence of routers) through network from source to destination. graph nodes are routers graph edges are physical links link 5 2 A B 2 1 D 3 C 3 1 5 F 1 E 2 cost: delay, $ cost, or congestion level. good” path: typically NIRMAL means minimum cost path. 26
DATA LINK LAYER The main tasks of the data link layer are: � Transfer data from the network layer of one Networks: All stations share a single communication channel Point-to-Point Networks: Pairs of hosts (or routers) are directly connected Typically, local area networks (LANs) are broadcast and wide area networks (WANs) are point-to-point NIRMAL machine to the network layer of another machine � Convert the raw bit stream of the physical layer into groups of bits (“frames”) Broadcast 27
THE INTERNET NIRMAL
WHAT’S THE INTERNET: “NUTS AND BOLTS” VIEW router server workstation mobile NIRMAL millions of connected computing devices: hosts = end systems running network apps communication links local ISP fiber, copper, radio, satellite transmission rate = bandwidth regional ISP routers: forward packets (chunks of data) company network 29
WHAT’S THE INTERNET: “NUTS AND BOLTS” VIEW protocols control sending, receiving of msgs e. g. , TCP, IP, HTTP, FTP, Internet: “network of networks” server mobile local ISP hierarchical regional ISP public Internet versus private intranet workstation NIRMAL PPP router Internet standards RFC: Request for comments company network 30
WHAT’S A PROTOCOL? network protocols: machines rather than humans all communication activity in Internet governed by protocols define format, order of msgs sent and received among network entities, and actions taken on msg transmission, receipt NIRMAL human protocols: introductions … specific msgs sent … specific actions taken when msgs received 31
WHAT’S A PROTOCOL? a human protocol and a computer network protocol: TCP connection req Hi NIRMAL Hi TCP connection response Got the time? Get http: //www. awl. com/kurose-ross 2: 00 <file> time 32
A CLOSER LOOK AT NETWORK STRUCTURE: network edge: applications and hosts network core: �routers �network of networks communication links: physical media 33 NIRMAL
THE NETWORK EDGE: end systems (hosts): run client/server model NIRMAL application programs e. g. Web, email at “edge of network” client host requests, receives service from always-on server e. g. Web browser/server; email client/server peer-peer model: minimal (or no) use of dedicated servers e. g. Gnutella, Ka. Za. A 34
NETWORK EDGE: CONNECTION-ORIENTED SERVICE Goal: data transfer between end systems handshaking: setup (prepare for) data transfer ahead of time Hello, TCP - Transmission Control Protocol connection-oriented service TCP service [RFC 793] reliable, in-order byte-stream data transfer loss: acknowledgements and retransmissions flow control: sender won’t overwhelm receiver congestion control: senders “slow down sending rate” when network congested NIRMAL hello at human protocol set up “state” in two communicating hosts Internet’s 35
NETWORK EDGE: CONNECTIONLESS SERVICE Goal: data transfer between end systems same as before! connectionless unreliable data transfer no flow control no congestion control NIRMAL UDP - User Datagram Protocol [RFC 768]: App’s using TCP: HTTP (Web), FTP (file transfer), Telnet (remote login), SMTP (email) App’s using UDP: streaming media, teleconferencing, Internet telephony 36
THE NETWORK CORE Mesh of interconnected routers the fundamental question: how is data transferred through net? switching: dedicated circuit per call: telephone net packet-switching: data sent through net in discrete “chunks” NIRMAL circuit 37
NETWORK CORE: CIRCUIT SWITCHING E. g. link bandwidth dedicated resources: no sharing circuit-like guarantees performance call setup required NIRMAL End-end resources reserved for “call” 38
NETWORK CORE: CIRCUIT SWITCHING network resources (e. g. , bandwidth) divided into “pieces” NIRMAL pieces allocated to calls resource piece idle if not used by owning call (no sharing) dividing link bandwidth into “pieces” frequency division time division 39
CIRCUIT SWITCHING: FDM AND TDM Example: FDM 4 users NIRMAL frequency time TDM frequency 40 time
NUMERICAL EXAMPLE How All links are 1. 536 Mbps Each link uses TDM with 24 slots 500 msec to establish end-to-end circuit Transmission rate: Transmission time: Total time: NIRMAL long does it take to send a file of 640, 000 bits from host A to host B over a circuit-switched network? 1. 535 Mbps / 24 = 64 kbps 640, 000 bits / 64 kbps = 10 sec + 500 msec = 10. 5 sec 41
NETWORK CORE: PACKET SWITCHING NIRMAL each end-end data stream divided into packets users packets share network resources each packet uses full link bandwidth resources used as needed 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 Node receives complete packet before forwarding 42
PACKET SWITCHING: STATISTICAL MULTIPLEXING 10 Mb/s Ethernet A C NIRMAL B statistical multiplexing 1. 5 Mb/s queue of packets waiting for output link D E Sequence of A & B packets does not have fixed pattern � statistical multiplexing. 43
PACKET SWITCHING VERSUS CIRCUIT SWITCHING Packet switching allows more users to use network! 1 Mb/s link each user: 100 kb/s when “active” active 10% of time circuit-switching: 10 users packet switching: N users 1 Mbps link with 35 users, probability that > 10 active is less than. 0004 44 NIRMAL
PACKET SWITCHING VS. CIRCUIT SWITCHING Is packet switching a “winner? ” for bursty data resource sharing simpler, no call setup Excessive congestion: 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 NIRMAL Great 45
PACKET-SWITCHING: STORE-ANDFORWARD L R R Example: L = 7. 5 Mbits R = 1. 5 Mbps delay = 15 sec NIRMAL Takes L/R seconds to transmit (push out) packet of L bits on link of R bps Entire packet must arrive at router before it can be transmitted on next link: store and forward delay = 3 L/R R 46
PACKET-SWITCHED NETWORKS: FORWARDING Goal: destination address in packet determines next hop routes may change during session analogy: driving, asking directions virtual each NIRMAL move packets through routers from source to destination datagram network: circuit network: packet carries tag (virtual circuit ID), tag determines next hop fixed path determined at call setup time, remains fixed through call routers maintain per-call state 47
NETWORK TAXONOMY Circuit-switched networks FDM TDM NIRMAL Telecommunication networks Packet-switched networks Networks with VCs Datagram Networks 48
HOW DO LOSS AND DELAY OCCUR? packets queue in router buffers packet arrival rate to link exceeds output link capacity packets queue, wait for turn NIRMAL packet being transmitted (delay) A B packets queueing (delay) free (available) buffers: arriving packets dropped (loss) if no free buffers 49
FOUR SOURCES OF PACKET DELAY 1. processing: • 2. queueing bit errors determine output link – time waiting at output link for transmission – depends on congestion level of router NIRMAL check transmission A propagation B processing queueing 50
DELAY IN PACKET-SWITCHED NETWORKS transmission A 4. Propagation delay: d = length of physical link s = propagation speed in medium (~2 x 108 m/sec) propagation delay = d/s NIRMAL 3. Transmission delay: R=link bandwidth (bps) L=packet length (bits) time to send bits into link = L/R Note: s and R are very different quantities! propagation B processing 51 queueing
CARAVAN ANALOGY 100 km Cars toll booth “propagate” at 100 km/hr Toll booth takes 12 sec to service a car (transmission time) car~bit; caravan ~ packet Q: How long until caravan is lined up before 2 nd toll booth? toll booth Time NIRMAL ten-car caravan 100 km to “push” entire caravan through toll booth onto highway = 12*10 = 120 sec Time for last car to propagate from 1 st to 2 nd toll both: 100 km/(100 km/hr)= 1 hr A: 62 minutes 52
PACKET DELAY = processing delay typically dqueue a few microsecs or less = queuing delay depends dtrans = on congestion = transmission delay L/R, significant for low-speed links dprop a NIRMAL dproc = propagation delay few microsecs to hundreds of msecs 53
PACKET LOSS queue (buffer) preceding link in buffer has finite capacity when packet arrives to full queue, packet is dropped (lost) lost packet may be retransmitted by previous node, by source end system, or not retransmitted at all NIRMAL 54
- Slides: 54