SlideShare a Scribd company logo
1CMPE 150- Introduction to Computer Networks
CMPE 150
Fall 2005
Lecture 12
Introduction to Computer
Networks
2CMPE 150- Introduction to Computer Networks
Announcements
• TA office hours this week.
– Instead of tomorrow, they will be held Friday
1-2pm at E2 315.
• Book should be on reserve at S&E Library.
3CMPE 150- Introduction to Computer Networks
Last Class
• Layer 2 (Cont’d).
– Mechanisms for error control: ACKs/NACKs,
retransmissions, timers, etc.
– Flow control.
• Flow- versus congestion control.
• Types of flow control.
– Error detection and correction.
• Trade-offs.
• Hamming distance.
• Error detection mechanisms and examples.
• Error correction mechanisms and examples.
4CMPE 150- Introduction to Computer Networks
Reading Assignment
• Tanenbaum Chapter 3.
5CMPE 150- Introduction to Computer Networks
Today
• Error control (cont’d).
• Error + flow control.
6CMPE 150- Introduction to Computer Networks
Error Correction (Cont’d)
7CMPE 150- Introduction to Computer Networks
Hamming Code
• Bits in positions that are power of 2 are check
bits. The rest are data bits.
• Each check bit used in parity (even or odd)
computation of collection of bits.
– Example: check bit in position 11, checks for
bits in positions, 11 = 1+2+8. Similarly, bit 11
is checked by bits 1, 2, and 8.
8CMPE 150- Introduction to Computer Networks
Hamming Code: Example
7-bit
. Hamming codes can only correct single errors.
. But, to correct bursts of errors, send column by column.
9CMPE 150- Introduction to Computer Networks
Error Detecting Codes
• Typically used in reliable media.
• Examples: parity bit, polynomial codes (a.k.a.,
CRC, or Cyclic redundancy Check).
10CMPE 150- Introduction to Computer Networks
Polynomial Codes
• Treat bit strings as representations of
polynomials with coefficients 1’s and 0’s.
• K-bit frame is coefficient list of polynomial
with k terms (and degree k-1), from xk-1
to x0
.
– Highest-order bit is coefficient of xk-1
, etc.
– Example: 110001 represents x5
+ x4
+x0
.
• Generator polynomial G(x).
– Agreed upon by sender and receiver.
11CMPE 150- Introduction to Computer Networks
CRC
• Checksum appended to frame being
transmitted.
– Resulting polynomial divisible by G(x).
• When receiver gets checksummed frame, it
divides it by G(x).
– If remainder, then error!
12CMPE 150- Introduction to Computer Networks
More on CRC
•
13CMPE 150- Introduction to Computer Networks
Cyclic Redunancy Check
At Transmitter, with M = 1 1 1 0 1 1, compute
2r
M= 1 1 1 0 1 1 0 0 0 with G = 1 1 0 1
T = 2r
M + R [note G starts and ends with “1” ]
 R = 1 1 1
Transmit T= 1 1 1 0 1 1 1 1 1
14CMPE 150- Introduction to Computer Networks
Cyclic Redundancy Check
At the Receiver, compute:
Note remainder = 0  no errors detected
15CMPE 150- Introduction to Computer Networks
CRC Performance
• Errors go through undetected only if divisible
by G(x)
• With “suitably chosen” G(x) CRC code detects
all single-bit errors.
• And more…
16CMPE 150- Introduction to Computer Networks
Flow + Error Control
17CMPE 150- Introduction to Computer Networks
Flow + Error Control
• How do Layer 2 protocols implement them?
• What’s a frame?
F FH TPayload
. What’s F?
. What’s in T?
. What’s in H?
18CMPE 150- Introduction to Computer Networks
Header and Trailer
• Trailer typically has checksum.
– How is it used/processed?
• Header has: type, sequence number, and
ack.
19CMPE 150- Introduction to Computer Networks
Stop-and-Wait
• Simplest form of flow control.
• How does it work? (assume error-free
channel)
– (1) Send 1 frame;
– (2) Wait for ACK.
– (3) Go to 1.
20CMPE 150- Introduction to Computer Networks
Stop-and-Wait: Pros and
Cons
• Very simple!
• But, poor link utilization.
– High data rates.
– Long propagation delay.
21CMPE 150- Introduction to Computer Networks
Noisy Channels
From Stallings: Data and Computer
Communications
22CMPE 150- Introduction to Computer Networks
Stop-and-Wait in Noisy
Channels
• Need timers, retransmissions, and duplicate
detection.
• Use sequence numbers.
– Why?
– Distinguish frames.
– How large (e.g., in number of bits) are
sequence numbers?
23CMPE 150- Introduction to Computer Networks
ARQ Protocols
• Automatic Repeat Request.
– Protocols that wait for ACK before sending
more data.
• ACKs now are used for flow AND error
control.
• What can happen?
– At receiver: frame arrives correctly, frame
arrives damaged, frame does not arrive.
– At sender: ACK arrives correctly, ACK arrives
damaged, ACK does not arrive.
24CMPE 150- Introduction to Computer Networks
ARQ Protocols
• Sender:
– Send frame 0.
– Start timer.
– If ACK 0, arrives, send
frame 1.
– If timeout, re-send
frame 0.
• Receiver:
– **Waits for frame.
– If frame arrives, check
if correct sequence
number.
– Then send ACK for
that frame.
– Go to (**)
25CMPE 150- Introduction to Computer Networks
Simplex versus Duplex
Transmission
• Simplex:
– Send data in one channel and control in
another channel.
• Duplex:
– Send data and control on the same chanel.
26CMPE 150- Introduction to Computer Networks
Can we do better?
• Can we do better?
– Piggybacking.
– Bi-directional transmission.
– Wait for data packet and use that to piggyback
the ACK.
– Use ACK field: only a few additional bits in the
header.
• But, how long should Layer 2 wait to send an
ACK?
– ACK timers!
27CMPE 150- Introduction to Computer Networks
Sliding Window Protocols
• Window: number of “outstanding” frames at
any given point in time.
• Every ACK received, window slides…
28CMPE 150- Introduction to Computer Networks
Sliding Window Example
• A sliding window of size 1, with a 3-bit sequence
number.(a) Initially; (b) After the first frame has
been sent; (c) After the first frame has been
received;(d) After the first acknowledgement has
been received.

More Related Content

What's hot

Network communication standards
Network communication standardsNetwork communication standards
Network communication standards
Adeel Khurram
 
Computer networking Components introduction
 Computer networking Components introduction Computer networking Components introduction
Computer networking Components introduction
Ashutosh Kumaar
 
Networking basic fundamental
Networking basic fundamentalNetworking basic fundamental
Networking basic fundamental
Satish Sehrawat
 
Networkingconcepts
NetworkingconceptsNetworkingconcepts
Networkingconcepts
vasanthimuniasamy
 
Network Essentials v2.0
Network Essentials v2.0Network Essentials v2.0
Network Essentials v2.0Hossein Zahed
 
Physical Layer of ISO-OSI model and Devices
Physical Layer of ISO-OSI model and DevicesPhysical Layer of ISO-OSI model and Devices
Physical Layer of ISO-OSI model and Devices
Shahid Khan
 
Networking Basics
Networking BasicsNetworking Basics
Networking Basics
SMC Networks Europe
 
Peer To Peer Protocols
Peer To Peer ProtocolsPeer To Peer Protocols
Peer To Peer Protocolsanishgoel
 
Unit 1 introduction to computer networks
Unit 1  introduction to computer networksUnit 1  introduction to computer networks
Unit 1 introduction to computer networks
pavan kumar Thatikonda
 
Data communication and computer networks | Network Topologies
Data communication and computer networks | Network TopologiesData communication and computer networks | Network Topologies
Data communication and computer networks | Network Topologies
MSA Technosoft
 
Computer networks--osi model
Computer networks--osi modelComputer networks--osi model
Computer networks--osi modelAditya Mehta
 
Computer Networking
Computer NetworkingComputer Networking
Computer Networking
Jitendra Kumar Sharma
 
Computer Networks - Unit 1 PPT
Computer Networks - Unit 1 PPTComputer Networks - Unit 1 PPT
Computer Networks - Unit 1 PPT
KalpanaC14
 
Computer network
Computer networkComputer network
Computer network
Neha Gupta
 
Basics Of Comuter Networking
Basics Of Comuter NetworkingBasics Of Comuter Networking
Basics Of Comuter Networking
anishgoel
 
Basic networking
Basic networkingBasic networking
Basic networking
worr1244
 
Computer network
Computer networkComputer network
Computer network
Gaurav Rawat
 
Computer networks--network
Computer networks--networkComputer networks--network
Computer networks--networkVinnu Vinod Kvk
 
Networking basics PPT
Networking basics PPTNetworking basics PPT
Networking basics PPT
Ehsan Ullah Kakar
 
Ccn(Data communication and networking) edited solution-manual suitable to be ...
Ccn(Data communication and networking) edited solution-manual suitable to be ...Ccn(Data communication and networking) edited solution-manual suitable to be ...
Ccn(Data communication and networking) edited solution-manual suitable to be ...
Vishal kakade
 

What's hot (20)

Network communication standards
Network communication standardsNetwork communication standards
Network communication standards
 
Computer networking Components introduction
 Computer networking Components introduction Computer networking Components introduction
Computer networking Components introduction
 
Networking basic fundamental
Networking basic fundamentalNetworking basic fundamental
Networking basic fundamental
 
Networkingconcepts
NetworkingconceptsNetworkingconcepts
Networkingconcepts
 
Network Essentials v2.0
Network Essentials v2.0Network Essentials v2.0
Network Essentials v2.0
 
Physical Layer of ISO-OSI model and Devices
Physical Layer of ISO-OSI model and DevicesPhysical Layer of ISO-OSI model and Devices
Physical Layer of ISO-OSI model and Devices
 
Networking Basics
Networking BasicsNetworking Basics
Networking Basics
 
Peer To Peer Protocols
Peer To Peer ProtocolsPeer To Peer Protocols
Peer To Peer Protocols
 
Unit 1 introduction to computer networks
Unit 1  introduction to computer networksUnit 1  introduction to computer networks
Unit 1 introduction to computer networks
 
Data communication and computer networks | Network Topologies
Data communication and computer networks | Network TopologiesData communication and computer networks | Network Topologies
Data communication and computer networks | Network Topologies
 
Computer networks--osi model
Computer networks--osi modelComputer networks--osi model
Computer networks--osi model
 
Computer Networking
Computer NetworkingComputer Networking
Computer Networking
 
Computer Networks - Unit 1 PPT
Computer Networks - Unit 1 PPTComputer Networks - Unit 1 PPT
Computer Networks - Unit 1 PPT
 
Computer network
Computer networkComputer network
Computer network
 
Basics Of Comuter Networking
Basics Of Comuter NetworkingBasics Of Comuter Networking
Basics Of Comuter Networking
 
Basic networking
Basic networkingBasic networking
Basic networking
 
Computer network
Computer networkComputer network
Computer network
 
Computer networks--network
Computer networks--networkComputer networks--network
Computer networks--network
 
Networking basics PPT
Networking basics PPTNetworking basics PPT
Networking basics PPT
 
Ccn(Data communication and networking) edited solution-manual suitable to be ...
Ccn(Data communication and networking) edited solution-manual suitable to be ...Ccn(Data communication and networking) edited solution-manual suitable to be ...
Ccn(Data communication and networking) edited solution-manual suitable to be ...
 

Viewers also liked

Informatica 5+years of experince
Informatica 5+years of experinceInformatica 5+years of experince
Informatica 5+years of experince
Dharma Rao
 
Computer Networks
Computer NetworksComputer Networks
Computer Networks
Aabha Tiwari
 
Computer networking
Computer networkingComputer networking
Computer networking
Maulik Togadiya
 
Bioscmos, post, boot
Bioscmos, post, bootBioscmos, post, boot
Bioscmos, post, boot
Prem Sahu
 
Error Correction And Hamming Code Ibrar
Error Correction And Hamming Code IbrarError Correction And Hamming Code Ibrar
Error Correction And Hamming Code Ibrar
ibrar562
 
Error control, parity check, check sum, vrc
Error control, parity check, check sum, vrcError control, parity check, check sum, vrc
Error control, parity check, check sum, vrcHuawei Technologies
 
Errror Detection and Correction
Errror Detection and CorrectionErrror Detection and Correction
Errror Detection and CorrectionMahesh Kumar Attri
 
Error Detection and Correction - Data link Layer
Error Detection and Correction - Data link LayerError Detection and Correction - Data link Layer
Error Detection and Correction - Data link Layer
Abdullaziz Tagawy
 
Computer Networks - Error Detection & Error Correction
Computer Networks - Error Detection & Error CorrectionComputer Networks - Error Detection & Error Correction
Computer Networks - Error Detection & Error Correction
Saikrishna Tanguturu
 

Viewers also liked (10)

Informatica 5+years of experince
Informatica 5+years of experinceInformatica 5+years of experince
Informatica 5+years of experince
 
Computer Networks
Computer NetworksComputer Networks
Computer Networks
 
Computer networking
Computer networkingComputer networking
Computer networking
 
Bioscmos, post, boot
Bioscmos, post, bootBioscmos, post, boot
Bioscmos, post, boot
 
Error Correction And Hamming Code Ibrar
Error Correction And Hamming Code IbrarError Correction And Hamming Code Ibrar
Error Correction And Hamming Code Ibrar
 
Linear block code
Linear block codeLinear block code
Linear block code
 
Error control, parity check, check sum, vrc
Error control, parity check, check sum, vrcError control, parity check, check sum, vrc
Error control, parity check, check sum, vrc
 
Errror Detection and Correction
Errror Detection and CorrectionErrror Detection and Correction
Errror Detection and Correction
 
Error Detection and Correction - Data link Layer
Error Detection and Correction - Data link LayerError Detection and Correction - Data link Layer
Error Detection and Correction - Data link Layer
 
Computer Networks - Error Detection & Error Correction
Computer Networks - Error Detection & Error CorrectionComputer Networks - Error Detection & Error Correction
Computer Networks - Error Detection & Error Correction
 

Similar to Introduction to Computer Networks

Data link layer elementry protocols
Data link layer elementry protocolsData link layer elementry protocols
Data link layer elementry protocols
sabitha sairam
 
CRC AND TRANSMIT ERROR REPORT
CRC AND TRANSMIT ERROR REPORTCRC AND TRANSMIT ERROR REPORT
CRC AND TRANSMIT ERROR REPORT
Alex TX
 
New framing-protocols
New framing-protocolsNew framing-protocols
New framing-protocolsNitesh Singh
 
NE #1.pptx
NE #1.pptxNE #1.pptx
NE #1.pptx
tahaniali27
 
Part9-congestion.pptx
Part9-congestion.pptxPart9-congestion.pptx
Part9-congestion.pptx
Olivier Bonaventure
 
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
The Linux Foundation
 
Data Link Control Protocols
Data Link Control ProtocolsData Link Control Protocols
Data Link Control ProtocolsTechiNerd
 
Computer networks unit iv
Computer networks    unit ivComputer networks    unit iv
Computer networks unit iv
JAIGANESH SEKAR
 
transport layer
transport layertransport layer
transport layer
priyadharshini murugan
 
Computer network (11)
Computer network (11)Computer network (11)
Computer network (11)
NYversity
 
chapter 3.2 TCP.pptx
chapter 3.2 TCP.pptxchapter 3.2 TCP.pptx
chapter 3.2 TCP.pptx
Tekle12
 
Network protocols and vulnerabilities
Network protocols and vulnerabilitiesNetwork protocols and vulnerabilities
Network protocols and vulnerabilities
G Prachi
 
presentationphysicallyer.pdf talked about computer networks
presentationphysicallyer.pdf talked about computer networkspresentationphysicallyer.pdf talked about computer networks
presentationphysicallyer.pdf talked about computer networks
HetfieldLee
 
Tcp (1)
Tcp (1)Tcp (1)
Tcp (1)
Abdo sayed
 
Unit 2 ppt 3.ppt
Unit 2 ppt 3.pptUnit 2 ppt 3.ppt
Unit 2 ppt 3.ppt
Selvakanmani S
 

Similar to Introduction to Computer Networks (20)

Data link layer elementry protocols
Data link layer elementry protocolsData link layer elementry protocols
Data link layer elementry protocols
 
CRC AND TRANSMIT ERROR REPORT
CRC AND TRANSMIT ERROR REPORTCRC AND TRANSMIT ERROR REPORT
CRC AND TRANSMIT ERROR REPORT
 
New framing-protocols
New framing-protocolsNew framing-protocols
New framing-protocols
 
Ntdd
NtddNtdd
Ntdd
 
Ntdd
NtddNtdd
Ntdd
 
NE #1.pptx
NE #1.pptxNE #1.pptx
NE #1.pptx
 
Part9-congestion.pptx
Part9-congestion.pptxPart9-congestion.pptx
Part9-congestion.pptx
 
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
 
CAN.ppt
CAN.pptCAN.ppt
CAN.ppt
 
Data Link Control Protocols
Data Link Control ProtocolsData Link Control Protocols
Data Link Control Protocols
 
Computer networks unit iv
Computer networks    unit ivComputer networks    unit iv
Computer networks unit iv
 
transport layer
transport layertransport layer
transport layer
 
Computer network (11)
Computer network (11)Computer network (11)
Computer network (11)
 
chapter 3.2 TCP.pptx
chapter 3.2 TCP.pptxchapter 3.2 TCP.pptx
chapter 3.2 TCP.pptx
 
Auto mac rateless wireless concurrent medium access
Auto mac rateless wireless concurrent medium accessAuto mac rateless wireless concurrent medium access
Auto mac rateless wireless concurrent medium access
 
Network protocols and vulnerabilities
Network protocols and vulnerabilitiesNetwork protocols and vulnerabilities
Network protocols and vulnerabilities
 
presentationphysicallyer.pdf talked about computer networks
presentationphysicallyer.pdf talked about computer networkspresentationphysicallyer.pdf talked about computer networks
presentationphysicallyer.pdf talked about computer networks
 
Tcp (1)
Tcp (1)Tcp (1)
Tcp (1)
 
Tcp
TcpTcp
Tcp
 
Unit 2 ppt 3.ppt
Unit 2 ppt 3.pptUnit 2 ppt 3.ppt
Unit 2 ppt 3.ppt
 

Recently uploaded

Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
DhatriParmar
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 

Recently uploaded (20)

Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 

Introduction to Computer Networks

  • 1. 1CMPE 150- Introduction to Computer Networks CMPE 150 Fall 2005 Lecture 12 Introduction to Computer Networks
  • 2. 2CMPE 150- Introduction to Computer Networks Announcements • TA office hours this week. – Instead of tomorrow, they will be held Friday 1-2pm at E2 315. • Book should be on reserve at S&E Library.
  • 3. 3CMPE 150- Introduction to Computer Networks Last Class • Layer 2 (Cont’d). – Mechanisms for error control: ACKs/NACKs, retransmissions, timers, etc. – Flow control. • Flow- versus congestion control. • Types of flow control. – Error detection and correction. • Trade-offs. • Hamming distance. • Error detection mechanisms and examples. • Error correction mechanisms and examples.
  • 4. 4CMPE 150- Introduction to Computer Networks Reading Assignment • Tanenbaum Chapter 3.
  • 5. 5CMPE 150- Introduction to Computer Networks Today • Error control (cont’d). • Error + flow control.
  • 6. 6CMPE 150- Introduction to Computer Networks Error Correction (Cont’d)
  • 7. 7CMPE 150- Introduction to Computer Networks Hamming Code • Bits in positions that are power of 2 are check bits. The rest are data bits. • Each check bit used in parity (even or odd) computation of collection of bits. – Example: check bit in position 11, checks for bits in positions, 11 = 1+2+8. Similarly, bit 11 is checked by bits 1, 2, and 8.
  • 8. 8CMPE 150- Introduction to Computer Networks Hamming Code: Example 7-bit . Hamming codes can only correct single errors. . But, to correct bursts of errors, send column by column.
  • 9. 9CMPE 150- Introduction to Computer Networks Error Detecting Codes • Typically used in reliable media. • Examples: parity bit, polynomial codes (a.k.a., CRC, or Cyclic redundancy Check).
  • 10. 10CMPE 150- Introduction to Computer Networks Polynomial Codes • Treat bit strings as representations of polynomials with coefficients 1’s and 0’s. • K-bit frame is coefficient list of polynomial with k terms (and degree k-1), from xk-1 to x0 . – Highest-order bit is coefficient of xk-1 , etc. – Example: 110001 represents x5 + x4 +x0 . • Generator polynomial G(x). – Agreed upon by sender and receiver.
  • 11. 11CMPE 150- Introduction to Computer Networks CRC • Checksum appended to frame being transmitted. – Resulting polynomial divisible by G(x). • When receiver gets checksummed frame, it divides it by G(x). – If remainder, then error!
  • 12. 12CMPE 150- Introduction to Computer Networks More on CRC •
  • 13. 13CMPE 150- Introduction to Computer Networks Cyclic Redunancy Check At Transmitter, with M = 1 1 1 0 1 1, compute 2r M= 1 1 1 0 1 1 0 0 0 with G = 1 1 0 1 T = 2r M + R [note G starts and ends with “1” ]  R = 1 1 1 Transmit T= 1 1 1 0 1 1 1 1 1
  • 14. 14CMPE 150- Introduction to Computer Networks Cyclic Redundancy Check At the Receiver, compute: Note remainder = 0  no errors detected
  • 15. 15CMPE 150- Introduction to Computer Networks CRC Performance • Errors go through undetected only if divisible by G(x) • With “suitably chosen” G(x) CRC code detects all single-bit errors. • And more…
  • 16. 16CMPE 150- Introduction to Computer Networks Flow + Error Control
  • 17. 17CMPE 150- Introduction to Computer Networks Flow + Error Control • How do Layer 2 protocols implement them? • What’s a frame? F FH TPayload . What’s F? . What’s in T? . What’s in H?
  • 18. 18CMPE 150- Introduction to Computer Networks Header and Trailer • Trailer typically has checksum. – How is it used/processed? • Header has: type, sequence number, and ack.
  • 19. 19CMPE 150- Introduction to Computer Networks Stop-and-Wait • Simplest form of flow control. • How does it work? (assume error-free channel) – (1) Send 1 frame; – (2) Wait for ACK. – (3) Go to 1.
  • 20. 20CMPE 150- Introduction to Computer Networks Stop-and-Wait: Pros and Cons • Very simple! • But, poor link utilization. – High data rates. – Long propagation delay.
  • 21. 21CMPE 150- Introduction to Computer Networks Noisy Channels From Stallings: Data and Computer Communications
  • 22. 22CMPE 150- Introduction to Computer Networks Stop-and-Wait in Noisy Channels • Need timers, retransmissions, and duplicate detection. • Use sequence numbers. – Why? – Distinguish frames. – How large (e.g., in number of bits) are sequence numbers?
  • 23. 23CMPE 150- Introduction to Computer Networks ARQ Protocols • Automatic Repeat Request. – Protocols that wait for ACK before sending more data. • ACKs now are used for flow AND error control. • What can happen? – At receiver: frame arrives correctly, frame arrives damaged, frame does not arrive. – At sender: ACK arrives correctly, ACK arrives damaged, ACK does not arrive.
  • 24. 24CMPE 150- Introduction to Computer Networks ARQ Protocols • Sender: – Send frame 0. – Start timer. – If ACK 0, arrives, send frame 1. – If timeout, re-send frame 0. • Receiver: – **Waits for frame. – If frame arrives, check if correct sequence number. – Then send ACK for that frame. – Go to (**)
  • 25. 25CMPE 150- Introduction to Computer Networks Simplex versus Duplex Transmission • Simplex: – Send data in one channel and control in another channel. • Duplex: – Send data and control on the same chanel.
  • 26. 26CMPE 150- Introduction to Computer Networks Can we do better? • Can we do better? – Piggybacking. – Bi-directional transmission. – Wait for data packet and use that to piggyback the ACK. – Use ACK field: only a few additional bits in the header. • But, how long should Layer 2 wait to send an ACK? – ACK timers!
  • 27. 27CMPE 150- Introduction to Computer Networks Sliding Window Protocols • Window: number of “outstanding” frames at any given point in time. • Every ACK received, window slides…
  • 28. 28CMPE 150- Introduction to Computer Networks Sliding Window Example • A sliding window of size 1, with a 3-bit sequence number.(a) Initially; (b) After the first frame has been sent; (c) After the first frame has been received;(d) After the first acknowledgement has been received.