Professional Documents
Culture Documents
Chapter 2
Updated January 2009
Raymond Panko’s
Business Data Networks and Telecommunications, 7th edition
May only be used by adopters of the book
• Network Standards
– Network standards govern the exchange of messages
between hardware or software processes on different host
computers, including message order, semantics, syntax,
reliability, and connection orientation
– Also known as protocols
– Computers are not intelligent, so standards must be very rigid
Message
2-2
2-2
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
1.
Message Standards
(Protocols)
Message syntax
Message semantics
Message order
2-4
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-2: General Message Organization
Other
Header Destination
Message with
Field Address
all three parts
Field is
Used by Switches and Routers
Like the Address on an Envelope
2-6
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-2: General Message Organization
2-7
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-2: General Message Organization
Header
Other Destination
Message with Header Address
only a header Field Field
e.g.
TCP supervisory messages are pure headers
(there is no data field content to deliver)
2-8
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2.
Reliability
2-10
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-3: Reliable TCP Session 1
Client PC Webserver
TCP Process TCP Process
4. Data = HTTP Request
Client PC Webserver
TCP Process TCP Process
8. Data = HTTP Request (Error)
Carry No receipt, so
HTTP so no ACK
Req &
8. Data = Retransmits HTTP Request because
Resp
No ACK was received
(4)
9. ACK (8)
Error Handling
2-12
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
Unreliable Protocols
Message
2-13
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
3.
Connection-Oriented and
Connectionless Protocols
Client PC
In TCP Webserver
TCP Process TCP Process
Connection-Opening Messages
Connection-Closing Messages
A B A B
Open Connection Message
(No Sequence Number)
Message with Sequence Number A1
Connectionless protocols, like
HTTP simply send messages
Message with Sequence Number B1 without prior connection
openings and without
subsequent connection closings
Message with Sequence Number A2
Connection-oriented protocols
give each message a
unique sequence number
Close Connection
2-16
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-5: Advantages and Disadvantages of
Connection-Oriented Protocols
• Advantages
– Connection-oriented protocols give each message a sequence number
• Thanks to sequence numbers, the parties can tell when a message is
lost (There will be a gap in the sequence numbers)
• Error messages, such as ACKs, can refer to specific messages
according to the sequence numbers of these messages
– Long messages can be fragmented into many smaller messages that can
fit inside of packets
• The fragments will be given sequence numbers so that they can be
assembled at the other end
• Fragmentation followed by reassembly is an important concept in
networking
2-17
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-5: Advantages and Disadvantages of Connection-
Oriented Protocols
• Disadvantages
– Connection-oriented protocols place a heavy load on networks and on
computers connected to the Internet
• For example, we will see in Chapter 8 that it takes about 7 messages to
open and close a connection
• This is high overhead if only one or two content messages will be sent
during a connection.
– Connections-oriented protocols require more processing time on each host
• Error detection and correction take up many processing cycles for each
message
2-18
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
4.
The Hybrid TCP/IP-OSI
Standards Architecture
2-20
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
Figure 2-8: Hybrid TCP/IP-OSI Architecture
A route is a
packet’s path all
the way through
the internet. There
always is a single
route because
there is only one
packet 2-23
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-8: Internet and Data Link Layers in a Routed
Network 3
A simplified view
Host
A Data Link A-R1
R1
Network X
3 Data Links: One per Network Network Y
1 Route through the internet Data
Link
Network Z Route A-B R1-R2
R2
Host
B Data Link R3-B
2-24
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-8: Internet and Data Link Layers in a Routed
Network
In Network X:
Two destination addresses:
Frame X Packet: Host B (destination host)
Packet Frame: Router R1
Data Link
Switch
A-R1
Host A
Switch Server
Station
Switch
X1
Mobile Client
Station Switch Route
X2 Router R1
A-B
Network X
2-25
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-8: Internet and Data Link Layers in a Routed
Network
To
Network X
Route
A-B Router R1
In Network Y: Frame Y
Two destination Data Link
R1-R2 Packet
addresses:
Packet: Host B
(destination host)
Frame: Router R2
To Router R2 Network Y
Network Z
2-26
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-8: Internet and Data Link Layers in a Routed
Network
Frame Z
Packet
Data Link
R2-B
Host Switch
Z1 Router R2
B
Switch
Z2
2-28
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-9: Internet and Transport Layers Standards
1
The transport layer adds functionality for the two hosts
to talk with each other to fix errors and do other things
Transport Layer
End-to-End (Host-to-Host)
TCP is reliable and connection-oriented
UDP is unreliable and connectionless
Internet Layer
Hop-by-Hop (Router to Router)
IP is connectionless and unreliable
2-31
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
Standards Layers: Recap
Be able to repeat
• Application (5)
this in your sleep!
• Transport (4)
• Internet (3)
• Data Link (2)
• Physical (1)
2-32
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
5.
Syntax Examples:
Ethernet and IP
2-34
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
Octets
Octet = 8 Bits
10010111
2-35
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
Figure 2-11: Ethernet Frame
This is an Ethernet
Start Preamble (7 octets) Frame
Start of Frame Delimiter (1 octet)
The address fields
Destination MAC Address (48 bits) give the Ethernet
addresses of
Source MAC Address (48 bits)
the source and
Length (2 octets) destination
hosts
LLC Subheader (7 octets)
Data
Field Packet (usually IP Packet) (variable) Each address is
48-bits long
PAD (variable)
Ethernet addresses
End Frame Check Sequence (4 octets) are called MAC
addresses
2-36
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
Figure 2-11: Ethernet Frame
Length (2 octets)
LLC Subheader (7 octets) The Ethernet frame
Data
Field Packet (usually IP Packet) (variable) usually contains an
IP address in its
data field
PAD (variable)
End Frame Check Sequence (4 octets)
2-37
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
Figure 2-11: Ethernet Frame
The sender computes
a value and puts it in
Start Preamble (7 octets)
the Frame Check
Start of Frame Delimiter (1 octet) Sequence Field
Destination MAC Address (48 bits)
The sender does the
Source MAC Address (48 bits) same calculation. If
its value matches the
Length (2 octets) transmitted value, the
frame is OK
LLC Subheader (7 octets)
Data
Field Packet (usually IP Packet) (variable) If the value is different,
an error has occurred.
PAD (variable) The receiver drops the
frame.
End Frame Check Sequence (4 octets)
Ethernet is not reliable
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 2-38
Ethernet Frame Layout
Bit 0 Bit 31
Version Header Diff-Serv Total Length
Number Length (8 bits) (16 bits)
(4 bits) (4 bits)
2-42
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-12: Internet Protocol (IP) Packet
Bit 0 Bit 31
Version Header Diff-Serv Total Length
Number Length (8 bits) (16 bits)
The receiver uses the header (4 bits) (4 bits)
checksum field to check for Identification (16 bits) Flags Fragment Offset (13
errors (3 bits) bits)
Time to Live (8 Protocol (8 bits) Header Checksum (16 bits)
If an error is found, the bits)
receiver Source IP Address (32 bits)
discards the packet Destination IP Address (32 bits)
Options (if any) Padding
(to 32-bit
As in Ethernet, there is no boundary)
retransmission, so IP is not
reliable
Data Field (dozens, hundreds, or thousands of bits)
Often contains a TCP segment
2-43
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-12: Internet Protocol (IP) Packet
Bit 0 Bit 31
Version Header Diff-Serv Total Length
Number Length (8 bits) (16 bits)
(4 bits) (4 bits)
The source and destination
Identification (16 bits) Flags Fragment Offset (13
IP addresses are each 32 bits long (3 bits) bits)
Time to Live (8 bits) Protocol (8 bits) Header Checksum (16 bits)
Source IP Address (32 bits)
Destination IP Address (32 bits)
Options (if any) Padding
(to 32-bit boundary)
2-44
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-12: Internet Protocol (IP) Packet
Bit 0 Bit 31
Version Header Diff-Serv Total Length
Number Length (8 bits) (16 bits)
(4 bits) (4 bits)
2-45
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
6.
Reliability Options at the
Transport Layer
• Reliability Is Expensive
– When errors are rare (in hops between routers and switches),
the cost is not justified
– Switches and routers would be much more expensive if they
did hop-by-hop error correction
– There are many switch and router hops, so doing error
correction between hops would be very expensive
– Error correction at the transport layer corrects errors made at
lower layers, making correction at lower layer unnecessary as
well as expensive
2-47
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-13: Why Not Make All Layers Reliable?
2
• Why Does Doing Error Correction at the
Transport Layer Make Sense?
• First,
– There are only two transport processes: one on the
source host, one on the destination host
– So error correction has to be done only once, keeping
cost low
• Second,
– The transport process is just below the application layer
– So doing error correction at the transport layer frees the
application layer from doing error correction
2-48
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-14: TCP and UDP at the Transport Layer
2-49
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-14: TCP and UDP at the Transport Layer
2-50
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
7.
Vertical
Communication
Between Layer
Processes on the
Same Host
2-52
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-15: Layered Communication on the Source Host
2
The process begins when a browser creates an
HTTP request message
Application HTTP
Process Message
Passes Message
New
Down to Transport Process
Not in the Book
For TCP,
The transport process
encapsulate each HTTP message
In the data field of
a TCP message (TCP segment)
by adding a TCP header
2-54
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-15: Layered Communication on the
Source Host
2-56
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-15: Layered Communication on the Source Host
1
Encapsulation of IP Packet
in Data Field of Ethernet Frame
2-57
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-15: Layered Communication on the Source Host
1
The data link process passes the frame down to the physical layer
Physical
Process
2-58
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-15: Layered Communication on the Source Host
Recap
2-59
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-15: Layered Communication on the Source Host
4
The following is the final frame for
an HTTP message on an Ethernet LAN
L2 L5 L4 L3 L2
Notice the Pattern: From Right to Left: L2, L3, L4, L5, maybe L2
Start with the highest-layer message (in this case, 5)
Add headers for each lower layer (L4, L3, and L2, in this case)
Don’t forget the possible trailing L2 trailer
2-60
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-16: Decapsulation on the Destination Host
2-61
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-17: Layered End-to-End Communication
2-64
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
8.
OSI, TCP/IP, and Other
Standards Architectures
OSI TCP/IP
Standards Agency ISO (International IETF (Internet
or Agencies Organization for Engineering Task Force)
Standardization)
ITU-T (International
Telecommunications
Union–
Telecommunications
Standards Sector)
2-71
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
Standard Delivery Model
Source: 1 Collins St. (Mount Franklin)
7 CEO – Interacts with customers and his company. 50 L of
APP – Link between applications and the network. Allows Mineral
applications to use the network.
6 Secretary (Facilitator) – Translates, Secures, …
PRES - Translates into common Formats, defines, encryption and
compression
5 Manager – Engages, Disengages customers
SESS – Start, stop, pause, control and end application sessions
ACK TRANS 1 … 10
ACK, Reassembly
Segment
NET |1
Packet We are 223 King St
DL ||1|
Frame Actual weight 4.97L?!!!!
Actual weight 5.00L?!!!!
PHY Delivery Department
Receives goods unsure if same as
sent
2-23: Other Major Standards Architectures
• IPX/SPX
– Used by older Novell NetWare file servers for file and
print service
– Sometimes used in newer Novell NetWare file servers
for consistency with older NetWare servers
• AppleTalk
– Used by Apple Macintosh desktops and notebooks to
talk to Macintosh servers
2-74
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
2-24: Characteristics of Protocols Discussed in
this Chapter
2-75
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
9.
Topics Covered
• Connections
– Layer 1: Physical link between adjacent devices
– Layer 2: Data link through a single switched network
– Layer 3: route through a routed network (internet)
2-78
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
Syntax Examples
• Ethernet Frame
– 48-bit MAC address fields
– Error detection and discarding; not reliable
– Carries a packet in its data field
• UDP is Unreliable
– Low burden on the network and hosts
– Useful if application cannot use reliability or prefers not
to use it
2-80
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
Vertical Communication
2-81
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
Vertical and Horizontal Communication
2-82
© 2009 Pearson Education, Inc. Publishing as Prentice Hall
All rights reserved. No part of this publication may be reproduced, stored in a
retrieval system, or transmitted, in any form or by any means, electronic,
mechanical, photocopying, recording, or otherwise, without the prior written
permission of the publisher. Printed in the United States of America.