Internet Protocol (IP) - University of Scranton

Download Report

Transcript Internet Protocol (IP) - University of Scranton

Internet Protocol (IP)
• Basic Functions
• Connectionless Protocol
• Packet Encapsulation
Basic Functions of IP
•
Provide for:
– data transfer
– packet addressing
– packet routing
– fragmentation
– detection of packet errors
Packet encapsulation
Net transport
Header (ie
Ethernet)
IP Header
TCP or UDP
Header
Application data
TCP Segment
Datagram
IP Packet
Version
IHL
TOS
Length
Identification
TTL
Flag
Protocol
Fragment Offset
•
•
Checksum
Source Address
•
Destination Address
Options and Padding
TCP Header & Data Payload
IP Packet
•
Version: This field contains the IP
version number, IPv4 or IPv6
IP header length (IHL): The IP header
has a minimum size of 20 bytes, but the
size can vary depending on the size of
the Options field.
Type of service (TOS): This field
indicates the precedence or priority
given to the packet contents. It enables
routing protocols to determine the type
of path along which to send a packet.
Length: The entire IP packet size, which
can be up to 65,535 bytes, is provided in
this field
IP Packet
•
•
Version
IHL
TOS
Length
Identification
TTL
Flag
Protocol
Fragment Offset
•
Checksum
Source Address
Destination Address
•
Options and Padding
TCP Header & Data Payload
IP Packet
•
Identification : IP can convert packets from one
size to another for dissimilar networks
For example, an Ethernet packet may be 64 to
1518 bytes in length, while a Fiber Distributed
Data Interface (FDDI) packet can be up to 4472
bytes, and a 16-Mbps token ring packet can be as
long as 17,800 bytes
IP is able to transfer packets to different types of
networks by fragmenting the packets
– divide one FDDI packet into fragments to
match the 1518-byte maximum on an
Ethernet network
When IP fragments a packet, it assigns a single
group number for all of the fragments and places
that number in the identification field to ensure that
fragments are not reconstructed from the wrong
pieces.
Flags: Flags are used with fragmentation (1) to
convey information and (2) to show when the last
fragment in a sequence has been sent (when a
packet is fragmented).
IP Packet
•
Version
IHL
TOS
Length
Identification
TTL
Flag
Protocol
•
Fragment Offset
Checksum
Source Address
Destination Address
Options and Padding
TCP Header & Data Payload
IP Packet
•
•
Fragment offset: The fragment offset
provides information about how to reconnect
fragments within a single fragment group.
Time to live (TTL): This field contains
information that prevents a packet from
continuously circulating around a network.
– Each time an IP packet goes through a
router, that router reduces the TTL
value by a default amount determined
by the router or set by a network
administrator
– It is checked by each router through
which it passes, so that the packet is
discarded when TTL equals 0.
Protocol: This field is used to show which
protocol-TCP or UDP-is encapsulated in IP
Checksum: The checksum is a 16-bit cyclic
redundancy check that is the sum of all
values contained in every field in the IP
header.
IP Packet
•
Version
IHL
TOS
Length
Identification
TTL
Flag
Protocol
Fragment Offset
•
Checksum
•
Source Address
Destination Address
Options and Padding
•
TCP Header & Data Payload
IP Packet
Source address: This is the network
address and the address of the device
that sent the packet
Destination address: This field
contains the network address and the
address of the receiving device
Options: There are several options that
can be used with IP For example, the
time when the packet is created can be
entered, and specialized security can be
implemented for military and
government implementations
Padding: Padding fills the options area
when there is not enough data to
complete the allocated area, because
the total size (in bits) of the IP header
must be divisible by 32.