IP Addresses and Subneting

Download as pdf or txt
Download as pdf or txt
You are on page 1of 116

IP versus MAC Addresses Section

IP versus MAC Addresses


MAC Addresses
Media Access Control (MAC)
• Physical address of the network adapter card
• OSI Layer 2 (Data Link) Layer Address
• TCP/IP Layer 1 (Network Interface) Layer Address
• Used in LANs with Switching

Six bytes (48 bits), Usually Represented Hexadecimal


• First three bytes (24 bits) are assigned by the IEEE to the manufacturer
o Organizationally Unique Identifier (OUI) assigned by IEEE (ex: Dell or HP)
• Last three bytes (24 bits) are usually assigned sequentially:
o Unique Numbers

00:21:70:6f:06:f2 00-21-70-6F-06-F2

224 = ~16.7 Million Unique Addresses


IP Addresses
• An IP Address is a logical address used in order to uniquely identify
a device on an IP network.
• It’s a Network Layer address associated with routing.
o OSI Layer 3: Network Layer
o TCP/IP Layer 2: Internet Layer
• There are two versions:
o IP version 4 (IPv4)
▪ Example: 192.168.0.1
o IP version 6 (IPv6)
▪ Example: 2001:DB8:85A3:0:0:8A2E:370:7334
• We’ll be discussing both versions in this course.
Comparing IP and MAC Addresses
IP Addresses MAC Addresses

• Network (OSI Layer 3) Addresses • Data Link (OSI Layer 2) Addresses

• Logical Addresses • Physical Addresses

• Assigned in Operating System • Physically burned on NIC

• Allows network-to-network • Allows internetwork communication via


communication via routers hubs, switches, and routers

• WAN communication • Local LAN communication


Binary Math Worksheet ANSWER KEY

BINARY MATH WORKSHEET ANSWER KEY

CONVERSION CHART

128 + 64 + 32 + 16 + 8 + 4 + 2 + 1

1. CONVERT 11110000 TO DECIMAL

128 64 32 16 8 4 2 1
Binary 1 1 1 1 0 0 0 0 =
Decimal 128 + 64 + 32 + 16 + 0 + 0 + 0 + 0 = 240 Decimal

2. CONVERT 10011001 TO DECIMAL

128 64 32 16 8 4 2 1
Binary 1 0 0 1 1 0 0 1 =
Decimal 128 + 0 + 0 + 16 + 8 + 0 + 0 + 1 = 153 Decimal

3. CONVERT 01101011 TO DECIMAL

128 64 32 16 8 4 2 1
Binary 0 1 1 0 1 0 1 1 =
Decimal 0 + 64 + 32 + 0 + 8 + 0 + 2 + 1 = 107 Decimal

4. CONVERT 10110011 TO DECIMAL

128 64 32 16 8 4 2 1
Binary 1 0 1 1 0 0 1 1 =
Decimal 128 + 0 + 32 + 16 + 0 + 0 + 2 + 1 = 179 Decimal

5. CONVERT 240 TO BINARY

128 64 32 16 8 4 2 1
Binary 1 1 1 1 0 0 0 0 = 11110000 Binary
Decimal 128 + 64 + 32 + 16 + 0 + 0 + 0 + 0 =
Binary Math Worksheet ANSWER KEY

6. CONVERT 163 TO BINARY

128 64 32 16 8 4 2 1
Binary 1 0 1 0 0 0 1 1 = 10100011 Binary
Decimal 128 + 0 + 32 + 0 + 0 + 0 + 2 + 1 =

7. CONVERT 94 TO BINARY

128 64 32 16 8 4 2 1
Binary 0 1 0 1 1 1 1 0 = 01011110 Binary
Decimal 0 + 64 + 0 + 16 + 8 + 4 + 2 + 0 =

8. CONVERT 225 TO BINARY

128 64 32 16 8 4 2 1
Binary 1 1 1 0 0 0 0 1 = 11100001 Binary
Decimal 128 + 64 + 32 + 0 + 0 + 0 + 0 + 1 =

9. CONVERT THE FOLLOWING IP ADDRESS FROM DECIMAL TO BINARY

192.168.98.18

• 192 = 11000000
• 168 = 10101000
• 98 = 01100010
• 18 = 00010010

Binary Format: 11000000. 10101000. 01100010. 00010010

10. CONVERT THE FOLLOWING IP ADDRESS FROM BINARY TO DECIMAL

01000010.11010010.11000110.11000101

• 01000010 = 66
• 11010010 = 210
• 11000110 = 198
• 11000101 = 197

Dotted Decimal Format: 66.210.198.197


Binary Math Worksheet

BINARY MATH WORKSHEET

CONVERSION CHART

128 + 64 + 32 + 16 + 8 + 4 + 2 + 1

1. CONVERT 11110000 TO DECIMAL

128 64 32 16 8 4 2 1
Binary =
Decimal + + + + + + + =

2. CONVERT 10011001 TO DECIMAL

128 64 32 16 8 4 2 1
Binary =
Decimal + + + + + + + =

3. CONVERT 01101011 TO DECIMAL

128 64 32 16 8 4 2 1
Binary =
Decimal + + + + + + + =

4. CONVERT 10110011 TO DECIMAL

128 64 32 16 8 4 2 1
Binary =
Decimal + + + + + + + =

5. CONVERT 240 TO BINARY

128 64 32 16 8 4 2 1
Binary =
Decimal + + + + + + + =
Binary Math Worksheet

6. CONVERT 163 TO BINARY

128 64 32 16 8 4 2 1
Binary =
Decimal + + + + + + + =

7. CONVERT 94 TO BINARY

128 64 32 16 8 4 2 1
Binary =
Decimal + + + + + + + =

8. CONVERT 225 TO BINARY

128 64 32 16 8 4 2 1
Binary =
Decimal + + + + + + + =

9. CONVERT THE FOLLOWING IP ADDRESS FROM DECIMAL TO BINARY

192.168.98.18

10. CONVERT THE FOLLOWING IP ADDRESS FROM BINARY TO DECIMAL

01000010.11010010.11000110.11000101
Understanding IPv4 Addresses & Binary Math Section

Understanding IPv4 Addresses & Binary Math


Understanding IPv4 Addresses
• An IP Address is a logical address used in order to uniquely identify a device
on an IP network.
• It’s a Network Layer Address
• There are Two Versions:
o IP version 4 (IPv4)
o IP version 6 (IPv6)
• This lesson focuses on IPv4, and we’ll discuss IPv6 later in the course.
IPv4 Address Anatomy
• Made up of 32 binary bits, which can be divided into a network portion and a
host portion with the help of a subnet mask.
o The 32 binary bits are broken into four octets (1 octet = 8 bits).
o Each octet is converted to decimal and separated by a period (dot).
o For this reason, an IP address is said to be expressed in dotted decimal format.

192 . 168 . 1 . 131


11000000.10101000.00000001.10000011

8 bits = 1 byte = 1 octet

32 bits = 4 bytes = 4 octets


IPv4 Address Anatomy

192 . 168 . 1 . 131


11000000.10101000.00000001.10000011

8 bits = 1 byte = 1 octet

32 bits = 4 bytes = 4 octets

First Second Third Fourth


Octet Octet Octet Octet
192 . 168 . 1 . 131

11000000 . 10101000 . 00000001 . 10000011

8 bits 8 bits 8 bits 8 bits


Network and Host Portion
• An IP address is broken down into two parts:
• Network Address
• Uniquely identifies each network
• Your Street Name: 7682 Wilshire Drive
• Host Address
• Uniquely identifies each machine on a network
• Your House Address: 7682 Wilshire Drive

• Network Address + Host Address = IP Address


• Wilshire Drive 7682
IPv4 Address Components
• Each device on a network is assigned an IP address, subnet mask and default
gateway:
o IP Address: Unique logical address assigned to each device on a network.
o Subnet Mask: Used by the device to determine what subnet it’s on, specifically the
network and host portions of the IP address.
o Default Gateway: The IP address of a network’s router that allows devices on the local
network to communicate with other networks.
Basics of Binary Math
Lecture Goals
• Convert Binary to Decimal
• Convert Decimal to Binary
Basics of Binary Math
Why is it important?
We need to know basic binary math to perform subnetting, as well as to
understand how IPv4 addresses work.

Remember This
128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255
What is the binary 11111111 in decimal?

128 64 32 16 8 4 2 1
Binary 1 1 1 1 1 1 1 1
Decimal 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255 Decimal

Add the number where there is a “1”.


Add zero, when there is a “0”.
What is the binary 10101010 in decimal?

128 64 32 16 8 4 2 1
Binary 1 0 1 0 1 0 1 0
Decimal 128 + 0 + 32 + 0 + 8 + 0 + 2 + 0 = 170 Decimal

Add the number where there is a “1”.


Add zero, when there is a “0”.
What is the binary 10000011 in decimal?

128 64 32 16 8 4 2 1
Binary 1 0 0 0 0 0 1 1
Decimal 128 + 0 + 0 + 0 + 0 + 0 + 2 + 1 = 131 Decimal

Add the number where there is a “1”.


Add zero, when there is a “0”.
What’s 192 in binary?

128 64 32 16 8 4 2 1
Binary 1 1 0 0 0 0 0 0 = 11000000
Decimal 128 + 64 + 0 + 0 + 0 + 0 + 0 + 0 = 192 Decimal

Start adding the numbers from left to right until you achieve the decimal amount
you are looking for!
What’s 202 in binary?

128 64 32 16 8 4 2 1
Binary 1 1 0 0 1 0 1 0 = 11001010
Decimal 128 + 64 + 0 + 0 + 8 + 0 + 2 + 0 = 202 Decimal

Start adding the numbers from left to right until you achieve the decimal amount
you are looking for!
What’s 54 in binary?

128 64 32 16 8 4 2 1
Binary 0 0 1 1 0 1 1 0 = 00110110
Decimal 0 + 0 + 32 + 16 + 0 + 4 + 2 + 0 = 54 Decimal

Start adding the numbers from left to right until you achieve the decimal amount
you are looking for!
IP Address Conversion Process

192. 168. 32. 4 Dotted Decimal

11000000. 10101000. 00100000. 00000100 Binary

1st Octet 2nd Octet 3rd Octet 4th Octet

Whether you are given an IP address in dotted-decimal or binary format, follow


the respective process above for each octet one by one until you have completed
the process.
A Deeper Dive into IPv4 Addresses and Subnet Masks Section

A Deeper Dive into IPv4 Addresses


and Subnet Masks
IPv4 Address Classes (Simplified)

Class Network Bits Host Bits Address Range

A 8 24 1.0.0.0 – 126.255.255.255

B 16 16 128.0.0.0 – 191.255.255.255

C 24 8 192.0.0.0 – 223.255.255.255
Network and Host Bits
IPv4 Address Classes (Detailed)

Leading Network Remaining Number of Hosts Per Default


Class
Bits Bits Bits Networks Network Subnet Mask

Class A 0 (1-126) 8 24 128 (27) 16,777,216 (224) 255.0.0.0

Class B 10 (128-191) 16 16 16,384 (214) 65,536(216) 255.255.0.0

Class C 110 (192-223) 24 8 2,097,152 (221) 256(28) 255.255.255.0

Class D 1110 (224-239)


Not Not Not Not Not
(multicast) Defined Defined Defined Defined Defined

Class E 1111 (240-255)


Not Not Not Not Not
(reserved) Defined Defined Defined Defined Defined
Default Subnet Masks
• The Subnet Mask tells you which portion of the IP address identifies the
network and which portion identifies the host.
• Below are default Class A, B, and C Subnet Masks.
Let’s Practice
What class are the following IP Addresses?

• IP Address: 9.10.40.15
• Subnet Mask: 255.0.0.0

• IP Address: 135.240.110.100
• Subnet Mask: 255.255.0.0

• IP Address: 196.200.10.5
• Subnet Mask: 255.255.255.0
CIDR Notation
• CIDR: Classless Inter-Domain Routing
o A methodology for subnetting
o “Slash” Notation tells you how many bits are associated with the Subnet Mask

• A shortcut way of telling us what the Subnet Mask is:


o /8 = 11111111.00000000.00000000.00000000
o /8 = 255.0.0.0

• 192.168.1.0 /24 = 255.255.255.0


• 10.1.0.0 /16 = 255.255.0.0
• 196.10.10.0/25 = 255.255.255.128
Understanding the Power of 2
• We use the power of 2 in IP addressing and subnetting.
• It’s important to memorize the power of 2.

21 = 2 22 = 4 23 = 8 24 = 16

25 = 32 26 = 64 27 = 128 28 = 256

29 = 512 210 = 1,024 211 = 2,048 212 = 4,096


Using Power of 2 to Determine Network Hosts

• Hosts Per Network = 2h – 2, where h is the number of host bits available.


• We subtract two because each network includes a network address and
broadcast address that are not available for use by network end devices.
Public versus Private IP Addresses
Public IP Addresses Private IP Addresses
• Original Design of Internet • “Unregistered” – Free for Use by
• “Registered” Public IP Addresses Anybody!

• Assigned by an ISP to a Business or • Designed for Use within Private


Home Internal Networks

• Must be Globally Unique • Can Be Used Over and Over Again


o Web Servers • Cannot be Used or Routed on a Public
Network
o DNS Servers
o Routers • Utilizes NAT to “Speak” to Public
Networks, i.e., the Internet!
• By the Early 1990s, the World was
Running out of Public IP Addresses
• Private IP Addresses & Network
Address Translation (NAT) were Born!
Private IP Address Ranges

Class IP Address Range Network ID(s) (CIDR Notation) Number of Addresses


10.0.0.0 /8 16,777,216 IP Addresses
A 10.0.0.0 – 10.255.255.255
• 1 Private Class A Network Per Network ID
172.16.0.0 – 172.31.0.0 /16 65,534 IP Addresses
B 172.16.0.0 – 172.31.255.255
• 16 Private Class B Networks Per Network ID
192.168.0.0 – 192.168.255.0 /24 254 IP Addresses
C 192.168.0.0 – 192.168.255.255
• 256 Private Class C Networks Per Network ID
Public versus Private IP Addresses Visualized
The Loopback Address
• 127.0.0.0 to 127.255.255.255 is reserved for loopback, i.e., a host’s own address,
also known as the localhost address.
o 127.0.0.1 is typically configured as the default loopback address on operating systems.
• Used for diagnostics purposes to check that TCP/IP is correctly installed on a
host’s operating system.
o When a process creates a packet destined to the loopback address, the operating
system loops it back to itself without it ever interfacing with the NIC.
o Data sent on the loopback is forwarded by the operating system to a virtual network
interface within the operating system.
• If you can successfully ping 127.0.0.1 or any IP within the loopback range, then
TCP/IP on your computer is properly working.
o Ping 127.0.0.1
o Ping localhost
o Ping loopback
Introduction IPv4 to Subnetting Section

Introduction IPv4 to Subnetting


Why Subnet?
• Using default Class A, B and C subnets (called Classful IP Addressing)
is inefficient:
o Wastes unused IP Addresses (Public IP Addresses)
• Allows you to create multiple logical networks that exist within a
single Class A, B, or C network.
o Breaks up larger networks into multiple smaller sub-networks, which are
called subnets
• Allows for more efficient routing via router summarization.
• Increased network security!
Fixed Length Subnetting
• We will be learning about fixed-length subnetting, known as a fixed-
length subnet mask (FLSM).
• There is also variable-length subnetting (VLSM), which is beyond the
scope of this beginner’s course.
Class C Subnetting Example
• You’re the network administrator for the
Computer Science department at a
university.
• You’re setting up four new lecture halls that
must have their own 60-person wireless
network.
• You’ve been assigned the 200.15.178.0 Class
C Network by the university, that supports
254 hosts per network by default.
• How do you break up this one Class C
network into 4 smaller networks that
support 60 host IP addresses per network?
• You subnet it.
• Subnetting allows your to breakup a larger
network into smaller networks (subnets).
Process of Subnetting
• We borrow host bits to create more sub-networks (subnets) from a
Class A, B, or C network.

• When you borrow hosts bits:


o You create additional sub-networks, i.e., subnets
o You also decrease the amount of host IP addresses available to use
How to Create Subnets
• Borrow bits from the host portion of an IP address
• Each bit we borrow is equal to 21 Subnets
• Borrow 1 Host Bit = 21 = 2
• Borrow 2 Host Bits = 22 = 4
• Borrow 3 Host Bits = 23 = 8
• Borrow 4 Host Bits = 24 = 16
• Etc.
Creating Subnets Visualized
Subnetting Questions
• To Create a Subnet, Answer the Following Questions:
o How many subnets are needed?
o How many hosts do you need per subnet?
Class C Possible Subnets
Binary (N.N.N.H) Decimal CIDR # Subnets (2x) Block Size (2y) # Hosts (2y - 2)
N.N.N.00000000 255.255.255.0 /24 20 = 1 28 = 256 28 – 2 = 254
N.N.N.10000000 255.255.255.128 /25 21 = 2 27 = 128 27 – 2 = 126
N.N.N.11000000 255.255.255.192 /26 22 = 4 26 = 64 26 – 2 = 62
N.N.N.11100000 255.255.255.224 /27 23 = 8 25 = 32 25 – 2 = 30
N.N.N.11110000 255.255.255.240 /28 24 = 16 24 = 16 24 – 2 = 14
N.N.N.11111000 255.255.255.248 /29 25 = 32 23 = 8 23 – 2 = 6
N.N.N.11111100 255.255.255.252 /30 26 = 64 22 = 4 22 – 2 = 2

Number of Subnets (2x)


• X = number of host bits we borrow to create subnets
Block Size (2y)
• Y = number of remaining host bits left that are used for the subnet IP addresses
Hosts per Subnet (2y – 2)
• There are two addresses per network (or subnet) that we cannot use to assign to hosts on that network:
o Network Address: This is the address used to uniquely identify the network (or subnet).
o Broadcast Address: Address reserved for broadcast communication on the network.
Class B Possible Subnets
Binary (N.N.H.H) Decimal CIDR # Subnets (2x) Block Size (2y) # Hosts (2y - 2)
N.N.00000000.00000000 255.255.0.0 /16 20 = 1 216 = 65,536 216 – 2 = 65,534
N.N.10000000.00000000 255.255.128.0 /17 21 = 2 215 = 32,768 215 – 2 = 32,766
N.N.11000000.00000000 255.255.192.0 /18 22 = 4 214 = 16,384 214 – 2 = 16,382
N.N.11100000.00000000 255.255.224.0 /19 23 = 8 213 = 8,192 213 – 2 = 8,190
N.N.11110000.00000000 255.255.240.0 /20 24 = 16 212 = 4,096 212 – 2 = 4,094
N.N.11111000.00000000 255.255.248.0 /21 25 = 32 211 = 2,048 211 – 2 = 2,046
N.N.11111100.00000000 255.255.252.0 /22 26 = 64 210 = 1,024 210 – 2 = 1,022
N.N.11111110.00000000 255.255.254.0 /23 27 = 128 29 = 512 29 – 2 = 510
N.N.11111111.00000000 255.255.255.0 /24 28 = 256 28 = 256 28 – 2 = 254
N.N.11111111.10000000 255.255.255.128 /25 29 = 512 27 = 128 27 – 2 = 126
N.N.11111111.11000000 255.255.255.192 /26 210 = 1,024 26 = 64 26 – 2 = 62
N.N.11111111.11100000 255.255.255.224 /27 211 = 2,048 25 = 32 25 – 2 = 30
N.N.11111111.11110000 255.255.255.240 /28 212 = 4,096 24 = 16 24 – 2 = 14
N.N.11111111.11111000 255.255.255.248 /29 213 = 8,192 23 = 8 23 – 2 = 6
N.N.11111111.11111100 255.255.255.252 /30 214 = 16,384 22 = 4 22 – 2 = 2
Class A Possible Subnets
Binary (N.H.H.H) Decimal CIDR # Subnets (2x) Block Size (2y) # Hosts (2y - 2)
N.00000000.00000000.00000000 255.0.0.0 /8 20 = 1 222 = 16,777,216 222 – 2 = 16,777,214
N.10000000.00000000.00000000 255.128.0.0 /9 21 = 2 223 = 8,388,608 223 – 2 = 8,388,606
N.11000000.00000000.00000000 255.192.0.0 /10 22 = 4 222 = 4,194,304 222 – 2 = 4,194,302
N.11100000.00000000.00000000 255.224.0.0 /11 23 = 8 221 = 2,097,152 221 – 2 = 2,097,150
N.11110000.00000000.00000000 255.240.0.0 /12 24 = 16 220 = 1,048,576 220 – 2 = 1,048,574
N.11111000.00000000.00000000 255.248.0.0 /13 25 = 32 219 = 524,288 219 – 2 = 524,286
N.11111100.00000000.00000000 255.252.0.0 /14 26 = 64 218 = 262,144 218 – 2 = 262,142
N.11111110.00000000.00000000 255.254.0.0 /15 27 = 128 217 = 131,072 217 – 2 = 131,070
N.11111111.00000000.00000000 255.255.0.0 /16 28 = 256 216 = 65,536 216 – 2 = 65,534
N.11111111.10000000.00000000 255.255.128.0 /17 29 = 512 215 = 32,768 215 – 2 = 32,766
N.11111111.11000000.00000000 255.255.192.0 /18 210 = 1,024 214 = 16,384 214 – 2 = 16,382
N.11111111.11100000.00000000 255.255.224.0 /19 211 = 2,048 213 = 8,192 213 – 2 = 8,190
N.11111111.11110000.00000000 255.255.240.0 /20 212 = 4,096 212 = 4,096 212 – 2 = 4,094
N.11111111.11111000.00000000 255.255.248.0 /21 213 = 8,192 211 = 2,048 211 – 2 = 2,046
N.11111111.11111100.00000000 255.255.252.0 /22 214 = 16,384 210 = 1,024 210 – 2 = 1,022
N.11111111.11111110.00000000 255.255.254.0 /23 215 = 32,768 29 = 512 29 – 2 = 510
N.11111111.11111111.00000000 255.255.255.0 /24 216 = 65,536 28 = 256 28 – 2 = 254
N.11111111.11111111.10000000 255.255.255.128 /25 217 = 131,072 27 = 128 27 – 2 = 126
N.11111111.11111111.11000000 255.255.255.192 /26 218 = 262,144 26 = 64 26 – 2 = 62
N.11111111.11111111.11100000 255.255.255.224 /27 219 = 524,288 25 = 32 25 – 2 = 30
N.11111111.11111111.11110000 255.255.255.240 /28 220 = 1,048,576 24 = 16 24 – 2 = 14
N.11111111.11111111.11111000 255.255.255.248 /29 221 = 2,097,152 23 = 8 23 – 2 = 6
N.11111111.11111111.11111100 255.255.255.252 /30 222 = 4,194,304 22 = 4 22 – 2 = 2
Subnet Calculation Table (2x)
Host Bits Borrowed 2x Number of Subnets Created
1 21 2
2 22 4
3 23 8
4 24 16
5 25 32
6 26 64
7 27 128
8 28 256
9 29 512
10 210 1,024
11 211 2,048
12 212 4,096
Etc.…
Subnet Hosts & Addresses Calculation Table (2Y)

Host Bits Left 2y Addresses per Subnet (2y) Hosts per Subnet (2y – 2)
1 21 2 0
2 22 4 2
3 23 8 6
4 24 16 14
5 25 32 30
6 26 64 62
7 27 128 126
8 28 256 254
9 29 512 510
10 210 1,024 1,022
11 211 2,048 2,046
12 212 4,096 4,094
Subnetting Reference Material

Subnetting Reference Tables


POWER OF 2’S TABLE

21 = 2 29 = 512
22 = 4 210 = 1,024
23 = 8 211 = 2,048
24 = 16 212 = 4,096
25 = 32 213 = 8,192
26 = 64 214 = 16,384
27 = 128 215 = 32,768
28 = 256 216 = 65,536

DEFAULT SUBNET MASK

Class Format Default Subnet Mask


A network.host.host.host 255.0.0.0
B network.network.host.host 255.255.0.0
C network.network.network.host 255.255.255.0

BINARY MATH TABLE

128 64 32 16 8 4 2 1
1 1 1 1 1 1 1 1
Subnetting Reference Material

SUBNET MASK TABLE

Binary Decimal
00000000 0
10000000 128
11000000 192
11100000 224
11110000 240
11111000 248
11111100 252

SUBNET CALCULATION TABLE (2 X )

Host Bits Borrowed 2x Number of Subnets Created


1
1 2 2
2 22 4
3 23 8
4 24 16
5 25 32
6 26 64
7 27 128
8 28 256
9 29 512
10 210 1,024
11 211 2,048
12 212 4,096

SUBNET HOSTS & ADDRESSES CALCULATION TABLE (2 Y )

Host Bits Left 2y Hosts per Subnet (2y – 2) Addresses per Subnet (2y)
1 21 0 2
2 22 2 4
3 23 6 8
4 24 14 16
5 25 30 32
6 26 62 64
7 27 126 128
8 28 254 256
9 29 510 512
10 210 1,022 1,024
11 211 2,046 2,048
12 212 4,094 4,096
Subnetting Reference Material

CLASS C POSSIBLE SUBNET MASKS

Binary (N.N.N.H) Decimal CIDR # Subnets (2x) Block Size (2y) # Hosts (2y - 2)
N.N.N.00000000 255.255.255.0 /24 20 = 1 28 = 256 28 – 2 = 254
N.N.N.10000000 255.255.255.128 /25 21 = 2 27 = 128 27 – 2 = 126
N.N.N.11000000 255.255.255.192 /26 22 = 4 26 = 64 26 – 2 = 62
N.N.N.11100000 255.255.255.224 /27 23 = 8 25 = 32 25 – 2 = 30
N.N.N.11110000 255.255.255.240 /28 24 = 16 24 = 16 24 – 2 = 14
N.N.N.11111000 255.255.255.248 /29 25 = 32 23 = 8 23 – 2 = 6
N.N.N.11111100 255.255.255.252 /30 26 = 64 22 = 4 22 – 2 = 2

CLASS B POSSIBLE SUBNET MASKS

Binary (N.N.H.H) Decimal CIDR # Subnets (2x) Block Size (2y) # Hosts (2y - 2)
N.N.00000000.00000000 255.255.0.0 /16 20 = 1 216 = 65,536 216 – 2 = 65,534
N.N.10000000.00000000 255.255.128.0 /17 21 = 2 215 = 32,768 215 – 2 = 32,766
N.N.11000000.00000000 255.255.192.0 /18 22 = 4 214 = 16,384 214 – 2 = 16,382
N.N.11100000.00000000 255.255.224.0 /19 23 = 8 213 = 8,192 213 – 2 = 8,190
N.N.11110000.00000000 255.255.240.0 /20 24 = 16 212 = 4,096 212 – 2 = 4,094
N.N.11111000.00000000 255.255.248.0 /21 25 = 32 211 = 2,048 211 – 2 = 2,046
N.N.11111100.00000000 255.255.252.0 /22 26 = 64 210 = 1,024 210 – 2 = 1,022
N.N.11111110.00000000 255.255.254.0 /23 27 = 128 29 = 512 29 – 2 = 510
N.N.11111111.00000000 255.255.255.0 /24 28 = 256 28 = 256 28 – 2 = 254
N.N.11111111.10000000 255.255.255.128 /25 29 = 512 27 = 128 27 – 2 = 126
N.N.11111111.11000000 255.255.255.192 /26 210 = 1,024 26 = 64 26 – 2 = 62
N.N.11111111.11100000 255.255.255.224 /27 211 = 2,048 25 = 32 25 – 2 = 30
N.N.11111111.11110000 255.255.255.240 /28 212 = 4,096 24 = 16 24 – 2 = 14
N.N.11111111.11111000 255.255.255.248 /29 213 = 8,192 23 = 8 23 – 2 = 6
N.N.11111111.11111100 255.255.255.252 /30 214 = 16,384 22 = 4 22 – 2 = 2
Subnetting Reference Material

CLASS A POSSIBLE SUBNET MASKS

Binary (N.H.H.H) Decimal CIDR # Subnets (2x) Block Size (2y) # Hosts (2y - 2)
N.00000000.00000000.00000000 255.0.0.0 /8 20 = 1 222 = 16,777,216 222 – 2 = 16,777,214
N.10000000.00000000.00000000 255.128.0.0 /9 21 = 2 223 = 8,388,608 223 – 2 = 8,388,606
N.11000000.00000000.00000000 255.192.0.0 /10 22 = 4 222 = 4,194,304 222 – 2 = 4,194,302
N.11100000.00000000.00000000 255.224.0.0 /11 23 = 8 221 = 2,097,152 221 – 2 = 2,097,150
N.11110000.00000000.00000000 255.240.0.0 /12 24 = 16 220 = 1,048,576 220 – 2 = 1,048,574
N.11111000.00000000.00000000 255.248.0.0 /13 25 = 32 219 = 524,288 219 – 2 = 524,286
N.11111100.00000000.00000000 255.252.0.0 /14 26 = 64 218 = 262,144 218 – 2 = 262,142
N.11111110.00000000.00000000 255.254.0.0 /15 27 = 128 217 = 131,072 217 – 2 = 131,070
N.11111111.00000000.00000000 255.255.0.0 /16 28 = 256 216 = 65,536 216 – 2 = 65,534
N.11111111.10000000.00000000 255.255.128.0 /17 29 = 512 215 = 32,768 215 – 2 = 32,766
N.11111111.11000000.00000000 255.255.192.0 /18 210 = 1,024 214 = 16,384 214 – 2 = 16,382
N.11111111.11100000.00000000 255.255.224.0 /19 211 = 2,048 213 = 8,192 213 – 2 = 8,190
N.11111111.11110000.00000000 255.255.240.0 /20 212 = 4,096 212 = 4,096 212 – 2 = 4,094
N.11111111.11111000.00000000 255.255.248.0 /21 213 = 8,192 211 = 2,048 211 – 2 = 2,046
N.11111111.11111100.00000000 255.255.252.0 /22 214 = 16,384 210 = 1,024 210 – 2 = 1,022
N.11111111.11111110.00000000 255.255.254.0 /23 215 = 32,768 29 = 512 29 – 2 = 510
N.11111111.11111111.00000000 255.255.255.0 /24 216 = 65,536 28 = 256 28 – 2 = 254
N.11111111.11111111.10000000 255.255.255.128 /25 217 = 131,072 27 = 128 27 – 2 = 126
N.11111111.11111111.11000000 255.255.255.192 /26 218 = 262,144 26 = 64 26 – 2 = 62
N.11111111.11111111.11100000 255.255.255.224 /27 219 = 524,288 25 = 32 25 – 2 = 30
N.11111111.11111111.11110000 255.255.255.240 /28 220 = 1,048,576 24 = 16 24 – 2 = 14
N.11111111.11111111.11111000 255.255.255.248 /29 221 = 2,097,152 23 = 8 23 – 2 = 6
N.11111111.11111111.11111100 255.255.255.252 /30 222 = 4,194,304 22 = 4 22 – 2 = 2
Class C Practice Worksheet Answer Key

Subnetting Class C Networks Practice Worksheet


Answer Key

1. You are given a 192.168.1.0 /24 Class C Network:

a. What is the default subnet mask?


255.255.255.0 or /24
11111111.11111111.11111111.00000000

b. You need to subnet it into 16 sub-networks, how many host bits do you
need to borrow?
24 = 16, which means we need to borrow 4 bits

c. How many host bits will be left?


8 – 4 = 4 host bit left

d. What is your new subnet mask?


11111111.11111111.11111111.11110000
255.255.255.240 or /28

e. How many hosts available per subnet?


2h – 2 = 24 – 2 = 16 - 2 = 14 Hosts / Subnets
Class C Practice Worksheet Answer Key

2. You are given a 199.10.0.0 /24 Network:

a. What class is this network?


Class C Network (N.N.N.H)

b. You need to subnet it into 8 sub-networks, how many host bits do you
need to borrow?
Need to borrow 3 Hosts Bits

c. How many host bits will be left?


8 – 3 = 5 Host Bits Left

d. What is your new subnet mask?


11111111.11111111.11111111.11100000
255.255.255.224 or /27

e. How many hosts available per subnet?


Block Size: 32
Hosts: 30 Hosts / Subnet

f. Complete the Table Below:


Subnet Network Address Host Range Broadcast Address
1 199.10.0.0 1 thru 30 199.10.0.31
2 199.10.0.32 33 thru 62 199.10.0.63
3 199.10.0.64 65 thru 94 199.10.0.95
4 199.10.0.96 97 thru 126 199.10.0.127
5 199.10.0.128 129 thru 158 199.10.0.159
6 199.10.0.160 161 thru 190 199.10.0.191
7 199.10.0.192 193 thru 222 199.10.0.223
8 199.10.0.224 225 thru 254 199.10.0.255
Class C Practice Worksheet

Subnetting Class C Networks Practice Worksheet


1. You are given a 192.168.1.0 /24 Class C Network:

a. What is the default subnet mask?

b. You need to subnet it into 16 sub-networks, how many host bits do you
need to borrow?

c. How many host bits will be left?

d. What is your new subnet mask?

e. How many hosts available per subnet?


Class C Practice Worksheet

2. You are given a 199.10.0.0 /24 Network:

a. What class is this network?

b. You need to subnet it into 8 sub-networks, how many host bits do you
need to borrow?

c. How many host bits will be left?

d. What is your new subnet mask?

e. How many hosts available per subnet?

f. Complete the Table Below:


Subnet Network Address Host Range Broadcast Address
1
2
3
4
5
6
7
8
Subnetting Class C Networks Section

Subnetting Class C Networks


Subnetting a Class C Network #1
Details & Requirements
You’ve been assigned a 192.168.1.0/24 Class C network, and
you need to create two subnets from it. Subnet #1 #2

How many host bits do we need to borrow? Network Address 192.168.1.0 192.168.1.128
1 host bit, 21 = 2 Subnets
First Host IP 192.168.1.1 192.168.1.129
How many host addresses per subnet?
7 host bits left, 27 = 128 Addresses / Subnet Last Host IP 192.168.1.126 192.168.1.254
27 - 2= 126 Addresses / Subnet
Broadcast Address 192.168.1.127 192.168.1.255
What are the valid subnets?
192.168.1.0 and 192.168.1.128
Binary (N.N.N.H) Decimal CIDR # Subnets (2x) Block Size (2y) # Hosts (2y - 2)
N.N.N.00000000 255.255.255.0 /24 20 = 1 28 = 256 28 – 2 = 254
New Subnet Mask? N.N.N.10000000 255.255.255.128 /25 21 = 2 27 = 128 27 – 2 = 126
11111111.11111111.11111111.10000000 N.N.N.11000000 255.255.255.192 /26 22 = 4 26 = 64 26 – 2 = 62
255.255.255.128 or /25 N.N.N.11100000 255.255.255.224 /27 23 = 8 25 = 32 25 – 2 = 30
N.N.N.11110000 255.255.255.240 /28 24 = 16 24 = 16 24 – 2 = 14
N.N.N.11111000 255.255.255.248 /29 25 = 32 23 = 8 23 – 2 = 6
N.N.N.11111100 255.255.255.252 /30 26 = 64 22 = 4 22 – 2 = 2
Subnetting a Class C Network #1
Subnetting a Class C Network #2
Details & Requirements
You’ve been assigned a 192.168.1.0/24 Class C network, and Subnet Network /Subnet Host IP Broadcast
you need to create four subnets from it.
Address Addresses Address
How many host bits do we need to borrow? 1 192.168.1.0 1 thru 62 192.168.1.63
2 host bits, 22 = 4 Subnets
2 192.168.1.64 65 thru 126 192.168.1.127
How many host addresses per subnet?
6 host bits left, 26 = 64 Addresses / Subnet 3 192.168.1.128 129 thru 190 192.168.1.191
26 – 2 = 62 Addresses / Subnet
4 192.168.1.192 193 thru 254 192.168.1.255
What are the valid subnets?
192.168.1.0, 192.168.1.64,
192.168.1.128, 192.168.1.192 Binary (N.N.N.H) Decimal CIDR # Subnets (2x) Block Size (2y) # Hosts (2y - 2)
N.N.N.00000000 255.255.255.0 /24 20 = 1 28 = 256 28 – 2 = 254
N.N.N.10000000 255.255.255.128 /25 21 = 2 27 = 128 27 – 2 = 126
N.N.N.11000000 255.255.255.192 /26 22 = 4 26 = 64 26 – 2 = 62
New Subnet Mask? N.N.N.11100000 255.255.255.224 /27 23 = 8 25 = 32 25 – 2 = 30
11111111.11111111.11111111.11000000 N.N.N.11110000 255.255.255.240 /28 24 = 16 24 = 16 24 – 2 = 14
N.N.N.11111000 255.255.255.248 /29 25 = 32 23 = 8 23 – 2 = 6
255.255.255.192 or /26
N.N.N.11111100 255.255.255.252 /30 26 = 64 22 = 4 22 – 2 = 2
Subnetting a Class C Network #2
Subnetting a Class C Network #3
Subnetting a Class C Network #3
Class B Practice Worksheet Answer Key

Subnetting Class B Networks Practice Worksheet


Answer Key

1. You are given a 172.20.10.0 /16 Class B Network:

a. What is the default subnet mask?


255.255.0.0 or 11111111.11111111.00000000.00000000

b. You need to subnet it into 64 sub-networks, how many host bits do you need
to borrow?
26 = 64, so we need to borrow 6 host bits to create 64 subnets

c. How many host bits will be left?


16 – 6 = 10 Host Bits Remain

d. What is your new subnet mask?


11111111.11111111.11111100.00000000 = 255.255.252.0

e. How many hosts available per subnet?


210 – 2 = 1,022 Usable Hosts Address / Subnet
Class B Practice Worksheet Answer Key

2. What is the subnet address and broadcast address of the following Class B
Subnetted IP Address: 172.14.50.10 /18 → 172.14.0.0 /16

a. How many host bits were borrowed to create subnets and how many
subnets were created?
2 host bits were borrowed. 22 = 4 subnets created

b. How many host bits remain and what is the address block size per subnet?
16 – 2 = 14 host bits remain. 214 = 16,384 Address Block Size / Subnet

c. What is the subnet mask in dotted decimal format?


11111111.11111111.11000000.00000000 = 255.255.192.0

d. What are the valid subnets?


256 – 192 = 64 3rd Octet Block Size
Subnets: 0, 64, 128 and 192

e. What is the subnet & broadcast address of 172.14.50.10 /18?


Subnet Address: 172.14.0.0 and Broadcast Address: 172.14.63.255

f. Complete the Table Below:


Subnet Subnet Address Host Range Broadcast Address
1 172.14.0.0 172.14.0.1 to 63.254 172.14.63.255
2 172.14.64.0 172.14.64.1 to 127.254 172.14.127.255
3 172.14.128.0 172.14.128.1 to 191.254 172.14.191.255
4 172.14.192.0 172.14.192.1 to 255.254 172.14.255.255
Class B Practice Worksheet

Subnetting Class B Networks Practice Worksheet


1. You are given a 172.20.10.0 /16 Class B Network:

a. What is the default subnet mask?

b. You need to subnet it into 64 sub-networks, how many host bits do


you need to borrow?

c. How many host bits will be left?

d. What is your new subnet mask?

e. How many hosts available per subnet?


Class B Practice Worksheet

2. What is the subnet address and broadcast address of the following Class B
Subnetted IP Address: 172.14.50.10 /18

a. How many host bits were borrowed to create subnets and how many
subnets were created?

b. How many host bits remain and what is the address block size per
subnet?

c. What is the subnet mask in dotted decimal format?

d. What are the valid subnets?

e. What is the subnet & broadcast address of 172.14.50.10 /18?

f. Complete the Table Below:


Subnet Subnet Address Host Range Broadcast Address
1 172.14. 172.14. 172.14.
2 172.14. 172.14. 172.14.
3 172.14. 172.14. 172.14.
4 172.14. 172.14. 172.14.
Subnetting Class B Networks Section

Subnetting Class B Networks


Subnetting Class B Networks
• The exact same process as before…
• Except we begin subnetting in the 3rd octet.

Class B Network Network Host Host


Subnet Mask 11111111. 11111111. 00000000. 00000000
255. 255. 0. 0

Begin Subnetting Here


Subnetting a Class B Network #1
Details & Requirements
Network Address: 136.18.0.0 Subnet #1 #2
Default Subnet Mask: 255.255.0.0
Requires 2 Subnets Network Address 136.18.0.0 136.18.128.0

How many host bits do we need to borrow? First Host IP 136.18.0.1 136.18.128.1
1 host bit, 21 = 2 Subnets
Last Host IP 136.18.127.254 136.18.255.254
How many host addresses per subnet?
Broadcast Address 136.18.127.255 136.18.255.255
15 host bits left, 215 = 32,768 Addresses / Subnet
215 – 2 = 32,766 Addresses / Subnet

New Subnet Mask?


11111111.11111111.10000000.00000000
255.255.128.0 or /17

What are the valid subnets?


Equation: 256 – Subnet Mask = 256 – 128 = 128
0 and 128 in 3rd Octet: 136.18.0.0 & 136.18.128.0
Subnetting a Class B Network #2
Details & Requirements
Network Address: 155.14.0.0 Subnet Network /Subnet Host IP Broadcast
Default Subnet Mask: 255.255.0.0 Address Addresses Address
Requires 4 Subnets
1 155.14.0.0 155.14.0.1 to .63.254 155.14.63.255
How many host bits do we need to borrow?
1 host bit, 22 = 4 Subnets 2 155.14.64.0 155.14.64.1 to .127.254 155.14.127.255
How many host addresses per subnet? 3 155.14.128.0 155.14.128.1 to .191.254 155.14.191.255
14 host bits left, 214 = 16,384 Addresses / Subnet
214 – 2 = 16,382 Addresses / Subnet
4 155.14.192.0 155.14.192.1 to .255.254 155.14.255.255
New Subnet Mask?
11111111.11111111.11000000.00000000
255.255.192.0 or /18

What are the valid subnets?


Equation: 256 – Subnet Mask = 256 – 192 = 64
0, 64, 128, and 192 in 3rd Octet:
155.14.0.0, 155.14.64.0, 155.14.128.0, 155.14.192.0
Subnetting a Class B Network #3
Details & Requirements Subnet Network /Subnet Host IP Broadcast
Network Address: 155.14.0.0 Address Addresses Address
Default Subnet Mask: 255.255.0.0
Requires 8,000 Hosts Per Subnet 1 155.14.0.0 155.14.0.1 to .31.254 155.14.31.255

How many host addresses per subnet? 2 155.14.32.0 155.14.32.1 to .63.254 155.14.63.255
13 host bits Required, 213 = 8,192 Addresses / Subnet
213 – 2 = 8,190 Addresses / Subnet 3 155.14.64.0 155.14. to 155.14.

How many host bits do we need to borrow? 4 155.14.96.0 155.14. to 155.14.


3 host bits, 23 = 8 Subnets
5 155.14.128.0 155.14. to 155.14.
New Subnet Mask?
11111111.11111111.11100000.00000000 6 155.14.160.0 155.14. to 155.14.
255.255.224.0 or /19
7 155.14.192.0 155.14. to 155.14.
What are the valid subnets?
Equation: 256 – Subnet Mask = 256 – 224 = 32 8 155.14.224.0 155.14 . to 155.14.255.255
0, 32, 64, 96, 128, 160, 192, 224 in 3rd Octet
Subnetting a Class B Network #3
Details & Requirements Subnet Network /Subnet Host IP Broadcast
Network Address: 155.14.0.0 Address Addresses Address
Default Subnet Mask: 255.255.0.0
Requires 8,000 Hosts Per Subnet 1 155.14.0.0 155.14.0.1 to .31.254 155.14.31.255

How many host addresses per subnet? 2 155.14.32.0 155.14.32.1 to .63.254 155.14.63.255
13 host bits Required, 213 = 8,192 Addresses / Subnet
213 – 2 = 8,190 Addresses / Subnet 3 155.14.64.0 155.14.64.1 to .95.254 155.14.95.255

How many host bits do we need to borrow? 4 155.14.96.0 155.14.96.1 to .127.254 155.14.127.255
3 host bits, 23 = 8 Subnets
5 155.14.128.0 155.14.128.1 to .159.254 155.14.159.255
New Subnet Mask?
11111111.11111111.11100000.00000000 6 155.14.160.0 155.14.160.1 to .191.254 155.14.191.255
255.255.224.0 or /19
7 155.14.192.0 155.14.192.1 to .223.254 155.14.223.255
What are the valid subnets?
Equation: 256 – Subnet Mask = 256 – 224 = 32 8 155.14.224.0 155.14.224.1 to .255.254 155.14.255.255
0, 32, 64, 96, 128, 160, 192, 224 in 3rd Octet
Subnetting Class A Networks Section

Subnetting Class A Networks


Subnetting Class A Networks
• The exact same process as before…
• Except we begin subnetting in the 2nd octet.

Class B Network Host Host Host


Subnet Mask 11111111. 00000000. 00000000. 00000000
255. 0. 0. 0

Begin Subnetting Here


Subnetting a Class A Network #1
Details & Requirements
Network Address: 15.0.0.0
Default Subnet Mask: 255.0.0.0 Subnet #1 #2
Requires 256 Subnets
Network Address 15.0.0.0 15.1.0.0
How many host bit do we need to borrow?
8 host bit, 28 = 256 Subnets First Host IP 15.0.0.1 15.1.0.1

How many host addresses per subnet? Last Host IP 15.0.255.254 15.1.255.254
16 host bits left, 216 = 65,536 Addresses / Subnet
216 – 2 = 65,534 Addresses / Subnet Broadcast Address 15.0.255.255 15.1.255.255

New Subnet Mask?


11111111.11111111.00000000.00000000
255.255.0.0 or /16

What are the valid subnets?


Equation: 256 – Subnet Mask = 256 – 255 = 1
0 to 255 in the 3rd Octet
Subnetting a Class A Network #2
Details & Requirements
Network Address: 15.0.0.0 Subnet Broadcast
Subnet Host IP Addresses
Default Subnet Mask: 255.0.0.0 Address Address
Requires 4096 Subnets
1 15.0.0.0 15.0.0.1 to 15.0.15.254 15.0.15.255
How many host bits do we need to borrow?
12 host bit, 212 = 4,096 Subnets
2 15.0.16.0 15.0.16.1 to 15.0.31.254 15.0.31.255
How many host addresses per subnet?
12 host bits left, 212 = 4,096 Addresses / Subnet 3 15.0.32.0 15.0.32.1 to 15.0.47.254 15.0.47.255
212 – 2 = 4,094 Hosts / Subnet

New Subnet Mask?
11111111. 11111111.11110000.00000000 16 15.0.240.0 15.0.240.1 to 15.0.255.254 15.0.255.255
255.255.240.0 or /20

What are the valid subnets? 17 15.1.0.0 15.1.0.1 to 15.1.15.254 15.1.15.255


Equation: 256 – Subnet Mask = 256 – 240 = 16
0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240 18 15.1.16.0 15.1.16.1 to 15.1.31.254 15.1.31.255
in 3rd Octet → Increment 1 in 2nd Octet and repeat sequence in 3rd
Octet.
19 15.1.32.0 15.1.32.1 to 15.1.63.254 15.1.63.255
Subnetting Class A Networks Section

Subnetting Class A Networks


Subnetting Class A Networks
• The exact same process as before…
• Except we begin subnetting in the 2nd octet.

Class B Network Host Host Host


Subnet Mask 11111111. 00000000. 00000000. 00000000
255. 0. 0. 0

Begin Subnetting Here


Subnetting a Class A Network #1
Details & Requirements
Network Address: 15.0.0.0
Default Subnet Mask: 255.0.0.0 Subnet #1 #2
Requires 256 Subnets
Network Address 15.0.0.0 15.1.0.0
How many host bit do we need to borrow?
8 host bit, 28 = 256 Subnets First Host IP 15.0.0.1 15.1.0.1

How many host addresses per subnet? Last Host IP 15.0.255.254 15.1.255.254
16 host bits left, 216 = 65,536 Addresses / Subnet
216 – 2 = 65,534 Addresses / Subnet Broadcast Address 15.0.255.255 15.1.255.255

New Subnet Mask?


11111111.11111111.00000000.00000000
255.255.0.0 or /16

What are the valid subnets?


Equation: 256 – Subnet Mask = 256 – 255 = 1
0 to 255 in the 3rd Octet
Subnetting a Class A Network #2
Details & Requirements
Network Address: 15.0.0.0 Subnet Broadcast
Subnet Host IP Addresses
Default Subnet Mask: 255.0.0.0 Address Address
Requires 4096 Subnets
1 15.0.0.0 15.0.0.1 to 15.0.15.254 15.0.15.255
How many host bits do we need to borrow?
12 host bit, 212 = 4,096 Subnets
2 15.0.16.0 15.0.16.1 to 15.0.31.254 15.0.31.255
How many host addresses per subnet?
12 host bits left, 212 = 4,096 Addresses / Subnet 3 15.0.32.0 15.0.32.1 to 15.0.47.254 15.0.47.255
212 – 2 = 4,094 Hosts / Subnet

New Subnet Mask?
11111111. 11111111.11110000.00000000 16 15.0.240.0 15.0.240.1 to 15.0.255.254 15.0.255.255
255.255.240.0 or /20

What are the valid subnets? 17 15.1.0.0 15.1.0.1 to 15.1.15.254 15.1.15.255


Equation: 256 – Subnet Mask = 256 – 240 = 16
0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240 18 15.1.16.0 15.1.16.1 to 15.1.31.254 15.1.31.255
in 3rd Octet → Increment 1 in 2nd Octet and repeat sequence in 3rd
Octet.
19 15.1.32.0 15.1.32.1 to 15.1.63.254 15.1.63.255
Variable Length Subnet Masks (VLSM) Section

Variable Length Subnet Masks (VLSM)


Introduction to VLSM
Implementing VLSM
Scenario-Based Subnetting Practice Worksheet

Scenario-Based Subnetting Practice Worksheet


1. You’ve been asked by your network manager to utilize the company’s
200.100.10.0 Class C network and break it up into 16 subnets with 14 hosts per
subnet. What will the subnet mask be for the subnets?
A. 255.255.255.0
B. 255.255.255.252
C. 255.255.255.192
D. 255.255.255.240
E. 255.255.255.128

2. How many usable IP addresses can be assigned to hosts on a /25 subnet?


A. 254
B. 126
C. 62
D. 30
E. 14

3. You’ve noticed performance degradation on the network and suspect it’s a


broadcast storm. Scanning the network, you’ve narrowed the issue to the
192.168.1.64 /26 subnet. What is the broadcast address for this subnet?
A. 192.168.1.0
B. 192.168.1.100
C. 192.168.1.127
D. 192.168.1.135
E. 192.168.1.144

4. Is 195.55.150.64 /27 a valid useable host IP address?


A. Yes
B. No
Scenario-Based Subnetting Section

Scenario-Based Subnetting
Scenario-Based Subnetting
• Networking certification exams will often test your knowledge of
subnetting with scenario-based questions.
• However, the process is the same as what we covered.

• Your Toolchest:
o Binary Math
o Power of 2’s
o Basic Equations:
✓ Number of Subnets (2x)
✓ Block Size (2y)
✓ Hosts per Subnet (2y – 2)
Write Out the Following
21 = 2 22 = 4 23 = 8 24 = 16 25 = 32 26 = 64 27 = 128 28 = 256
128 + 64 + 32 + 16 + 8 + 4 + 2 + 1
Number of Subnets: 2x Block Size: 2y Hosts per Subnet: 2y – 2

Subnet Network Address Host IP Addresses Broadcast Address


1
2
3
4
Subnetting Scenario #1 Walk Through
You’ve been asked by your network manager to utilize the company’s 200.100.10.0 Class C network and break
it up into 16 subnets with 14 hosts per subnet. What will the subnet mask be for the subnets?
A. 255.255.255.0
B. 255.255.255.252 Number of Subnets: 24 = 16
C. 255.255.255.192 Block Size: 24 = 16
D. 255.255.255.240
E. 255.255.255.128 Hosts per Subnet: 24 - 2 = 14
128 + 64 + 32 + 16 = 240, so 255.255.255.240

21 = 2 22 = 4 23 = 8 24 = 16 25 = 32 26 = 64 27 = 128 28 = 256
128 + 64 + 32 + 16 + 8 + 4 + 2 + 1
Number of Subnets: 2x Block Size: 2y Hosts per Subnet: 2y – 2
Subnetting Scenario #2 Walk Through
How many usable IP addresses can be assigned to hosts on a /25 subnet, assuming the original network was
a Class C network?
A. 254
How many host bits did we borrow? One 11111111.11111111.11111111.10000000
B. 126
C. 62 How many host bits are left? Seven
D. 30
Hosts per Subnet: 27 - 2 = 128 – 2 = 126
E. 14

21 = 2 22 = 4 23 = 8 24 = 16 25 = 32 26 = 64 27 = 128 28 = 256
128 + 64 + 32 + 16 + 8 + 4 + 2 + 1
Number of Subnets: 2x Block Size: 2y Hosts per Subnet: 2y – 2
Subnetting Scenario #3 Walk Through
You’ve noticed performance degradation on the network and suspect it’s a broadcast storm. Scanning the
network, you’ve narrowed the issue to the 192.168.1.64 /26 subnet. What is the broadcast address for this
subnet?
A. 192.168.1.0 2 Host Bits Borrowed: 11111111.11111111.11111111.11000000
B. 192.168.1.100
C. 192.168.1.127
Number of Subnets: 22 = 4 Block Size: 26 = 64 Hosts per Subnet: 26 - 2 = 62
D. 192.168.1.135 Valid Subnets: 192.168.1.0, 192.168.1.64, 192.168.1.128, 192.168.1.192
E. 192.168.1.144
Subnet Network Address Broadcast Address
1 192.168.1.0 192.168.1.63
2 192.168.1.64 192.168.1.127
3 192.168.1.128 192.168.1.191
4 192.168.1.192 192.168.1.255
Subnetting Scenario #4 Walk Through
Is 195.55.150.64 /27 a valid useable host IP address?
A. Yes
B. No 3 Host Bits Borrowed: 11111111.11111111.11111111.11100000
Number of Subnets: 23 = 8 Block Size: 25 = 32 Hosts per Subnet: 25 - 2 = 30
Valid Subnets: 195.55.150.0, 195.55.150.32, 195.55.150.64, 195.55.150.96, etc.
Subnet Network Address Host IP Addresses Broadcast Address
1 195.55.150.0 .1 thru .30 195.55.150.31
2 195.55.150.32 .33 thru .62 195.55.150.127
3 195.55.150.64 .65 thru .94 195.55.150.95
Etc.
IP Addressing Version 6 (IPv6) Fundamentals Section

IP Addressing Version 6 (IPv6) Fundamentals


Disadvantages of IPv4
• Not enough IPv4 addresses
o Approximately 4.3 billion public IP addresses
o 7.8 billion world population
o Multiple devices per user (computers, tablets, smart phones, smart TVs,
home automation, etc.)
• Less Efficient Routing (compared to IPv6)
• Security is Optional
o Encrypted data is optional
IPv6 Solutions
• Plethora of Addresses
o 128-bit binary address space compared to 32-bit for IPv4
o 340 trillion trillion trillion addresses
o 5 x 1028 addresses for each person on the planet
• Simplified Internet Routing Tables
o IPv6 packet header enables more efficient routing:
▪ Fixed at 40 Bytes versus IPv4 “Variable Length” Packet Header for Optional Fields
• Easier & Automated Configuration Compared to IPv4
o Stateless Auto-Configuration
o No need for a DHCP server
• Security is Required
o Internet Protocol Security (IPSec) is required
▪ Source IP can be authenticated
▪ Data in transit is encrypted
IPv4 versus IPv6

IPv4 IPv6

Deployed 1981 1999

Address Size 32-Bit 128-Bit

Number of Addresses 232 = 4,294,967,296 2128 = 340,282,366,920,938,463,463,374,607,431,768,211,456

Addressing Class-Based Classless


Why is IPv4 Still Around?
• Subnetting / CIDR
• Use of Private IP Addresses
• Network Address Translation (NAT)
IPv6 Addressing
Decimal Binary Hexadecimal
(Base 10) (Base 2) (Base 16)

0 0000 0

1 0001 1

2 0010 2

3 0011 3

4 0100 4

• 128-bit address composed of eight 16-bit hexadecimal blocks, 5 0101 5


separated by colons 6 0110 6

• Each number or letter is 4 binary bits. 7 0111 7

• They are shown in hexadecimal to simply the address: 8 1000 8

9 1001 9
o 128 digits in binary format
10 1010 A
o Up to 64 digits in decimal format.
11 1011 B
• Example:
12 1100 C
o Hexadecimal: 85A3
13 1101 D
o Binary: 1000 0101 1010 0011
14 1110 E
o Decimal: 8 5 10 3 15 1111 F
The Network and Interface IDs

• 128-bit address composed of eight 16-bit hexadecimal blocks, separated by


colons
• Network ID
o Site Prefix: Used for routing over the Internet.
o Subnet ID: Used for subnets on internal networks.
• Interface ID
o The host portion of the address, that’s automatically configured from the MAC address
or manually configured in EUI-64 format.
IPv6 Address Simplification

We can simplify by omitting leading 0’s


• 0DB8 → DB8
• 0000 → 0

Can also compress contiguous blocks of 0’s


into double colon “::” once per address.
• :0000:0000: → ::
IPv6 CIDR
• We can use CIDR notation with IPv6 addresses, similar to IPv4
o FE80::8A:0:8398:85A3/64
• This tells us:
o Network ID (64-bits): FE80:0000:0000:0000
o Interface ID (64-bits): 008A:0000:8398:85A3
• A standard IPv6 subnet can have 264 IPv6 addresses:
o 18,446,744,073,709,551,616 IPv6 Addresses
IPv6 Transmission Types
• Unicast (One-to-One) Communication
o One-to-one communication, just like with IPv4.
• Multicast (One-to-Many) Communication
o IPv6 doesn’t use broadcast transmissions (one-to-all).
o IPv6 multicast replaced broadcast communications.
o Sends to multi-cast group members.
• Anycast (One-to-One-of-Many) Communication
o Identifies multiple interfaces, but a packet of data is delivered to the
nearest network interfaces (used in routing).
IPv6 Unicast (One-to-One) Addresses
Global Addresses
• Similar to Public IPv4 Addresses
• Globally Routable over the Internet
• 2000 Prefix
Unique Local Addresses
• Similar to Private IPv4 Addresses
• Internally routable, but not routable over the Internet.
• FC00 or FD00 Prefix
Link-Local Addresses
• IPv6 Equivalent to IPv4 APIPA Addresses
• Can be assigned automatically or statically.
• Not routable internally or over the Internet.
• FE80 Prefix
IPv6 loopback Addresses
• Loopback Address
o ::1
IPv4 to IPv6 Transition
• IPv6 is not natively backward compatible with IPv4.
• To aid in the transition, as well as to allow IPv4 and IPv6 to co-exist,
there are two transition technologies you need to know:
o Dual IP Stack
o Tunneling
IPv4 to IPv6 Compatibility
Dual IP Stack
• When both IPv4 and IPv6 protocols co-exist within an operating
system.
• Can be used independently or together.
Tunneling
• Tunneling is when we encapsulate IPv4 into IPv6 data and vice versa:
o 4to6
o 6in4
o Teredo
o Miredo
Tunneling Protocols
• 4to6: Encapsulates IPv4 data into an IPv6 Tunnel
• 6in4: Encapsulates IPv6 data into an IPv4 Tunnel and can traverse IPv4 NAT.
• Teredo: Microsoft Windows IPv6 tunneling protocol similar to 6in4 that supports NAT.
• Miredo: A Linux and Unix-based open-source version of Teredo.
IPv6 Neighbor Discovery Protocol (NDP)
Neighbor Solicitation and Advertisement
• When an IPv6-enabled system joins a network, it sends out a
multicast “neighbor solicitation” to all other IPv6 systems.
• All other IPv6 systems on the network will respond with a “neighbor
advertisement.”
Assigning IP Addresses Section

Assigning IP Addresses
Static versus Dynamic IP Address Assignment
Static Dynamic
• IP Address is Manually Configured • IP Address is Dynamically Configured
• It Doesn’t Change o DHCP Server
• Commonly Used: o APIPA
o DNS Servers o Stateless Auto-Configuration
o Web Servers • Commonly used for end-user devices that
o Network Printers don’t require a static IP address.
o Default Gateway (Router)
IPv4 Dynamic IP Address Assignment
• Two Methods
o Dynamic Host Configuration Protocol (DHCP)
o Automatic Private IP Addressing (APIPA)
Understanding the DHCP DORA Process
1. Client requests an IP address by broadcasting a “DHCP Discover” message on its local subnet.
2. When the DHCP server receives the request, it’ll respond with a “DHCP Offer” message
containing an IP address and lease information.
3. If no DHCP server is available, the client will use Automatic Private IP Addressing (APIPA)
alternate configuration if it’s configured.
4. The client then accepts the “DHCP Offer” by replying with a “DHCP Request” message to the
DHCP server.
5. The DHCP server assigns the client the address and sends a “DHCP Acknowledgement”
message in response, finalizing the DHCP IP address lease.
Additional DHCP Details
• When configuring DHCP, you’ll typically have the option to configure
the following:
o IP Address Scope / Pool
o Default Gateway (Router)
o DNS Servers
o IP Address Exclusions
o Mac Address Reservations
o Lease Duration
DHCP Relay Agents
• A system used to forward DHCP requests and replies between a DHCP server
and clients when the DHCP server is on a different network.
• This allows you to not have to have a DHCP server on each network.
Automatic Private IP Addressing (APIPA)
• Windows Operating System Feature
• Allows DHCP-configured clients to self-configure IP addresses if no
DHCP server is available on the network.
• If a DHCP server doesn’t respond to a request for an IP address,
Windows OS can self-configure an APIPA IP address & subnet mask.
o Class B IP Address Range: 169.254.0.1 – 169.254.255.254
o Subnet Mask: 255.255.0.0
o This allows clients on the same network to assign themselves IP
addresses in the 169.254.x.x range and communicate with one
another.
o Note: APIPA addresses are link-local, meaning they’re not routable.

You might also like