Title: Communication Basics
1Communication Basics
- Layered Protocols to tackle communication problems
2Learning Outcomes
- You understand this if you can
- Explain the concept of a protocol
- Describe the ISO Model for OSI
- Explain the Ethernet protocol
- Compare Connection-Oriented vs. Connectionless
protocols
3Handling Errors
- A protocol is a set of rules procedures
- Designed to tackle various problems
- e.g Transmitter Receiver
- Communicating over an imperfect channel
- Bits may be randomly altered
- Cant use if error rate is too high
4Error Detection
- Transmission
- Add a checksum to each data block
- Calculated from all the bits by an agreed
algorithm - Receiver
- Recalculate the checksum
- Error if it differs from transmitted checksum
5Protocol 1 NAK
- NAK negative acknowledgement
- Message saying something is wrong
- Transmitter
- Sends block with checksum
- Resends block if it gets a NAK
- Receiver
- Receives block and recalculates checksum
- Sends negative acknowledgement on error
- Problems?
6Example
Receiver
Sender
(Block 2 damaged)
(Block 3 damaged)
(Nak lost)
7Protocol 2 Timeout
- Transmitter
- Sends block
- Re-sends block after timeout
- Receiver
- Sends acknowledgment if received ok
- Problems?
8Protocol 3 ARQ
- Transmitter
- Sends numbered block
- Re-sends block after timeout
- Receiver
- Sends acknowledgment if received ok
- Problems?
9Example Automatic Repeat Request
Receiver
Sender
(Block 2 lost)
timeout
timeout
(Ack lost)
10Envelopes Layers
Envelope Wrapping Data
Block Number
Header
Data
Checksum
This data could be part of an email, including
the recipients name, the senders name, the
text, and possibly lots of attachments. Hence
this data would itself contain both data and
housekeeping information corresponding to the
email protocol there are layers of protocols
11Layers
Application Layer
Sending Music
Network Layer
Addressing Wrap in envelope
Physical Layer
Transfer Another envelope
12Layering Modularity
- Divide and conquer
- Each protocol builds on poorer services
- Physical problems
- Transmitting a bit with high success probability
- Basic data transfer
- Error free transfer across a direct link
- Routing
- Transferring across network of links
13ISO 7-Layer Model for OSI
14Ethernet the Problem
- Multiple devices share a common medium
- No central controller
- Two simultaneous transmissions error
15Ethernet the Solution CSMA/CD
- Carrier Sense listen while transmit
- Multiple Access
- Collision Detect jam if notice collision
- Retransmit random time later
- Binary Backoff
- Double the range of possible times after each
collision
16End-to-End Protocols
- Network may be complex
- Even with error-free links, data can be lost
- Need error checking from end to end single link
- Why both?
17Connectionless Protocol
- Datagram (like telegram / letter)
- Send blocks of data
- Each block sent individually
- No guarantee of arrival
- May be duplicated
- Low overhead
18Connection-Oriented Protocol
- Stream (like telephone connection)
- Create a logical connection
- Then transfer data
- Blocks guaranteed
- To arrive
- (or catastrophic failure notified)
- In correct order
- No duplication
- Could be built on a datagram protocol
19Summary
- Protocol
- Block format dialogue rules
- Solves a communication problem
- OSI Model
- Breaks communication problem into layers
- Ethernet
- Peers sharing common medium
- Connection-oriented vs. connection-less