You are on page 1of 35

IPv4 Addressing

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 1
Protocols and Standards

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 2
Reference Models
The OSI Reference Model
 Application - contains protocols used for process-to-process
communications.
 Presentation - provides for common representation of the data.
 Session - provides services to the presentation layer to
organize its dialogue and to manage data exchange.
 Transport - defines services to segment, transfer, and
reassemble the data.
 Network - provides services to exchange the individual pieces
of data over the network between identified end devices.
 Data Link - provides methods for exchanging data frames
between devices over a common media.
 Physical - describes the mechanical, electrical, functional, and
procedural means to transmit bits across physical connections.

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 3
Reference Models
The TCP/IP Protocol Model

 The TCP/IP Protocol Model


Created in the early 1970s for
internetwork
communications.
Open Standard.
Also called The TCP/IP Model
or the Internet Model.

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 4
Reference Models
OSI Model and TCP/IP Model Comparison

 In the OSI model, the network access layer and the application layer of the
TCP/IP model are further divided to describe discrete functions that must
occur at these layers.

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 5
The Network Layer

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 6
Network Layer in Communications
The Network Layer
• The network layer, which resides at
OSI Layer 3, provides services that
allow end devices to exchange data
across a network.
• The network layer uses four processes
in order to provide end-to-end
transport:
 Addressing of end devices – IP addresses
must be unique for identification purposes.
 Encapsulation – The protocol data units
from the transport layer are encapsulated by
adding IP header information including
source and destination IP addresses.
 Routing – The network layer provides
services to direct packets to other networks.
Routers select the best path for a packet to
take to its destination network.
 De-encapsulation – The destination host
de-encapsulates the packet to see if it
matches its own.
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 7
Network Layer in Communications
Network Layer Protocols

• There are several network layer


protocols in existence;
however, the most commonly
implemented are:
 Internet Protocol version 4
(IPv4)
 Internet Protocol version 6
(IPv6)

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 8
Characteristics of the IP Protocol
Encapsulating IP
• At the network layer, IP
encapsulates the transport layer
segment by adding an IP header for
the purpose of delivery to the
destination host.
• The IP header stays the same from
the source to the destination host.
• The process of encapsulating data
layer by layer enables the services
at different layers to scale without
affecting other layers.
• Routers implement different
network layer protocols
concurrently over a network and
use the network layer packet
header for routing.

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 9
Characteristics of the IP Protocol
Characteristics of IP

• IP was designed as a protocol


with low overhead – it provides
only the functions required to
deliver a packet from the source
to a destination.
• An IP packet is sent to the
destination without prior
establishment of a connection
• IP was not designed to track
and manage the flow of
packets.
 These functions, if required, are
performed by other layers –
primarily TCP

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 10
Characteristics of the IP Protocol
IP - Connectionless

• IP is a connectionless
protocol:
 No dedicated end-to-end
connection is created before data
is sent.
 Very similar process as sending
someone a letter through snail
mail.
 Senders do not know whether or
not the destination is present,
reachable, or functional before
sending packets.
 This feature contributes to the
low overhead of IP.

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 11
Characteristics of the IP Protocol
IP – Best Effort Delivery

 IP is a Best Effort Delivery


protocol:
• IP is considered “unreliable”
because it does not guarantee
that all packets that are sent will
be received.
• Unreliable means that IP does
not have the capability to
manage and recover from
undelivered, corrupt, or out of
sequence packets.
• If packets are missing or not in
the correct order at the
destination, upper layer
protocols/services must resolve
these issues.

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 12
Characteristics of the IP Protocol
IP – Media Independent
• IP operates independently from the
media that carries the data at lower
layers of the protocol stack – it
does not care if the media is copper
cables, fiber optics or wireless.
• The OSI data link layer is
responsible for taking the IP packet
and preparing it for transmission
over the communications medium.
• The network layer does have a
maximum size of the PDU that can
be transported – referred to as
MTU (maximum transmission
unit).
• The data link layer tells the
network layer the MTU.

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 13
IPv4 Packet
IPv4 Packet Header

• An IPv4 packet header consists of the fields containing binary numbers.


These numbers identify various settings of the IP packet which are
examined by the Layer 3 process.

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 14
IPv4 Packet
IPv4 Packet Header (cont.)
• IPv4 Packet fields:
 Version – Specifies that the packet is IP version 4
 Internet Header Length (IHL)
 Differentiated Services or DiffServ (DS) – Used to determine the priority of each packet on
the network.
 Total Length
 Identification - Identifying the group of fragments of a single IP datagram
 Flags – Used to control or identify fragments
 Fragment Offset- specifies the offset of a particular fragment relative to the beginning of
the original unfragmented IP datagram
 Time-to-Live (TTL) – Limits the lifetime of a packet – decreased by one at each router
along the way.
 Protocol – Used to identify the next level protocol.
 Header Checksum - Used for error-checking of the header
 Source IPv4 Address – Source address of the packet.
 Destination IPv4 Address – Address of destination.
 Options
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 15
IPv4 Network Addresses

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 16
IPv4 Address Structure
Binary Number System

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 17
IPv4 Address Structure
Converting a Binary Address to Decimal
Practice

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 18
IPv4 Address Structure
Converting from Decimal to Binary

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 19
IPv4 Subnet Mask
Network Portion and Host Portion of an IPv4 Address

 To define the network and host portions of an address, a


devices use a separate 32-bit pattern called a subnet
mask
 The subnet mask does not actually contain the network
or host portion of an IPv4 address, it just says where to
look for these portions in a given IPv4 address
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 20
IPv4 Subnet Mask
Network Portion and Host Portion of an IPv4 Address

Valid Subnet Masks

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 21
IPv4 Subnet Mask
IPv4 Network, Host, and Broadcast Address

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 22
IPv4 Subnet Mask
First Host and Last Host Addresses

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 23
IPv4 Subnet Mask
Bitwise AND Operation

1 AND 1 = 1 1 AND 0 = 0 0 AND 1 = 0 0 AND 0 = 0


Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 24
IPv4 Subnet Mask
Examining the Prefix Length

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 25
IPv4 Unicast, Broadcast, and Multicast
Assigning a Static IPv4 Address to a Host

LAN Interface Properties Configuring a Static IPv4 Address

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 26
IPv4 Unicast, Broadcast, and Multicast
Assigning a Dynamic IPv4 Address to a Host

Verification

DHCP - preferred method of “leasing” IPv4 addresses to hosts on large


networks, reduces the burden on network support staff and virtually
eliminates entry errors

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 27
IPv4 Unicast, Broadcast, and Multicast
Unicast Transmission

In an IPv4 network, the hosts can communicate one of


three different ways:

1. Unicast - the process of sending a packet from one


host to an individual host.

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 28
IPv4 Unicast, Broadcast, and Multicast
Broadcast Transmission
2. Broadcast - the process of sending a packet from one host
to all hosts in the network

Routers do not Directed broadcast


forward a • Destination
limited 172.16.4.255
broadcast! • Hosts within the
172.16.4.0/24
network

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 29
IPv4 Unicast, Broadcast, and Multicast
Multicast Transmission
• Multicast - the process of sending a packet from one host to
a selected group of hosts, possibly in different networks
• Reduces traffic
• Reserved for addressing multicast groups - 224.0.0.0 to
239.255.255.255.
• Link local - 224.0.0.0 to 224.0.0.255 (Example: routing
information exchanged by routing protocols)
• Globally scoped addresses - 224.0.1.0 to 238.255.255.255
(Example: 224.0.1.1 has been reserved for Network Time
Protocol)

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 30
Types of IPv4 Address
Public and Private IPv4 Addresses
Private address blocks are:
 Hosts that do not require access to the Internet can use
private addresses
 10.0.0.0 to 10.255.255.255 (10.0.0.0/8)
 172.16.0.0 to 172.31.255.255 (172.16.0.0/12)
 192.168.0.0 to 192.168.255.255 (192.168.0.0/16)

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 31
Types of IPv4 Address
Special Use IPv4 Addresses
 Network and Broadcast addresses - within each network
the first and last addresses cannot be assigned to hosts
 Loopback address - 127.0.0.1 a special address that hosts
use to direct traffic to themselves (addresses 127.0.0.0 to
127.255.255.255 are reserved)
 Link-Local address - 169.254.0.0 to 169.254.255.255
(169.254.0.0/16) addresses can be automatically assigned to
the local host
 TEST-NET addresses - 192.0.2.0 to 192.0.2.255
(192.0.2.0/24) set aside for teaching and learning purposes,
used in documentation and network examples

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 32
Types of IPv4 Address
Legacy Classful Addressing

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 33
Types of IPv4 Address
Legacy Classful Addressing

Classless Addressing
• Formal name is Classless Inter-Domain Routing (CIDR,
pronounced “cider
• Created a new set of standards that allowed service
providers to allocate IPv4 addresses on any address bit
boundary (prefix length) instead of only by a class A, B, or
C address

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 34
Types of IPv4 Address
Assignment of IP Addresses
Regional Internet Registries (RIRs)
The major registries are:

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 35

You might also like