Protocol Arch
Protocol Arch
Layered Protocols
Architectures
2-3
Figure 2-1: Standards Govern the
Exchange of Messages
Message
2-4
Figure 2-1: Standards Govern the
Exchange of Messages (Continued)
2-5
Figure 2-2: Hypertext Transfer Protocol (HTTP)
Interactions
1.
HTTP Request Message
Asking for a File
Browser Webserver
Application
Client PC Webserver
2.
HTTP Response Message
Delivering the File
• [CRLF]
– Carriage return and line feed (starts a new line)
– ASCII codes: CR: 13, LF: 10 (decimal)
• HTTP Request Message
– GET /reports/project1/final.htm HTTP/1.1[CRLF]
• GET is the method (others exist)
• Next comes the path to the file to be retrieved
• Last comes the version of the HTTP standard
– Host: voyager.cba.Hawaii.edu[CRLF]
• The host to be sent the request message
2-7
Figure 2-3: Syntax of HTTP Request and
Response Messages, Continued
2-9
Figure 2-1: Standards Govern the
Exchange of Messages, Continued
2-10
Figure 2-1: Standards Govern the
Exchange of Messages, Continued
• General Message Syntax (Organization)
– Header and trailer are further divided into fields
Other
Header Destination
Message with
Field Address
all three parts
Field is
Used by Switches and Routers
Like the Address on an Envelope
2-11
Figure 2-4: General Message Organization,
Continued
Other Destination
Message without
Header Address
a trailer
Field Field
Usually only data link
layer messages have trailers
2-12
Figure 2-4: General Message Organization,
Continued
Header
Message with
only a header Other Destination
Header Address
e.g. Field Field
TCP supervisory
messages are
pure headers
(there is no data field content to deliver)
2-13
2.
Reliability
Figure 2-5: Reliable Transmission
Control Protocol (TCP) Session
• TCP
– If acknowledgments are not sent by the receiver, the
sender retransmits the TCP message (called a TCP
segment)
– This gives reliability: error detection and error
correction
2-15
Figure 2-5: Reliable TCP Session, Continued
Client PC Webserver
TCP Process TCP Process
4. Data = HTTP Request
2-16
Figure 2-5: A TCP Session, Continued
Client PC Webserver
TCP Process TCP Process
8. Data = HTTP Request (Error)
2-17
3.
Connection-Oriented and
Connectionless Protocols
Figure 2-6: Connection-Oriented and
Connectionless Protocols
A B A B
Open Connection Message
(No Sequence Number)
Message 1 (Seq. Num = A1)
Connection-oriented protocols
Formal openings and closings
Message 3 (Seq. Num B1)
Also have sequence numbers
Message 2 (Seq. Num = A2) so that the receiver can put
messages in order
Close Connection
And so the receiver can send
Acknowledgments for specific
messages 2-19
Figure 2-6: Connection-Oriented and
Connectionless Protocols, Continued
Client PC Webserver
Browser Application
HTTP Request
HTTP is connectionless
No Openings
No Closings
No Sequence Numbers
No Acknowledgments
2-20
Figure 2-6: Connection-Oriented and
Connectionless Protocols, Continued
Client PC
In TCP Webserver
TCP Process TCP Process
Connection-Opening Messages
Connection-Closing Messages
2-21
Figure 2-7: Advantages and Disadvantages
or Connection-Oriented Protocols
• Advantages
– Thanks to sequence numbers, the parties can tell if a
message is lost.
2-22
Figure 2-7: Advantages and Disadvantages
or Connection-Oriented Protocols, Cont.
• Disadvantages
– The presence of many supervisory messages
consumes existing bandwidth
– The processing of connection information places a
heavy processing load on computers connected to the
network
2-23
4.
The Hybrid TCP/IP-OSI
Standards Architecture
Standards Architecture
2-25
Figure 2-8: Hybrid TCP/IP-OSI Architecture
2-26
Figure 2-8: Hybrid TCP/IP-OSI Architecture,
Continued
2-27
Figure 2-9: Physical and Data Link
Layer Standards in a Single Network
• Physical Layer
– Physical layer standards govern transmission
between adjacent devices connected by a
transmission medium
Physical Link
A-X1 Switch X1
Host A
2-28
Figure 2-9: Physical and Data Link Layer
Standards in a Single Network, Continued
Switch X1
Host A
Switch X2
2-29
Figure 2-9: Physical and Data Link Layer
Standards in a Single Network, Continued
2-30
Figure 2-9: Physical and Data Link Layer
Standards in a Single Network, Continued
3 Physical Links
Host A 1 Data Link
Switch 2 Switches
Data Link
A-R1
Physical Link Switch
Server
A-X1 Station
Switch X1
Physical
Link
X1-X2 Physical
Switch Link
Mobile Client X2 Router R1
Station X2-R1
2-31
Figure 2-10: Internet and Data Link Layers
in an Internet
2-32
Figure 2-10: Internet and Data Link Layers
in an Internet, Continued
• Internet Layer
– Internet layer standards govern the transmission of
packets across an internet—typically by sending them
through several routers along the route
– Messages at the internet layer are called packets
– Internet layer standards also govern packet
organization and router operation
Host
A Data Link A-R1
R1
Network X
3 Data Links: One per Network Network Y
1 Route per Internet Data
Link
Network Z Route A-B R1-R2
R2
Host
B Data Link R3-B
2-34
Figure 2-10: Internet and Data Link Layers in an
Internet, Continued
Frame X
Packet
Data Link
Switch
A-R1 In Network X:
Host A Two Destination
Switch Addresses:
Server
Packet: Host B (Destination Host)
Station
Frame: Router R1
Switch
X1
Mobile Client
Station Switch Route
X2 Router R1
A-B
Network X
2-35
Figure 2-10: Internet and Data Link Layers in an
Internet, Continued
To
Network X
Route
A-B Router R1
Frame Y
Data Link
In Network Y: Packet
R1-R2
Two Destination Addresses:
Packet: Host B (Destination Host)
Frame: Router R2
To Router R2 Network Y
Network Z
2-36
Figure 2-10: Internet and Data Link Layers in an
Internet, Continued
Frame Z
Packet
Data Link
R2-B
Host Switch
Z1 Router R2
B
In Network Z:
Two DestinationSwitch
Addresses:
Packet: Host B (Destination
Z2 Host)
Frame: Host B
Network Z
2-37
Frames and Packets
• Transport Layer
– Transport layer standards govern aspects of end-to-
end communication between two end hosts that are
not handled by the internet layer
– These standards allow hosts to work together even if
the two computers are from different vendors and
have different internal designs
2-39
Figure 2-11: Internet and Transport Layer
Standards, Continued
Transport Layer
end-to-end (host-to-host)
TCP is connection-oriented, reliable Server
Client PC
UDP is connectionless and unreliable
Internet Layer
(usually IP)
hop-by-hop (host-router or router-router)
connectionless, unreliable
2-40
Figure 2-12: Application Layer Standards
• Application Layer
– The application layer governs how two applications
work with each other, even if they are from different
vendors
Browser Webserver
Application
Client PC Webserver
2-41
Figure 2-12: Application Layer Standards
2-42
Standards Layers: Recap
• Application (5)
• Transport (4)
• Internet (3)
• Data Link (2)
• Physical (1)
2-43
Figure 2-13: Why Layer? Box
Octet = 8 Bits
10010111
2-46
Figure 2-14: Ethernet Frame
2-47
Figure 2-14: Ethernet Frame, Continued
LLC Subheader
Data Field
(usually 7 octets)
(variable
length) Encapsulated
Usually
IP Packet Packer
2-48
Figure 2-14: Ethernet Frame, Continued
2-50
Figure 2-15: Internet Protocol (IP) Packet,
Continued
Bit 0 Bit 31
Header
Version Diff-Serv Total Length
Length
• TCP is reliable
• Not all applications need reliability
– Voice over IP cannot wait for lost or damaged packets
to be transmitted
– Network management protocols need to place as low
a burden on the network as possible
– Both types of applications use the simpler User
Datagram Protocol (UDP) instead of TCP
2-54
Figure 2-16: TCP and UDP at the Transport
Layer, Continued
Connection-Oriented? Yes No
Reliable? Yes No
2-55
Why Make TCP Reliable?
2-57
6.
Vertical
Communication
Between Layer
Processes on the
Same Host
Figure 2-18: Layered Communication on the
Source Host
Application HTTP
Process Message
Passes Message
Down to Transport Process
2-60
Figure 2-18: Layered Communication on the
Source Host, Continued
2-61
Figure 2-18: Layered Communication on the
Source Host, Continued
Encapsulation of IP Packet
in Data Field of Ethernet Frame
2-62
Figure 2-18: Layered Communication on the
Source Host, Continued
Physical
Process
2-63
Figure 2-18: Layered Communication on the
Source Host, Continued
L2 L5 L4 L3 L2
Notice the Pattern: From Right to Left: L2, L3, L4, L5, maybe L2
This makes it easier to remember the order of headers and
messages
Don’t forget the possible trailing L2 trailer
2-64
Figure 2-19: Decapsulation on the Destination
Host
Physical
Process
2-65
Figure 2-19: Decapsulation on the Destination
Host, Continued
Decapsulation of IP Packet
from Data Field of Ethernet Frame
2-66
Figure 2-19: Decapsulation on the Destination
Host, Continued
2-67
Figure 2-19: Decapsulation on the Destination
Host, Continued
HTTP Application
Message Process
2-68
Figure 2-20: Layered End-to-End Communication
Routers
Switches Have Three
Source and Have Two Layers
Destination Layers ---
Hosts Have --- Each Router
5 Layers Each Switch Port
Port Has Two
App
Has One Layers (1&2)
Trans
Layer (1)
Int
DL
Phy
Source Switch Switch Router Switch Router Destination
Host 1 2 1 3 2 Host
2-69
Figure 2-21: Combining Horizontal and Vertical
Communication
DL
Phy
2-70
7.
OSI, TCP/IP, and Other
Standards Architectures
Figure 2-22: The Hybrid TCP/IP-OSI Architecture
2-72
Figure 2-23: OSI and TCP/IP
OSI TCP/IP
ITU-T (International
Telecommunications
Union—
Telecommunications
Standards Sector)
2-73
Figure 2-23: OSI and TCP/IP, Continued
OSI TCP/IP
Dominance Nearly 100% 70%-80% dominant
dominant at at the internet and
physical and data transport
link layers layers.
2-74
Figure 2-23: OSI and TCP/IP, Continued
• Notes
– Do not confuse OSI (the architecture) with ISO (the
organization)
2-75
Figure 2-24: OSI Layers
2-76
Figure 2-24: OSI Layers, Continued
2-77
Figure 2-24: OSI Layers, Continued
2-78
Figure 2-24: OSI Layers, Continued
2-79
Figure 2-24: OSI Layers, Continued
2-80
Figure 2-25: Other Major Standards
Architectures
• IPX/SPX
– Used by older Novell NetWare file servers
– Popular option for newer Novell NetWare file
servers
• AppleTalk
– Used by Apple Macintoshes
2-81
Figure 2-26: Characteristics of Protocols
Discussed in the Chapter
• Reliability
– In TCP, receiver sends ACKs
– Senders retransmit non-acknowledged segments
2-84
Topics Covered
2-85
Topics Covered
2-86
Topics Covered
• Ethernet
– Source and destination addresses are 48 bits long
– Switches forward packets by destination addresses
– Data field encapsulates an IP packet
– Unreliable: if detects an error, drops the frame
2-89
Topics Covered
• OSI Architecture
– Divides application layer into three layers
• Session
• Presentation
• Application
2-90