Internet Protocol, IP Addressing and Datagrams
Download
Report
Transcript Internet Protocol, IP Addressing and Datagrams
G64INC
Introduction to Network Communications
Ho Sooi Hock
Internet Protocol
Outline
•
•
•
•
•
•
Internetworking
IP Addressing Hierarchy
Classful vs. Classless Addressing
Special IP Addresses
IP Datagrams
Fragmentation
Internetworking
• Existence of multiple network
technologies today
• A need to interconnect
heterogeneous networks to form
single internet
– hardware: routers connect different
physical networks
– protocol software: give the illusion
that there is a single virtual (logical)
network providing universal service
Internetworking Protocols
• The TCP/IP Reference Model
– begun in the 1970s
– the Internet has emerged into the
public domain in the 1990s
– controlled by the Internet Engineering
Task Force (IETF)
• TCP/IP used the term host
computer to refer to any system that
connects to an Internet running
applications
• Both hosts and routers use TCP/IP
protocol software
Internet Reference Model
Directed Reading
• Open Systems Interconnect Reference
Model (OSIRM)
– Chapter 1: Introduction and Overview
1.6 to 1.9
Message Transmission Example
Position of IP in TCP/IP Protocol Suite
The IP Address Hierarchy
• Every host is assigned a globally unique 32-bit address
for identification
• Each 32-bit address is divided into two distinct parts
– prefix: physical network to which a host is attached, also
known as network number
– suffix: a host attached to a given physical network, also
known as host number
• Prefixes are coordinated globally and suffixes locally.
Hence the former is unique but the latter can be
duplicated
Classes of IP Address
• Size of prefix and suffix determines maximum
number of networks and maximum number of
hosts per network respectively
• IP defines different classes of address with
different sized prefixes and suffixes
• The first four bits of the address specify the
address class
The Five Classes of IP Address
Division of the Address Space
• Public Internet network numbers are assigned
by Internet Service Providers (ISPs) and these
are coordinated by the Internet Assigned
Number Authority
Default Masks for Classful Addressing
An Addressing Example
Routers and IP Addressing
• Routers are assigned two or more IP addresses
• So are multi-homed computers
Special IP Addresses
Example of this host on this address
Network Addresses
Example of Direct Broadcast Address
Example of Limited Broadcast Address
Example of Loopback Address
CIDR Notation
• A large part of available addresses were wasted due
to the use of classful addresses
• Classless addressing, known as CIDR (Classless
Interdomain Routing) was adopted
• Network suffix can be any number of bits long,
rather being constrained to 8, 16 or 24 bits
• CIDRized network address has the dotted decimal
form a.b.c.d/x.
• x defines the number of mask bits and a.b.c.d is the
first address in the block (by setting 32-x bits to 0s)
• More efficient allocation of IP addresses
IP Datagrams
• Data are transmitted in small units called
packets, with header added containing control
information, e.g. addresses, data length etc.
• Internet protocols define a universal virtual
packet – the IP datagram
• IP datagrams are switched across multiple
physical networks via routers
• IP datagram can be at most 64K octets, including
header and data
IP Datagram Header Format
• TTL field used to prevent looping datagrams
and used for tracing routes
Protocol Field and Encapsulated Data
Examples of Protocol Values
Routers and Routing Tables
• Each router forwards IP datagrams by matching
the destination IP address of the IP header to
entries in a local routing table
• Each entry consists of:
– destination address
– subnet mask
32 bit value that specifies the boundary between network prefix
and suffix
– next hop
IP address of a router or
hardware interface that allows direct delivery
Example Routing Table
Binding Protocol Addresses
• An Internet packet passes through a series of
routers
– each hop takes it over a particular network, either
to a specific computer on that network or to the
next router
– in either case, the sending host or router has to
map between the protocol (IP) address and a
hardware address
– this is known as address resolution
Address Resolution Protocol
• TCP/IP defines the Address Resolution Protocol (ARP)
which defines the format of resolution requests and
responses
• This technique is usually combined with local caching of
hardware addresses
Frame Encapsulation
• Protocols
– TCP – end to end,
identification by port
numbers
– IP – host to host,
identification by IP
addresses
– Network Interface
(Link Layer) – hop to
hop (link to link),
identification by
MAC addresses
MTU and Datagram Size
• Maximum Transmission Unit
– maximum-sized packet that can be carried on a given
physical network
• IP datagrams may have to cope with different MTU
sizes as it passes over an internet
Fragmentation
• A datagram that is larger than
MTU will be fragmented into
smaller fragments
• Each datagram contains a
fragment
• Header fields indicate when the
data is a fragment and also
where it belongs
MTUs for Some Networks
– identification, flags and fragment
offset
Fragmentation Example
• Reassembly done at the final host only
– routers require less state information
– fragments can take different routes
• Whole datagram is lost if any fragment lost
Best Effort Delivery
• Connectionless Service
• IP attempts best effort delivery and does not
guarantee to deal with:
–
–
–
–
datagram duplication
delayed or out of order delivery
corruption of data
datagram loss
• These issues are dealt with by the next higher
transport protocol i.e., TCP (Transmission Control
Protocol)
Acknowledgements
Most lecture slides used in this presentation
are adopted from the same module taught in
Nottingham, UK Campus, with addition of
diagrams from the recommended texts by
Douglas E. Comer and A. Forouzan.