Day 16 17 IPv4 Addressing
Day 16 17 IPv4 Addressing
11001010101010
IPv4 ADDRESSING
11001010110001101010
11001010110001101010
• An IPv4 address is a 32-bit hierarchical address that is made up of a network portion and a host
portion.
11001010101010
11001010101010
• When determining the network portion versus the host portion, you must look at the 32-bit
stream.
• A subnet mask is used to determine the network and host portions.
11001010110001101010
11001010110001101010
• To identify the network and host portions of an IPv4 address, the subnet mask is compared to the
IPv4 address bit for bit, from left to right.
11001010101010
11001010101010
• The actual process used to
identify the network and
host portions is called
ANDing.
11001010110001101010
11001010110001101010
11001010101010
address 255.0.0.0 11111111.00000000.00000000.00000000 /8
• The prefix length is the number of bits set 255.255.0.0 11111111.11111111.00000000.00000000 /16
to 1 in the subnet mask.
255.255.255.0 11111111.11111111.11111111.00000000 /24
• It is written in “slash notation” therefore,
count the number of bits in the subnet 255.255.255.128 11111111.11111111.11111111.10000000 /25
mask and prepend it with a slash.
255.255.255.192 11111111.11111111.11111111.11000000 /26
11001010110001101010
11001010110001101010
0.
11001010101010
• 1 AND 1 = 1, 0 AND 1 = 0, 1 AND 0 = 0, 0 AND 0 = 0
• 1 = True and 0 = False
11001010110001101010
11001010110001101010
11001010101010
11001010110001101010
11001010110001101010
11001010101010
• Host addresses
• Broadcast address
Network Portion Host Portion Host Bits
11001010110001101010
11001010110001101010
11001010101010
11001010110001101010
11001010110001101010
11001010101010
11001010110001101010
11001010110001101010
11001010101010
11001010110001101010
11001010110001101010
11001010101010
internet service provider (ISP) routers. RFC 1918 Private Address Range
Prefix
• Private addresses are common blocks of
addresses used by most organizations to 10.0.0.0/8 10.0.0.0 - 10.255.255.255
assign IPv4 addresses to internal hosts.
172.16.0.0/12 172.16.0.0 - 172.31.255.255
• Private IPv4 addresses are not unique and can
be used internally within any network.
192.168.0.0/16 192.168.0.0 - 192.168.255.255
• However, private addresses are not globally
routable.
11001010110001101010
11001010110001101010
11001010101010
addresses.
11001010110001101010
11001010110001101010
•Loopback addresses
• 127.0.0.0 /8 (127.0.0.1 to 127.255.255.254)
11001010101010
11001010101010
• Commonly identified as only 127.0.0.1
• Used on a host to test if TCP/IP is operational.
•Link-Local addresses
• 169.254.0.0 /16 (169.254.0.1 to 169.254.255.254)
• Commonly known as the Automatic Private IP Addressing
(APIPA) addresses or self-assigned addresses.
• Used by Windows DHCP clients to self-configure when no
DHCP servers are available.
11001010110001101010
11001010110001101010
11001010101010
• Class A (0.0.0.0/8 to 126.0.0.0/8)
• Class B (128.0.0.0 /16 – 191.255.0.0 /16)
• Class C (192.0.0.0 /24 – 223.255.255.0 /24)
• Class D (224.0.0.0 to 239.0.0.0)
• Class E (240.0.0.0 – 255.0.0.0)
11001010110001101010
11001010110001101010
11001010101010
blocks of IPv4 and IPv6 addresses to five
Regional Internet Registries (RIRs).
11001010110001101010
11001010110001101010
NETWORK SEGMENTATION
Broadcast Domains and Segmentation
11001010101010
send DHCP discover broadcasts to locate a DHCP
server.)
• Switches propagate broadcasts out all interfaces
except the interface on which it was received.
• The only device that stops broadcasts is a router.
• Routers do not propagate broadcasts.
• Each router interface connects to a broadcast
domain and broadcasts are only propagated
within that specific broadcast domain.
11001010110001101010
11001010110001101010
NETWORK SEGMENTATION
Problems with Large Broadcast
Domains
11001010101010
that these hosts can generate excessive
broadcasts and negatively affect the
network.
• The solution is to reduce the size of the
network to create smaller broadcast domains
in a process called subnetting.
• Dividing the network address 172.16.0.0 /16
into two subnets of 200 users each:
172.16.0.0 /24 and 172.16.1.0 /24.
• Broadcasts are only propagated within the
smaller broadcast domains.
11001010110001101010
11001010110001101010
NETWORK SEGMENTATION
Reasons for Segmenting Networks
11001010101010
• Subnetting reduces the number of devices affected by abnormal broadcast traffic.
11001010110001101010
11001010110001101010
• Networks are most easily subnetted at the octet boundary of /8, /16, and /24.
11001010101010
11001010101010
• Notice that using longer prefix lengths decreases the number of hosts per subnet.
Prefix Length Subnet Mask Subnet Mask in Binary (n = network, h = host) # of hosts
nnnnnnnn.hhhhhhhh.hhhhhhhh.hhhhhhhh
/8 255.0.0.0 16,777,214
11111111.00000000.00000000.00000000
nnnnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhhh
/16 255.255.0.0 65,534
11111111.11111111.00000000.00000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh
/24 255.255.255.0 254
11111111.11111111.11111111.00000000
11001010110001101010
11001010110001101010
• In the first table 10.0.0.0/8 is subnetted using /16 and in the second table, a /24 mask.
Subnet Address Host Range Subnet Address Host Range
11001010101010
11001010101010
Broadcast Broadcast
(256 Possible Subnets) (65,534 possible hosts per subnet) (65,536 Possible Subnets) (254 possible hosts per subnet)
11001010110001101010
11001010110001101010
11001010101010
Prefix Length Subnet Mask # of subnets # of hosts
(n = network, h = host)
nnnnnnnn.nnnnnnnn.nnnnnnnn.nhhhhhhh
/25 255.255.255.128 2 126
11111111.11111111.11111111.10000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnhhhhhh
/26 255.255.255.192 4 62
11111111.11111111.11111111.11000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnhhhhh
/27 255.255.255.224 8 30
11111111.11111111.11111111.11100000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnhhhh
/28 255.255.255.240 16 14
11111111.11111111.11111111.11110000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnnhhh
/29 255.255.255.248 32 6
11111111.11111111.11111111.11111000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnnnhh
/30 255.255.255.252 64 2
11111111.11111111.11111111.11111100
11001010110001101010
11001010110001101010
16 prefix
11111111.11111111.10000000.00000000
nnnnnnnn.nnnnnnnn.nnhhhhhh.hhhhhhhh
/18 255.255.192.0 4 16382
11111111.11111111.11000000.00000000
nnnnnnnn.nnnnnnnn.nnnhhhhh.hhhhhhhh
/19 255.255.224.0 8 8190
11111111.11111111.11100000.00000000
• The table highlights all the nnnnnnnn.nnnnnnnn.nnnnhhhh.hhhhhhhh
11001010101010
11001010101010
11111111.11111111.11110000.00000000
possible scenarios for /21 255.255.248.0
nnnnnnnn.nnnnnnnn.nnnnnhhh.hhhhhhhh
32 2046
subnetting a /16 prefix.
11111111.11111111.11111000.00000000
nnnnnnnn.nnnnnnnn.nnnnnnhh.hhhhhhhh
/22 255.255.252.0 64 1022
11111111.11111111.11111100.00000000
nnnnnnnn.nnnnnnnn.nnnnnnnh.hhhhhhhh
/23 255.255.254.0 128 510
11111111.11111111.11111110.00000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh
/24 255.255.255.0 256 254
11111111.11111111.11111111.00000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nhhhhhhh
/25 255.255.255.128 512 126
11111111.11111111.11111111.10000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnhhhhhh
/26 255.255.255.192 1024 62
11111111.11111111.11111111.11000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnhhhhh
/27 255.255.255.224 2048 30
11111111.11111111.11111111.11100000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnhhhh
/28 255.255.255.240 4096 14
11111111.11111111.11111111.11110000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnnhhh
/29 255.255.255.248 8192 6
11111111.11111111.11111111.11111000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnnnhh
/30 255.255.255.252 16384 2
11111111.11111111.11111111.11111100
11001010110001101010
11001010110001101010
11001010101010
172.16.0.0/16 as its internal network address.
11001010101010
means there are 8 bits in the network portion and 24
host bits available to borrow toward subnetting.
• The figure displays the number of subnets that can be
created when borrowing bits from the second and third.
• Notice there are now up to 22 host bits that can be
borrowed (i.e., last two bits cannot be borrowed).
11001010110001101010
11001010110001101010
11001010101010
typically using private IPv4 addresses.
• DMZ – A companies internet facing servers.
Devices in the DMZ use public IPv4
addresses.
• A company could use the 10.0.0.0/8 and
subnet on the /16 or /24 network
boundary.
• The DMZ devices would have to be
configured with public IP addresses
11001010110001101010
11001010110001101010
11001010101010
• The number of host addresses required for each network
• The number of individual subnets needed
Prefix Length Subnet Mask Subnet Mask in Binary # of subnets # of hosts
(n = network, h = host)
nnnnnnnn.nnnnnnnn.nnnnnnnn.nhhhhhhh
/25 255.255.255.128 2 126
11111111.11111111.11111111.10000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnhhhhhh
/26 255.255.255.192 4 62
11111111.11111111.11111111.11000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnhhhhh
/27 255.255.255.224 8 30
11111111.11111111.11111111.11100000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnhhhh
/28 255.255.255.240 16 14
11111111.11111111.11111111.11110000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnnhhh
/29 255.255.255.248 32 6
11111111.11111111.11111111.11111000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnnnhh
/30 255.255.255.252 64 2
11111111.11111111.11111111.11111100
11001010110001101010
11001010110001101010
11001010101010
172.16.0.0/22 (10 host bits) by its ISP
providing 1,022 host addresses.
• There are five sites and therefore five
internet connections which means the
organization requires 10 subnets with the
largest subnet requires 40 addresses.
• It allocated 10 subnets with a /26 (i.e.,
255.255.255.192) subnet mask.
11001010110001101010
11001010110001101010
VLSM
Host Addresses without Subnetting
0
11001010101010
11001010101010
Address Space
.00000000
255
11001010110001101010
11001010110001101010
VLSM
Host Addresses with One Bit Borrowed for Subnetting
Borrowed Bit
First Bit 0
11001010101010
11001010101010
0 Address Space Subnet 1
.00000000
127
128
255
11001010110001101010
11001010110001101010
VLSM
Host Addresses with Two Bits Borrowed for Subnetting
Borrowed Bits Second Bit 0 1
First Bit 0 64
11001010101010
11001010101010
0 Address Space Subnet 1 Address Space Subnet 2
.00000000 .01000000
63 127
128 192
191 255
11001010110001101010
11001010110001101010
VLSM
Address Space 3 subnetted with additional bit borrowed
Borrowed Bits Second Bit 0 1
0 64
11001010101010
11001010101010
0 Address Space Subnet 1 Address Space Subnet 2
.00000000 .01000000
63 127
Third Bit
128 192
Address Space Subnet 3A
0
.10000000
159 Address Space Subnet 4
1
160 Address Space Subnet 3B .11000000
1 .10100000
191 255
11001010110001101010
11001010110001101010
VLSM
Address Space 3B subnetted with additional bit borrowed
Borrowed Bits Second Bit 0 1
First Bit 0 64
11001010101010
11001010101010
0 Address Space Subnet 1 Address Space Subnet 2
.00000000 .01000000
63 127
Third Bit
128 192
Address Space Subnet 3A
0
.10000000
159 Address Space Subnet 4
1
Fourth Bit 0 160 Address Space Subnet 3B1 .11000000
1 .10100000 175
176 Address Space Subnet 3B2
1
.10110000 191 255
11001010110001101010
11001010110001101010
VLSM
IPv4 Address Conservation
•Given the topology, 7 subnets are required (i.e, four LANs and three WAN links) and the largest
number of host is in Building D with 28 hosts.
11001010101010
11001010101010
• A /27 mask would provide 8 subnets of 30 host IP addresses and therefore support this topology.
11001010110001101010
11001010110001101010
VLSM
IPv4 Address Conservation
•However, the point-to-point WAN links only require two addresses and
therefore waste 28 addresses each for a total of 84 unused addresses.
11001010101010
11001010101010
• Applying a traditional subnetting scheme to this scenario is not very efficient and is wasteful.
• VLSM was developed to avoid wasting addresses by enabling us to subnet a subnet.
11001010110001101010
11001010110001101010
VLSM
VLSM
11001010101010
illustrates how VLSM can be used to subnet a subnet and
divided the last subnet into eight /30 subnets.
• When using VLSM, always begin by satisfying the host
requirements of the largest subnet and continue
subnetting until the host requirements of the smallest
subnet are satisfied.
11001010110001101010
11001010110001101010
VLSM
VLSM Topology Address Assignment
Using VLSM subnets, the LAN and inter-router networks can be addressed without unnecessary waste
as shown in the logical topology diagram.
11001010101010
11001010101010
11001010110001101010
11001010110001101010
STRUCTURED DESIGN
IPv4 Network Address Planning
11001010101010
• To develop an IPv4 network wide addressing scheme, you need to know how many subnets are
needed, how many hosts a particular subnet requires, what devices are part of the subnet, which
parts of your network use private addresses, and which use public, and many other determining
factors.
•Examine the needs of an organization’s network usage and how the subnets will be
structured.
• Perform a network requirement study by looking at the entire network to determining how each area
will be segmented.
• Determine how many subnets are needed and how many hosts per subnet.
• Determine DHCP address pools and Layer 2 VLAN pools.
11001010110001101010
11001010110001101010
STRUCTURED DESIGN
Device Address Assignment
•Within a network, there are different types of devices that require addresses:
• End user clients – Most use DHCP to reduce errors and burden on network support staff. IPv6 clients
11001010101010
11001010101010
can obtain address information using DHCPv6 or SLAAC.
• Servers and peripherals – These should have a predictable static IP address.
• Servers that are accessible from the internet – Servers must have a public IPv4 address, most often
accessed using NAT.
• Intermediary devices – Devices are assigned addresses for network management, monitoring, and
security.
• Gateway – Routers and firewall devices are gateway for the hosts in that network.
KEY TERMS
Key Terms
octet boundary
intranet
DMZ (demilitarized zone)
11001010101010
11001010101010
variable-length subnet masking (VLSM)
11001010110001101010
11001010110001101010
SUMMARY
Summary
IPv4 Addressing Structure
IPv4 Unicast, Broadcast, and Multicast
11001010101010
11001010101010
Network Segmentation
Subnet an IPv4 Network
Subnet a /16 and a /8 Prefix
Subnet to Meet Requirements
Variable-Length Subnet Masking
Structured Design
11001010110001101010
11001010110001101010
CHECK YOUR
11001010101010
11001010101010
UNDERSTANDING
QUESTIONS
11001010110001101010
11001010110001101010
11001010101010
A. /25
B. /26
C. /27
D. /28
11001010110001101010
11001010110001101010
11001010101010
A. 254
B. 190
C. 192
D. 62
E. 64
11001010110001101010
11001010110001101010
11001010101010
A. 255.255.255.0
B. 255.255.255.128
C. 255.255.255.224
D. 255.255.255.240
11001010110001101010
11001010110001101010
11001010101010
A. 1
B. 2
C. 4
D. 8
E. 16
F. 64
11001010110001101010
11001010110001101010
11001010101010
A. 255.255.255.248
B. 255.255.224.0
C. 255.255.240.0
D. 255.255.255.0
E. 255.255.255.192
11001010110001101010
11001010110001101010
11001010101010
A. All the subnets are equally sized.
11001010110001101010
11001010110001101010
11001010101010
A. to identify the broadcast address of the destination network
11001010110001101010
11001010110001101010
11001010101010
A. 256
B. 254
C. 62
D. 30
E. 16
F. 32
11001010110001101010
11001010110001101010
11001010101010
A. 255.255.255.224
B. 255.255.255.128
C. 255.255.255.240
D. 255.255.255.248
11001010110001101010
11001010110001101010
11001010101010
A. subnet portion
B. network portion
C. logical portion
D. host portion
E. physical portion
F. broadcast portion
11001010110001101010
11001010110001101010
11001010101010
A. 64
B. 8
C. 2
D. 32
E. 16
F. 4
11001010110001101010
11001010110001101010
11001010101010
A. network address
B. multicast address
C. host address
D. broadcast address
11001010110001101010
11001010110001101010
11001010101010
A. 256
B. 254
C. 62
D. 32
E. 16
F. 14
11001010110001101010
11001010110001101010
11001010101010
A. to uniquely identify a host on a network
11001010110001101010
11001010110001101010
11001010101010
A. 2
B. 6
C. 14
D. 30
E. 62
11001010110001101010
11001010101010 11001010110001101010
11001010101010
11001010110001101010
11001010110001101010
QUESTION NO: 77
You are tasked with verifying the following requirements are met in order to ensure network
security.
Datacenter
Ensure network is subnetted to allow all devices to communicate properly while minimizing address
space usage Provide a dedicated server to resolve IP addresses and hostnames correctly and handle
port 53 traffic.
11001010101010
11001010101010
Building A
Ensure network is subnetted to allow all devices to communicate properly while minimizing address
space usage Provide devices to support 5 additional different office users.
Add an additional mobile user
Replace the Telnet server with a more secure solution.
Screened subnet
Ensure network is subnetted to allow all devices to communicate properly while minimizing address
space usage Provide a server to handle external 80/443 traffic.
Provide a server to handle port 20/21 traffic.
11001010110001101010
11001010101010 11001010110001101010
11001010101010
İn .pdf the answer is wrong
11001010110001101010
11001010101010 11001010110001101010
11001010101010
İn .pdf the answer is wrong
11001010110001101010
11001010101010 11001010110001101010
11001010101010
11001010110001101010
11001010101010 11001010110001101010
11001010101010
11001010110001101010
11001010101010 11001010110001101010
11001010101010
11001010110001101010
11001010101010 11001010110001101010
11001010101010
11001010110001101010
11001010101010 11001010110001101010
11001010101010
11001010110001101010
11001010101010 11001010110001101010
11001010101010
11001010110001101010
11001010101010 11001010110001101010
11001010101010
11001010110001101010
11001010101010 11001010110001101010
11001010101010
11001010110001101010
11001010101010 11001010110001101010
11001010101010
11001010110001101010
11001010101010 11001010110001101010
11001010101010
11001010110001101010
11001010101010 11001010110001101010
11001010101010
11001010110001101010
11001010101010 11001010110001101010
11001010101010
11001010110001101010
11001010101010 11001010110001101010
11001010101010
11001010110001101010
11001010101010 11001010110001101010
11001010101010
11001010110001101010
11001010110001101010
220
11001010101010
11001010101010
11001010110001101010
11001010110001101010
553
11001010101010
11001010101010
11001010110001101010