Professional Documents
Culture Documents
Datalink & NW Layer
Datalink & NW Layer
Datalink & NW Layer
A Guide to TCP/IP
Chapter 3 1
3
Objectives
Chapter 3 2
3
Objectives
After reading this chapter and completing the
exercises you will be able to:
• Appreciate the overwhelming importance of the
Internet Protocol (IP), and how IP packets behave on
TCP/IP networks
• Understand the structures and functions of an IP
header
• Appreciate the function of the Maximum Transfer Unit
(MTU) for any physical medium, and why
fragmentation is sometimes required of the Network
layer
Chapter 3 3
3
• The Data Link layer performs several key jobs with the
two most important being:
– Managing access to whatever networking medium is in use,
called Media Access Control (usually abbreviated as MAC)
– Creating temporary point-to-point links between a pair of MAC
layer addresses to enable data transfer, called Logical Link
Control (usually abbreviated as LLC)
• A point-to-point data transfer involves shipping data
from a specific MAC layer address that represents the
point of transmission to another specific MAC layer
address that represents the point of reception on a
single network segment, or TCP/IP subnet
Chapter 3 4
3
Chapter 3 6
3
Chapter 3 7
3
The Serial Line
Internet Protocol (SLIP)
• SLIP is the original point-to-point protocol for
TCP/IP traffic, still used for connecting to some
ISPs today
• SLIP uses a special END character (0xC0) that is
placed at the beginning and end of each IP
datagram to delimit the payload
• The SLIP ESC character is not the same as the
American Standard Code for Information
Interchange (ASCII) ESC character, the hex DB-
DC sequence is usually denoted 0xDB-DC
Chapter 3 8
3
The Serial Line
Internet Protocol (SLIP)
• If the SLIP ESC character occurs in a frame’s payload
0xDB-DD replaces it
• AS specified in RFC 1055, the maximum size of a SLIP data
gram is 1066 bytes
• Most systems continue to set the upper bound for SLIP
datagram at 1066 bytes, but Windows 2000 permits MTUs of
1500 bytes for SLIP datagrams to avoid fragmentation when
a SLIP connection links two Ethernet segments
• RFC 1144 was developed to permit IP and TCP headers to
be compressed when sent across a SLIP link
• This version of SLIP is called compressed SLIP (C-SLIP)
Chapter 3 9
3
Chapter 3 10
3
Chapter 3 11
3
Chapter 3 12
3
Chapter 3 13
3
Chapter 3 14
3
Frame Types
Chapter 3 15
3
Chapter 3 16
3
Chapter 3 17
3
– Ethernet II
Chapter 3 18
3
– Type field
– Data field
Chapter 3 19
3
Chapter 3 20
3
Preamble
• The preamble is eight bytes long and consists of alternating ones
and zeroes
• This special string of bits precedes the actual Ethernet frame itself,
and is not counted as part of the overall frame length
Chapter 3 21
3
Chapter 3 22
3
Chapter 3 23
3
Chapter 3 24
3
Chapter 3 25
3
Preamble
• This preamble does not end in consecutive ones
Start Frame Delimiter (SFD) Field
• The 1-byte SFD field consists of the pattern 10101011 and
indicates the start of the Destination Address field
Length Field
• The 2-byte Length field indicates the number of bytes in the
data portion of the frame
• This frame does not use a Type field in this location—it
uses a Service Access Point (SAP) field to indicate the
upcoming protocol
Chapter 3 26
3
Chapter 3 27
3
Chapter 3 28
3
Chapter 3 29
3
Chapter 3 30
3
Chapter 3 31
3
Chapter 3 32
3
Chapter 3 34
3
Token Ring Networks
Are Physically Stars,
But Logically Rings
Chapter 3 35
3
• The standard Token Ring 802.2 LLC frames include the same LLC
fields used by the Ethernet 802.2 LLC frame
Chapter 3 36
3
Chapter 3 37
3
Chapter 3 38
3
Chapter 3 39
3
Chapter 3 40
3
Data Field
• This field can be between zero and 18,000 bytes long and
contains the TCP/IP data
Frame Check Sequence Field
• The Frame Check Sequence field is four bytes long and
includes the result of the CRC calculation used to error
check the packet
End Delimiter Field
• This 1-byte field indicates the end of the token ring frame
(except for the Frame Status field)
Chapter 3 41
3
Chapter 3 42
3
• The Token
Ring SNAP
frame format
expands the
standard
802.2 LLC
layer by
adding an
Organization
Code field
and an Ether
Type field
Chapter 3 43
3
Chapter 3 44
3
Hardware Addresses
in the IP Environment
• IP addresses are used to identify individual IP
hosts on a TCP/IP internetwork
• TCP/IP networking uses ARP to determine the
hardware address of the local target for the
packet
• IP hosts maintain an ARP cache—a table of
hardware addresses learned through the ARP
process—in memory
• ARP is used only to find the hardware address of
local IP hosts
Chapter 3 45
3
ARP Broadcasts
Identify the Source
and the Desired IP Address
Chapter 3 46
3
Hardware Addresses
in the IP Environment
• If the IP destination is remote (on another
network), the IP host must refer to its routing
tables to determine the proper router for the
packet
• This is referred to as the route resolution
process
• ARP is not routable
• ARP can also be used to test for a duplicate IP
address on the network
Chapter 3 47
3
Chapter 3 48
3
Chapter 3 49
3
Chapter 3 50
3
Chapter 3 51
3
ARP Reply Packet Is
a Unicast Packet
Chapter 3 52
3
redundant
Chapter 3 53
3
• This field defines the protocol address type in use, and uses the
standard protocol ID values that are also used in the Ethernet II
frame structures
Chapter 3 54
3
Chapter 3 55
3
Chapter 3 56
3
Opcode Field
Chapter 3 57
3
Chapter 3 58
3
Chapter 3 59
3
Chapter 3 60
3
Chapter 3 61
3
ARP Cache
Chapter 3 62
3
ARP Cache
Chapter 3 63
3
IPCONFIG Utility
Indicates the Device’s IP and
Hardware Addresses
Chapter 3 64
3
Chapter 3 65
3
Proxy ARP
Chapter 3 66
3
Chapter 3 67
3
Chapter 3 68
3
Chapter 3 69
3
Chapter 3 70
3
Sending IP Datagrams
Chapter 3 72
3
Chapter 3 73
3
Chapter 3 74
3
Chapter 3 75
3
Chapter 3 76
3
Chapter 3 77
3
Sample of an
ARP Failure Due to
a Discomfiture Network Mask
Chapter 3 78
3
– Lifetime of an IP datagram
Chapter 3 79
3
Lifetime of an IP Datagram
Chapter 3 80
3
Lifetime of an IP Datagram
• If a packet with TTL=1 arrives at a host, what should the host do?
• Process the packet, of course
• The hosts do not need to decrement the TTL value upon receipt
• TRACEROUTE uses the TTL value and the timeout process to
trace the end-to-end path through an internetwork
Chapter 3 81
3
• Figure 3-17
through
3-19 show
the first,
middle, and
last
fragments
of a
fragment
set
Chapter 3 83
3
Second Packet of a
Fragment Set (More to Come Bit Is Set to
1 and the Offset Is 185 [1480 bytes])
Chapter 3 84
3
Chapter 3 85
3
– Type of Service
Chapter 3 86
3
Precedence
Chapter 3 88
3
Chapter 3 89
3
Chapter 3 90
3
Chapter 3 91
3
Chapter 3 92
3
Version Field
Version field
Chapter 3 93
3
Chapter 3 94
3
Chapter 3 95
3
Chapter 3 96
3
Chapter 3 97
3
• This field
defines the
length of the IP
header and
any valid data
(does not
include any
data link
padding)
• In the example
shown in
Figure 3-22,
the total length
is 213 bytes
Chapter 3 98
3
Identification Field
Flags Field
Chapter 3 100
3
Chapter 3 101
3
Chapter 3 102
3
Protocol Field
Chapter 3 103
3
Chapter 3 104
3
Chapter 3 105
3
Destination Address
Chapter 3 106
3
Options Fields
Chapter 3 107
3
Summary
Chapter 3 108
3
Summary
Chapter 3 109
3
Summary
Chapter 3 110
3
Summary
Summary
Chapter 3 112