Communication Networks NETW 501 Lecture 2 Network Architecture

  • Slides: 24
Download presentation
Communication Networks NETW 501 Lecture 2 Network Architecture: OSI Reference Model Course Instructor: Dr.

Communication Networks NETW 501 Lecture 2 Network Architecture: OSI Reference Model Course Instructor: Dr. -Ing. Maggie Mashaly maggie. ezzat@guc. edu. eg C 3. 220 1

Layers and Protocols Fundamental idea: • A piece of software/hardware provides a service to

Layers and Protocols Fundamental idea: • A piece of software/hardware provides a service to its users but keeps the details of its internal state and algorithms hidden from them Sounds familiar? ? • YES! • Used all the time in computer science & programming • E. g: Abstract data types, Data Encapsulation & Objectoriented programming Ø The same approach is implemented in networks Ø To reduce their design complexity, networks are organized as a stack of layers, each one built upon the one below it 2

Layers and Protocols • Function of each layer is to: 1. Offer certain services

Layers and Protocols • Function of each layer is to: 1. Offer certain services to the higher layers 2. Make use of services provided by underlying layers • For machines to communicate: Ø Layer n on one machine carries a conversation with layer n on another machine Ø Rules and conventions of this conversation are known as Layer n Protocol Ø Protocol: is an agreement between communicating parties on how communication is to proceed 3

Multilayer Communication 1. Guy 1 speaks only Urdu and English 3. Guy 1 passes

Multilayer Communication 1. Guy 1 speaks only Urdu and English 3. Guy 1 passes message to translator 4. Translator passes message to secretary for transmission 2. Guy 2 speaks only Chinese and French Help of translators is needed! Translators agree on common language: Dutch 7. Translator translates message, forwards it to Guy 2 6. Secretary passes message to translator 5. Message sent through fax 4

The OSI Reference Model How communication occurs? Ø In reality, no data are directly

The OSI Reference Model How communication occurs? Ø In reality, no data are directly transferred from layer n on one machine to layer n on another machine Ø Instead, each layer passes data and control information to the layer immediately below it, until the lowest layer is reached Ø Lowest layer is the Physical Layer, through which communication actually occurs 5

Physical Layer • Function: Transfer of bits across communication link • Transmission Medium –

Physical Layer • Function: Transfer of bits across communication link • Transmission Medium – – – Twisted-Pair cable Coaxial Cable Optical Fiber Radio Satellite Infrared • 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… 6

Data Link Layer • Function: - Divides data into Frames - Responsible for detecting

Data Link Layer • Function: - Divides data into Frames - Responsible for detecting /correcting transmission errors • Two Sub-Layers 1. Medium Access Control (MAC) 2. Logical Link Control (LLC) Network LLC MAC Data Link Layer Physical 7

1. Medium Access Control (MAC) What problems does MAC sub-layer handle? 1. Contention –

1. Medium Access Control (MAC) What problems does MAC sub-layer handle? 1. Contention – Two or more nodes want to transmit over the same medium at the same time 2. Medium Access Control – Defines the rules for accessing the medium – Common MAC Schemes › › Token Passing Random Access Reservation Carrier Sense Multiple Access (with Collision Detection) CSMA/CD 8

2. Logical Link Control (LLC) What problems does LLC sub-layer handle? 1. Detection of

2. Logical Link Control (LLC) What problems does LLC sub-layer handle? 1. Detection of bit errors; Retransmission of frames 2. Correction of bit errors 3. Flow Control 4. Simplest Error Detection: Parity Checks – Even Parity : Sum of 1 s is even – Odd Parity : Sum of 1 s is odd 1011000 LLC 10110001 Single Error Detected Ask for Retransmission LLC 10110101 Even Parity Assumed 1011000 LLC 10110001 Double Error Goes undetected LLC 10100101 Even Parity Assumed 9

Network Layer Functions of Network Layer: 1. Routing - Transfers packets across multiple links

Network Layer Functions of Network Layer: 1. Routing - Transfers packets across multiple links and/or multiple networks - Nodes jointly execute routing algorithm to determine paths across the network 2. Addressing - Each node in the network must have its own unique address (IP address) - Must scale to large networks 3. Congestion Control - To deal with traffic surges 10

Routing Example B D 5 7 9 4 F 3 A 5 7 6

Routing Example B D 5 7 9 4 F 3 A 5 7 6 6 C Route Cost A B F 13 A B D F 16 A B E F 12 A C F 13 A C E F 17 E 11

Issues in Routing Requirements for efficient routing algorithms: 1. Computation of routes - What

Issues in Routing Requirements for efficient routing algorithms: 1. Computation of routes - What are possible routes from source to destination 2. Cope with dynamic changes in costs - Links might fail or their cost might increase/decrease 3. Avoid congestion - Since a good route may attract a lot of traffic and overload the computers on it 4. Avoid route oscillations - To guarantee that all data is sent on one route 12

Transport Layer Functions of Transport Layer: 1. Provide a reliable and efficient network connection

Transport Layer Functions of Transport Layer: 1. Provide a reliable and efficient network connection 2. Allowing the upper three layers to operate independent of underlying networks 3. Deals with – Packet loss – Packet Delay – Packet reordering 4. Performs flow control and buffering 5. Port numbers enable multiplexing Message segmentation and reassembly 6. Connection setup, maintenance, and release 13

Session Layer Functions of Session Layer: 1. Establishes and maintains a session between two

Session Layer Functions of Session Layer: 1. Establishes and maintains a session between two end-users 2. Dialog management – Full duplex – Half Duplex 3. In case of connection disruption during large file transfers. It enables the communication to resume from synchronization points What is the difference between the session layer and transport layer? – The session layer establishes the connection in conjunction with the application – Example: A video session might have multiple transport connections for › Video › Audio › Data (e. g. , captions, messages) 14

Presentation Layer • Different computers have different ways of representing the same information •

Presentation Layer • Different computers have different ways of representing the same information • The presentation layer establishes a common ground of communication Functions of Presentation Layer: 1. Data Compression – Decreasing as much as possible the amount of bits used to represent information 2. Security – If an un-authorized person intercepts the message, it is unintelligible 15

Application Layer Function of Application Layer: • Provides services that are frequently required by

Application Layer Function of Application Layer: • Provides services that are frequently required by applications • Example application layer residents – – E-mail File Transfer Protocol (FTP) Hypertext Transfer Protocol (HTTP) Telnet 16

Headers & Trailers Data Application Presentation Session Transport Network Data Link Physical Application AH

Headers & Trailers Data Application Presentation Session Transport Network Data Link Physical Application AH Data Presentation PH AH Data Session SH PH AH Data Transport TH SH PH AH Data Network NH TH SH PH AH Data DH NH TH SH PH AH Data CRC Bit stream Data Link Physical › Each protocol uses a header that carries addresses, sequence numbers, flag bits, length indicators, etc… › CRC check bits may be appended for error detection 17

Peer-to-Peer Communications Layer n+1 entity n-SDU n-SAP n-SDU n-PDU n-SDU H n-SAP Layer n

Peer-to-Peer Communications Layer n+1 entity n-SDU n-SAP n-SDU n-PDU n-SDU H n-SAP Layer n entity H n-SDU n-PDU SDU: Service Data Unit PDU: Protocol Data SAP: Service Access Point 18

Peer-to-Peer Communications: Protocol • Layer n in one machine interacts with layer n in

Peer-to-Peer Communications: Protocol • Layer n in one machine interacts with layer n in another machine to provide a service to layer n+1 • The entities comprising the corresponding layers on different machines are called peer processes. • The machines use a set of rules and conventions called the layer-n protocol. • Layer-n peer processes communicate by exchanging Protocol Data Units (PDUs) 19

Peer-to-Peer Communications: Protocol • Communication between peer processes is virtual and actually indirect •

Peer-to-Peer Communications: Protocol • Communication between peer processes is virtual and actually indirect • Layer n+1 transfers information by invoking the services provided by layer n • Services are available at Service Access Points (SAP’s) • Each layer passes data & control information to the layer below it until the physical layer is reached and transfer occurs • The data passed to the layer below is called a Service Data Unit (SDU) • SDU’s are encapsulated in PDU’s 20

Connection-Oriented & Connectionless Services • Connection-Oriented – Established in threephases: 1. Connection setup between

Connection-Oriented & Connectionless Services • Connection-Oriented – Established in threephases: 1. Connection setup between two SAPs to initialize state information 2. SDU transfer 3. Connection release – • Connectionless – Immediate SDU transfer – No connection setup – E. g. UDP, IP E. g. TCP, ATM Ø Layered services need not be of same type! e. g. : TCP operates over IP, IP operates over ATM 21

Segmentation & Reassembly • A layer may impose a limit on the size of

Segmentation & Reassembly • A layer may impose a limit on the size of a data block that it can transfer for implementation or other reasons • Thus a layer-n SDU may be too large to be handled as a single unit by layer-(n-1) Segmentation n-SDU n-PDU Re-assembly • Sender side: SDU is segmented into multiple PDUs • Receiver side: multiple PDUs are re-assembled into one SDU n-PDU 22

Multiplexing Layer n+1 entity n-SAP n-PDU n-SDU H n-SAP Layer n+1 entity n-SAP Layer

Multiplexing Layer n+1 entity n-SAP n-PDU n-SDU H n-SAP Layer n+1 entity n-SAP Layer n entity H n-SDU n-PDU • Sharing of layer n service by multiple layer n+1 users • Multiplexing tag or ID required in each PDU to determine which user an SDU belongs to 23

References • NETW 501 Lectures slides by Assoc. Prof. Tallal El-Shabrawy • “Communication Networks

References • NETW 501 Lectures slides by Assoc. Prof. Tallal El-Shabrawy • “Communication Networks 2 nd Edition”, A. Leon-Garcia and I. Widjaja, Mc. Graw Hill, 2013 • “Computer Networks 4 th Edition”, A. S. Tanenbaum, Pearson International 24