Académique Documents
Professionnel Documents
Culture Documents
Tema 5.
Direccionamiento IPv4
Alberto Arellano A. Ing. Msc.
aarellano@espoch.edu.ec
CCNA – CCNP - CCSP
1
IPv4 Address
“The identifier used in the IP layer of the TCP/IP protocol
suite to identify each device connected to the Internet is
called the Internet address or IP address. An IPv4 address
is a 32-bit address that uniquely and universally defines the
connection of a host or a router to the Internet; an IP
address is the address of the interface”.(Berhouz Forouzan)
HOST
TCP/IP uses the term host to refer to an end system that
attaches to the Internet.
HOST
IPv4 Address
11111111111111110000000000000000
An IP address is a hierarchical address that is made up of two parts:
A network portion
A host portion.
Subnet Mask
Used to define the:
Network portion
Host portion
32 bits
11111111.11111111.00000000.00000000
Expressed as:
Dotted decimal
Ex: 255.255.0.0
Slash notation or prefix length
/16 (the number of one bits)
Example
192 168 11 10
192 168 11 0
The prefix length is the number of bits set to 1 in the subnet mask.
It is written in “slash notation”, a “/” followed by the number of
bits set to 1.
For example:
IP address: 192.168.11.10 255.255.255.0
Is the same as: 192.168.11.10 /24
Valid Subnet Mask Values
1 0 0 0 0 0 0 0 128
1 1 0 0 0 0 0 0 192
1 1 1 0 0 0 0 0 224
1 1 1 1 0 0 0 0 240
1 1 1 1 1 0 0 0 248
1 1 1 1 1 1 0 0 252
1 1 1 1 1 1 1 0 254
1 1 1 1 1 1 1 1 255
Subnet Masks
So how do hosts figure out which part of the address is the network portion?
Hosts AND the IPv4 address and the subnet mask.
“1” bits refer to the network portion.
“0” bits refer to the host portion.
Hosts actually use a the Boolean “AND” operation to accomplish this task.
This tells them what network they belong to.
Destination IP Address
A B
192.168.1.100 192.168.2.101
255.255.255.0 255.255.255.0
192.168.1.10 192.168.1.11
Same network?
AND AND
192.168.1.100 192.168.2.101
Same network?
AND AND
portion.
Host Range
Host Addresses in binary
Dynamically
Static Assignment
DHCP Discover
Mac Address
DHCP Request
IP, MAC Address
Client DHCP
Server
DHCP Offer
IP, Lease time
DHCP Ack
IP, Lease time
Dynamic vs. Static IP
Addressing Quiz
Desktop computer Server Router Switch
Source IP addresses
are always unicast
Unicasts:
Packet travels from one host to another specific host.
Multicasts:
Packet travels from one host to a select number of other hosts.
Supports voice and audio broadcasts, news feeds, distribution of
software, re-imaging clients off peak times.
Broadcasts:
Packet travels from one host to all hosts on the local network.
Destination Address Type
Classful Addressing
Class A /8
Class B /16
Class C /24
IPv4 Address Classes
Address # of Possible # of Possible Total Possible
Class Networks Hosts Addresses
Class A. 255.0.0.0 or /8
Was reserved for governments and extremely large organizations.
Class B. 255.255.0.0 or /8
Was reserved for medium/large organizations.
A 0 0 – 127 8 24
B 10 128 - 191 16 16
none.
TEST-NET addresses:
192.0.2.0 to 192.0.2.255 (192.0.2.0 /24)
Subnetting
Problem: Organizations
have multiple networks
which are independently University Network
managed Engineering Medical
Solution 1: Allocate a School School
separate network
address for each network Library
Difficult to manage
From the outside of
the organization, each
network must be
addressable.
Solution 2: Add another
172.16.0.0/24 172.16.10.0/24
172.16.5.0/24 172.16.25.0/24
34
Basic Idea of Subnetting
Split the host number portion of an IP address into a
subnet number and a (smaller) host number.
Result is a 3-layer hierarchy
Then:
Subnets can be freely assigned within the organization
Internally, subnets are treated as separate networks
Subnet structure is not visible outside the organization
How your provider (ISP) sees
you….
150.50.1.0 /24
150.50.2.0 /24
150.50.0.0 /16
150.50.0.0
150.50.3/16
.0 /24
150.50.4.0 /24
150.50.5.0 /24
192.168.1.0
255.255.255.0
Network Host
Network 192.168.1.0/24
Need:
As many subnets as possible, 60 hosts per
subnet
Calculating the number
subnets/hosts
192.168.1. 0 0 0 0 0 0 0 0
255.255.255. 0 0 0 0 0 0 0 0
6 host bits
Network Host
Network 192.168.1.0/24
Need:
As many subnets as possible, 60 hosts per
subnet
Calculating the number
subnets/hosts
Number of subnets
192.168.1. 0 0 0 0 0 0 0 0
255.255.255. 1 1 0 0 0 0 0 0 255.255.255.192
6 host bits
Network Host
Network 192.168.1.0/24
Need:
As many subnets as possible, 60 hosts per subnet
Number of subnets
192.168.1. 0 0 0 0 0 0 0 0
255.255.255. 1 1 0 0 0 0 0 0 255.255.255.192
192.168.1. 0 0 0 0 0 0 0 0 192.168.1.0/26
192.168.1. 0 1 0 0 0 0 0 0 192.168.1.64/26
192.168.1. 1 0 0 0 0 0 0 0 192.168.1.128/26
192.168.1. 1 1 0 0 0 0 0 0 192.168.1.192/26
Number of Hosts per subnet: 6 bits, 64-2 hosts, 64 TOTAL
hosts, 62 usable hosts
Number of Subnets: 2 bits or 4 subnets
Calculating the number
subnets/hosts
192.168.1.0
255.255.255.0
Network Host
Network 192.168.1.0/24
Need:
As many subnets as possible, 12 hosts per
subnet
Calculating the number
subnets/hosts
192.168.1. 0 0 0 0 0 0 0 0
255.255.255. 0 0 0 0 0 0 0 0
4 host bits
Network Host
Network 192.168.1.0/24
Need:
As many subnets as possible, 12 hosts per
subnet
Calculating the number
subnets/hosts
Number of subnets
192.168.1. 0 0 0 0 0 0 0 0
255.255.255. 1 1 1 1 0 0 0 0 255.255.255.240
4 host bits
Network Host
Network 192.168.1.0/24
Need:
As many subnets as possible, 12 hosts per subnet
192.168.1. 0 0 0 0 0 0 0 0 192.168.1.0/28
192.168.1. 0 0 0 1 0 0 0 0 192.168.1.16/28
192.168.1. 0 0 1 0 0 0 0 0 192.168.1.32/28
192.168.1. 0 0 1 1 0 0 0 0 192.168.1.48/28
New Subnet Mask:
192.168.1. 0 1 0 0 0 0 0 0 192.168.1.64/28
255.255.255.240 (/28)
Number of Hosts per
192.168.1. 0 1 0 1 0 0 0 0 192.168.1.80/28
192.168.1. 0 1 1 0 0 0 0 0 192.168.1.96/28
subnet: 4 bits, 16-2
192.168.1. 0 1 1 1 0 0 0 0 192.168.1.112/28
hosts, 16 TOTAL hosts,
192.168.1. 1 0 0 0 0 0 0 0 192.168.1.128/28
14 usable hosts
Number of Subnets: 4
192.168.1. 1 0 0 1 0 0 0 0 192.168.1.144/28
192.168.1. 1 0 1 0 0 0 0 0 192.168.1.160/28
bits or 16 subnets
192.168.1. 1 0 1 1 0 0 0 0 192.168.1.176/28
192.168.1. 1 1 0 0 0 0 0 0 192.168.1.192/28
192.168.1. 1 1 0 1 0 0 0 0 192.168.1.208/28
192.168.1. 1 1 1 0 0 0 0 0 192.168.1.224/28
192.168.1. 1 1 1 1 0 0 0 0 192.168.1.240/28
VLSM
28 to 10.3.255.240 / 28
Subnet 10.4.0.0/16, 4 more bits
are borrowed again, to create 16
subnets with a /20 mask.
– Mask allows for 2,046 host
20 to 10.4.240.0 / 20
Classless Inter-Domain Routing
(CIDR)-Supernetting
Route summarization done by CIDR
Routes are summarized with masks that are less than
that of the default classful mask (supernetting)
-Example:
172.16.0.0 / 13 is the summarized
route for the 172.16.0.0 / 16 to
172.23.0.0 / 16 classful networks
Answer:????