Uploaded by Ahmad Alsaleh

Network protocols

advertisement
Network Protocols
Syntax and Semantics of Messages in Computer Networks
Objectives
What will be covered in this lecture?
• What is a network protocol?
• What is a protocol data unit?
• How efficient is a network protocol?
• What are the OSI and the Internet layered protocol models?
2
T. Landolsi | Computer Networks
The Internet
Internet  Network of communicating end systems
• Internet = large and complex engineered system
− billions of interconnected devices called end systems or hosts
− end systems exchange msg. in the form of packets, hence:
Internet = Packet Switching Network
− complexity requires modular design and well-defined standards
− IETF, ISO, IEEE developed standard ways of communication
− divided networking into modules of functions called layers
− introduced standard protocols for each layer
• HTTP, TCP, IP, IEEE802.3, IEEE802.11…
3
T. Landolsi | Computer Networks
Network Protocols
What is a network protocol and what does it specify?
• Protocol = Set of rules governing communication between network devices
• Network devices communicate by exchanging messages e.g. request and response messages
• Messages divided into packets known as protocol data units or PDUs
• Protocols specify PDU structure and define syntax, semantics, and timing of messages
− syntax  format of PDU and order of its components
− semantics  meaning of PDU components
− timing  what network devices need to do, and when
4
T. Landolsi | Computer Networks
Analogy
•
We “shake hands” before communicating
•
Human communication protocol
•
5
T. Landolsi | Computer Networks
1.
greet  request to communicate
2.
greet back  response to request
3.
communicate
TCP famous three-way handshake
1.
connection setup request msg.
2.
connection setup response msg.
3.
communicate
Layered Protocol Models
OSI 7-layer Model vs. TCP/IP 5-layer Model
Layered Protocols
Creating stack of protocols to handle networking functions efficiently
• Complexity of networking tasks → engineers must follow modular design
− one “super” protocol for everything won’t work!
− must group similar functions together into layers
− each layer will define and run its own protocol
• Layering allows concept of service model
− layer (𝑖) gives service to layer (𝑖 + 1)
− layer (𝑖) gets service from layer (𝑖 − 1)
− change in one layer won’t affect other layers
7
T. Landolsi | Computer Networks
Internet Model vs. OSI Model
Internet or TCP/IP model is a 5-layer model and OSI reference model is a 7-layer model
• IETF defines 5-layer internet model:
− Application layer or AL = L5: provides interface to user
− Transport layer or TL = L4: provides AL with reliable service if needed
− Network layer or NL = L3: delivers PDUs from one network to another
− Link layer or LL = L2: delivers PDUs from one node to adjacent node
− Physical layer or PHY = L1: converts PDU bits into physical signals
• ISO added two extra layers between AL and TL to define OSI model:
− Presentation layer: provide data encryption, compression, etc.
− Session layer: session setup, teardown, synchronization, etc.
8
T. Landolsi | Computer Networks
Logical Connections between Layers
peer layers appear “logically connected”
• Src. and dest. hosts exchange messages
− if msg. is too large → they break it into packets
• AL on src. host is peer to AL on dest. host
− same for TL, NL layers
− peer layers talk same language i.e. same protocol
− their PDU formats are identical
− peer layers appear logically connected
− underlying layers abstract whole network infrastructure for upper layer
− e.g. AL need not worry about what TL, NL, LL look like or what protocols they use
9
T. Landolsi | Computer Networks
Protocol Data Unit
How to carry large messages over the Internet?
Example of PDU Structure
• End systems exchange msg. in the form of packets,
header
• Packets are known as protocol data units or PDUs
• PDU  Header + Payload + Trailer
payload
− Payload  important data to be delivered
− Header + Trailer  overhead needed to deliver payload
− Header contains source and destination addresses
− Trailer not always present in PDU
10
T. Landolsi | Computer Networks
header
payload
trailer
Layer-Specific Devices and PDU Names
Different devices handle different layers’ PDUs with unique formats and names
• Layer-specific PDU names:
− AL PDU is called Message
− TL PDU is called Segment
− NL PDU is called Datagram
− LL PDU is called Frame
• Different network devices handle different layers
− L3 routers handle NL datagrams
− L2 Ethernet switches handle frames
− L1 modems handle physical signals
11
T. Landolsi | Computer Networks
Protocol Data Unit and Efficiency
Creating protocols that perform needed functions without wasting resources
Protocol Efficiency
Protocol efficiency  Ratio of payload size to total PDU size
• Protocol efficiency:
𝜂𝑝 =
• Example-1: Ethernet has good efficiency
𝐿𝑝
𝐿𝑝 + 𝐿𝑜ℎ
− overhead size  results in protocol efficiency 
− overhead size  results in protocol efficiency 
• Tradeoff
− 𝐿𝑝 = 1500 bytes
− 𝐿𝑜ℎ = 14 + 4 bytes
𝜂𝑝 =
1500
≈ 98.8%
1500 + 18
• Example-2: ATM has bad efficiency
− OH too small → not enough for protocol to function
− 𝐿𝑝 = 48 bytes
− OH too large → reduces protocol efficiency
− 𝐿𝑜ℎ = 5 bytes
𝜂𝑝 =
13
T. Landolsi | Computer Networks
48
≈ 90.5%
48 + 5
Download