Ch 16 Protocols and Layering

Slides:



Advertisements
Similar presentations
Answers of Exercise 7 1. Explain what are the connection-oriented communication and the connectionless communication. Give some examples for each of the.
Advertisements

Flow and Error Control. Flow Control Flow control coordinates the amount of data that can be sent before receiving acknowledgement It is one of the most.
TCP/IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet.
1 Fall 2005 Protocols and layering Qutaibah Malluhi Computer Science and Engineering Qatar University.
CSCI 4550/8556 Computer Networks
EE 4272Spring, 2003 Protocols & Architecture A Protocol Architecture is the layered structure of hardware & software that supports the exchange of data.
CS335 Networking & Network Administration Tuesday, April 20, 2010.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
TCP: Software for Reliable Communication. Spring 2002Computer Networks Applications Internet: a Collection of Disparate Networks Different goals: Speed,
Error Checking continued. Network Layers in Action Each layer in the OSI Model will add header information that pertains to that specific protocol. On.
SEPT, 2005CSI Part 2.2 Protocols and Protocol Layering Robert Probert, SITE, University of Ottawa.
CECS 474 Computer Network Interoperability Notes for Douglas E. Comer, Computer Networks and Internets (5 th Edition) Tracy Bradley Maples, Ph.D. Computer.
Process-to-Process Delivery:
ISO Layer Model Lecture 9 October 16, The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications.
1 Semester 2 Module 10 Intermediate TCP/IP Yuda college of business James Chen
1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
University of the Western Cape Chapter 12: The Transport Layer.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 2.5 Internetworking Chapter 25 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
The Transmission Control Protocol (TCP) Application Services (Telnet, FTP, , WWW) Reliable Stream Transport (TCP) Connectionless Packet Delivery.
COP 4930 Computer Network Projects Summer C 2004 Prof. Roy B. Levow Lecture 3.
Lecture 4 Overview. Ethernet Data Link Layer protocol Ethernet (IEEE 802.3) is widely used Supported by a variety of physical layer implementations Multi-access.
Institute of Technology Sligo - Dept of Computing Chapter 12 The Transport Layer.
Chapter 16 Protocols and Layering. Network Communication Protocol an agreement that specifies the format and meaning of messages computers exchange Network.
Page 12/9/2016 Chapter 10 Intermediate TCP : TCP and UDP segments, Transport Layer Ports CCNA2 Chapter 10.
1 Protocols and Protocol Layering. 2 Protocol Agreement about communication Specifies –Format of messages –Meaning of messages –Rules for exchange –Procedures.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Protocols and layering Network protocols and software Layered protocol suites The OSI 7 layer model Common network design issues and solutions.
Roadmap  Introduction to Basics  Computer Network – Components | Classification  Internet  Clients and Servers  Network Models  Protocol Layers.
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
What is a Protocol A set of definitions and rules defining the method by which data is transferred between two or more entities or systems. The key elements.
Chapter 5 Network and Transport Layers
The Transport Layer Implementation Services Functions Protocols
2.10 Flow and Error Control Before that ...
Lecture (2).
Data Link Layer Flow Control.
March 21, 2001 Recall we have talked about the Sliding Window Protocol for Flow Control Review this protocol A window of size I can contain at most I.
Part III Datalink Layer 10.
(Ownership, Service Paradigm, Measures of Performance)
Chapter 5 Network and Transport Layers
Click to edit Master subtitle style
Process-to-Process Delivery, TCP and UDP protocols
PART 5 Transport Layer Computer Networks.
Understand the OSI Model Part 2
6 Transport Layer Computer Networks Tutun Juhana
Instructor Mazhar Hussain
Protocols and Layering
CIS 321 Data Communications & Networking
Flow Control.
Transport Layer Unit 5.
Flow and Error Control.
Process-to-Process Delivery:
Dr. John P. Abraham Professor UTPA
CS4470 Computer Networking Protocols
Dr. John P. Abraham Professor UTPA
Lecture 2: Overview of TCP/IP protocol
CPEG514 Advanced Computer Networkst
1 TRANSMISSION CONTROL PROTOCOL / INTERNET PROTOCOL (TCP/IP) K. PALANIVEL Systems Analyst, Computer Centre Pondicherry University, Puducherry –
Protocols and Protocol Layering
OSI Reference Model Unit II
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Lecture 4 Peer-to-Peer Protocols and Data Link Layer
Process-to-Process Delivery: UDP, TCP
Computer Networks Protocols
Protocols and Protocol Layering
The TCP/IP Model.
OSI Model 7 Layers 7. Application Layer 6. Presentation Layer
Error Checking continued
Transport Layer 9/22/2019.
Presentation transcript:

Ch 16 Protocols and Layering Spring 2003

Motivation Explains why hardware along does not solve all communication problems, and shows why protocol software is also need Describes the concept of layering

The Need for Protocols Communication hardware can transfer bits from point to another Many problems can occur Bits corrupted or destroyed Entire packet lost Packet duplicated Packets delivered out of order

The Need for Protocols Software handles low-level communication details and problems Protocol is a set of rules to be used when exchanging messages Most AP do not interact with net HW directly AP HW Protocol

Protocol Specifies Format of messages Meaning of messages Rules for exchange Procedure for handling problems

Protocol Suites Each protocol solves part of communication problem Work well together; known as protocol suite /w/ Make each protocol easier to design, analyze, implement, and test AP AP P1 Protocol … HW HW

A Plan for Protocol Design Layering model Vertically divides protocols into layers Each layer devoted to one subproblem To help protocol designers understand subparts of the communication problem E.g.: ISO 7-layer reference model

The Seven Layers LAN

The Seven Layers Layer 1: Physical Layer 2: Data Link Layer 3: Network Gives the detailed spec. of underlying hardware Layer 2: Data Link Specify hardware frame format, medium access, and checksum computation Layer 3: Network Specify address assignment and packet forwarding Layer 4: Transport Specify how to handle details of reliable transfer

The Seven Layers Layer 5: Session Layer 6: Presentation Specifications for session establishment and security details Layer 6: Presentation Data representation and the translation Layer 7: Application Define how application programs, running on different end systems, pass messages to each other

Stacks: Layered Software Protocol software follows layering model One software module per layer Modules cooperate Incoming or outgoing data passes from one module to another Entire set of modules known as stack

Data Encapsulation

Data Encapsulation L7 L4 Segment L3 Datagram L2 Frame FTP HTTP Telnet Port 21 80 25 L4 TCP UDP TCP header Segment ICMP IGMP L3 IP IP header Datagram ARP RARP L2 MAC discard Ethernet header Frame Ethernet header IP TCP

Data Encapsulation Each layer Places additional information in a header before sending data to a lower layer Uses, and then removes, the header to process incoming packets (e.g., L2 checksum)

Data Encapsulation Port number An AP can be uniquely identified by (IP address, port number) pair Assigned ranges Numbers below 255 are for public applications Numbers from 255 to 1023 are assigned to companies for marketable applications Numbers above 1023 are unregulated Bind: creates mapping between an AP and a port number

Nested Packet Headers

Scientific Basis for Layering Software implementing layer N at the destination receives exactly the message sent by software implementing layer N at the source

Layering Principle: peer-to-peer

Techniques Protocols Use For bit corruption Parity bit Frame checksum CRC For out-of-order delivery Sequence numbers For lost packets Positive acknowledgement (ACK) and retransmission for time-out Max. number of try 4 3 2 1 Ack1

Techniques Protocols Use Duplication Sequence numbers For replay (excessive delay) A termination request arrives from an previous conversation may terminate a current conversation Unique session ID For data overrun Flow control Bye

Flow Control Needed because Related to buffering Two forms Sending computer system faster than receiving computer Sending application faster than receiving application Related to buffering Two forms Stop-and-go Sliding window

Stop-And-Go Sending Side Receiving side Inefficient Transmits one packet Waits for signal from receiver Receiving side Receives and consumes packets Transmits signal to sender Inefficient

Sliding Window Flow Control 1 car v.s. 4 cars

Sliding Window Flow Control

Sliding Window Flow Control Receiving side Establishes multiple buffers and informs sender Sending side Transmits packets for all available buffers Only waits if no signal arrives before transmission Sends signals as packets arrive Window tells how many packets can be sent Window moves as acknowledgements arrive

Comparison of Flow Control Stop-and-go Slow Useful only in special cases Sliding window Fast Needed in high-speed network

Why Sliding Window? Simultaneously Speedup Tw = min(B, TG  W) where Increase throughput Control flow Speedup Tw = min(B, TG  W) where TW is sliding window throughput B is underlying hardware bandwidth TG is stop-and-go throughput W is the window size

Congestion Fundamental problem in networks Caused by traffic, not hardware failure Analogous to congestion on a highway Principal cause of delay

Illustration of Architecture That Can Experience Congestion Multiple sources Bottleneck

Congestion and Loss Modern network hardware works well; most packet loss results from congestion, not from hardware failure Rate control (e.g. temporarily reducing WS)

The Art of Protocol Design Protocol Design is “nontrivial” Lots of Tradeoff Size of “Sequence number” field Balance between sliding window and congestion control

Exercise 16.4

Two Common Implementations of Sliding Window Protocol Go-Back-N Protocol Selective Repeat Protocol Source Address Destination Frame Number (K bits) ACK Type of Frame ..Data... CRC 02K-1 Frame number of a frame being acknowledged (piggybacking) Data/ACK/NACK

Go-Back-N receiver does not acknowledge each received frame explicitly Sender Receiver (0,1,2,3) 0(1,2,3) 0,1(2,3) 0,1,2(3) 0,1,2,3(-) ACK 3 (4,5,6,7) 4(5,6,7) ACK 5 1 2 3 4 5 4,5(6,7) (6,7,0,1) (0) (1) (2) (3) (4) (5) (6) Sequence number: 0-7 Window size=4 Sender buffers all frames in the windows frames are removed when ACKed

Go-Back-N (continued) receiver always expects to receive frames in order (2,3,4,5) Sender Receiver (0,1,2,3) 0(1,2,3) 0,1(2,3) 0,1,2(3) 0,1,2,3(-) ACK 1 2,3(4,5) 2,3,4(5) 1 2 3 (0) (1) (2) X discard 4 5 2,3,4,5(-) NAK 2 2(3,4,5) Sequence number: 0-7 Window size=4

Go-Back-N (continued) frame damaged Sender Receiver (0,1,2,3) 0(1,2,3) 0,1(2,3) 0,1,2(3) 0,1,2,3(-) ACK 1 2,3(4,5) 2,3,4(5) 1 2 3 3(4,5,6) (0) (1) (2) discard 4 5 3,4(5,6) 3,4,5(6) NAK 3 (3,4,5,6) Sequence number: 0-7 Window size=4

Go-Back-N (continued) Frame timer Sender Receiver (0,1,2,3) 0(1,2,3) 0,1(2,3) 0,1,2(3) ACK 1 1 2 (0) (1) (2) X Time out 3 4 5 (2,3,4,5) 2(3,4,5) 2,3(4,5) 2,3,4(5) 2,3,4,5(-) Sequence number: 0-7 Window size=4

Go-Back-N (continued) Out of order + time out Sender Receiver (0,1,2,3) 0(1,2,3) 0,1(2,3) 0,1,2(3) ACK 1 1 2 (0) (1) (2) X 3 discard Time out 4 (2,3,4,5) 2(3,4,5) 2,3(4,5) 2,3,4(5) NAK 2 Sequence number: 0-7 Window size=4

Go-Back-N (continued) ACK timer a frame arriving should be ACKed within a period of time use piggyback approach to ACK whenever possible send a separate ACK frame in lieu of the piggyback ACK

Go-Back-N (continued) Window size should be  2K-1 Station A Station B Send frames 0 through 7. t1 Receive frames 0 through 7 in order and send an acknowledgment for frames 7 t2 Window size=2K The piggyback acknowledgment gets delayed somewhere Assume the frames were lost and resend frames 0 through 7. Receive frames 0 through 7 Since the receiver was expecting these number,it accept them as new frames,not recognizing them as duplicate t3 t4

Go-Back-N (continued) Window size should be  2K-1 Station A Station B Send frames 0 through 6. t1 Receive frames 0 through 6 in order and send an acknowledgment for frames 6 t2 Window size=2K-1 The piggyback acknowledgment gets delayed somewhere Assume the frames were lost and resend frames 0 through 6. Receive frames 0 through 6 Since the receiver was expecting frame 7 it ignores them t3 t4

Selective Repeat Similarities to go-back-n Frame format sending window use piggyback ACK whenever possible not acknowledge every frame explicitly use NAKs for damaged frames and out-of-order frames Frame timer ACK timer

Selective Repeat (continued) Differences to go-back-n Buffer arriving frames in receiving window until all predecessors received Only the timed-out frame is resent when a frame timer expires When a NAK is received, resend just the frame specified by the NAK A piggyback ACK doesn’t necessary acknowledge the frame just received Receive sequential frames Sending Window size=3 Send frames Receiving Window size=3 7 7 6 1 6 1 5 2 5 2 4 3 4 3 Receive ACKs Receive sequential frames

Selective Repeat (continued) Frame lost Sender Receiver (0,1,2,3) 0(1,2,3) 0,1(2,3) 0,1,2(3) 0,1,2,3(-) ACK 1 2,3(4,5) 2,3,4(5) NAK 2 1 2 3 4 5 2,3,4,5(-) (1,2,3,4) (2,3,4,5) X 3 (buffered) 4 (buffered) 5 (buffered) (6,7,0,1) ACK 5 Sending Window size=4 Receiving Window size=4

Selective Repeat (continued) CRC error (0,1,2,3) (0,1,2,3) Sending Window size=4 0(1,2,3) Receiving Window size=4 1 0,1(2,3) 2 (1,2,3,4) 1 0,1,2(3) (2,3,4,5) 3 2 (CRC error) 0,1,2,3(-) ACK 1 3 (buffered) 4 NAK 2 2,3(4,5) 2,3,4(5) 2 4 (buffered) 2,3,4(5) 5 2 2,3,4,5(-) (5,6,7,0) 5 (6,7,0,1) Sender Receiver

Selective Repeat (continued) Receiving window size should be  2K-1 Station A Station B Receiving window size>2K-1 Send frames 0 through3 t1 Receive frames 0 through 3;advance window to include frames 4,5,6,7,and 0. t2 The acknowledgement gets lost. Assume the frames were lost and resend frames 0 through 3 t3 Receive frames 0 and assume incorrectly it is a new frame. t4 time time

Selective Repeat (continued) Receiving window size should be  2K-1 Station A Station B Receiving window size>2K-1 Receive frames 0 through 3 and advance window to include frames 4-7. Receive frame 4 and send an acknowledgment to A. Advance window again to include frames 5,6,7, and 0. Send frames 0 through 4 t1 t2 The acknowledgement gets lost. Assume the frames were lost and resend frames 0 through 4 t3 Receive frames 0 and assume incorrectly it is a new frame. t4 time time