Buffl

Capital 8: Subnetting

as
von abdullah S.

Subnetting

Subnetting is a key concept for the CCNA exam, and it's important to understand it well because it's frequently tested. Subnetting involves dividing a large network into smaller, more manageable subnets. Let's break it down step-by-step.

1. IP Address Basics

An IP address is a unique identifier assigned to every device on a network. It is made up of 32 bits (in IPv4), and it’s typically written in dotted decimal notation (e.g., 192.168.1.1).

An IP address has two parts:

  • Network portion: Identifies the network.

  • Host portion: Identifies the specific device on that network.

The address is broken down into four octets (8 bits each), with each octet represented as a decimal number between 0 and 255.

2. Subnet Mask

A subnet mask is a 32-bit number used to divide an IP address into network and host portions. It tells you which part of the IP address refers to the network and which part refers to the host.

For example:

  • 255.255.255.0 is a common subnet mask. It means the first three octets (255) are used for the network portion, and the last octet (0) is used for the host portion.

3. Classful IP Addressing

Historically, IP addresses were divided into five classes (A, B, C, D, and E), but the first three (A, B, and C) are used for regular networks.

  • Class A: 0.0.0.0 to 127.255.255.255 – Default subnet mask: 255.0.0.0

  • Class B: 128.0.0.0 to 191.255.255.255 – Default subnet mask: 255.255.0.0

  • Class C: 192.0.0.0 to 223.255.255.255 – Default subnet mask: 255.255.255.0

4. Subnetting Process

Subnetting involves borrowing bits from the host portion of the IP address and turning them into network bits, creating smaller networks (subnets). Here's how to do it:

Step 1: Identify the IP Address Class

Determine the class of the IP address (A, B, or C) and the default subnet mask.

Step 2: Determine How Many Subnets You Need

Based on the number of subnets required, figure out how many bits you need to borrow. The formula for calculating the number of subnets is:

Subnets=2n\text{Subnets} = 2^nSubnets=2n where n is the number of borrowed bits.

Step 3: Calculate New Subnet Mask

The new subnet mask will be the default mask plus the borrowed bits. For example:

  • If you're borrowing 2 bits from a Class C address (255.255.255.0), the new subnet mask would be 255.255.255.192.

Step 4: Determine Number of Hosts Per Subnet

The number of hosts per subnet is determined by the remaining bits. The formula for calculating the number of hosts is:

Hosts=2n−2\text{Hosts} = 2^n - 2Hosts=2n−2 where n is the number of bits left for hosts (subtracting 2 accounts for the network and broadcast addresses).

For example, with 6 bits remaining for hosts, you can have:

Hosts=26−2=62 hosts per subnet\text{Hosts} = 2^6 - 2 = 62 \text{ hosts per subnet}Hosts=26−2=62 hosts per subnet

Step 5: Identify the Network Address and Broadcast Address

For each subnet, calculate:

  • The network address (the first address in the subnet).

  • The broadcast address (the last address in the subnet).

These are the addresses used for communication with all devices in the subnet, and they cannot be assigned to individual devices.

Step 6: Assigning Subnet Addresses

List all subnets, starting from the network address and incrementing by the subnet size. For example, if you have a subnet mask of 255.255.255.192, the subnets might be:

  • Subnet 1: 192.168.1.0 – 192.168.1.63

  • Subnet 2: 192.168.1.64 – 192.168.1.127

  • Subnet 3: 192.168.1.128 – 192.168.1.191

  • And so on.

5. VLSM (Variable Length Subnet Masking)

VLSM allows you to use different subnet masks within the same network, which is useful for more efficient use of IP address space.

6. CIDR (Classless Inter-Domain Routing)

CIDR allows for more flexible subnetting than the traditional class-based system. Instead of using default subnet masks, CIDR uses a notation like /24 to specify the number of bits used for the network portion. For example, 192.168.1.0/24 means 24 bits are used for the network portion, equivalent to the subnet mask 255.255.255.0.

Subnetting Example

Let's say you are given the following:

  • IP Address: 192.168.10.0

  • Subnet Mask: 255.255.255.192

Step 1: Convert to binary

  • 192.168.10.0 (IP) → 11000000.10101000.00001010.00000000

  • 255.255.255.192 (Subnet Mask) → 11111111.11111111.11111111.11000000

Step 2: Calculate the number of subnets

  • The subnet mask is 255.255.255.192, meaning 2 bits are borrowed from the host portion.

  • This gives 4 subnets (2^2 = 4).

Step 3: Calculate the number of hosts per subnet

  • The remaining 6 bits for hosts gives 62 hosts per subnet (2^6 - 2 = 62).

Step 4: Find subnet addresses The subnets for 192.168.10.0/26 (255.255.255.192) are:

  • Subnet 1: 192.168.10.0 – 192.168.10.63

  • Subnet 2: 192.168.10.64 – 192.168.10.127

  • Subnet 3: 192.168.10.128 – 192.168.10.191

  • Subnet 4: 192.168.10.192 – 192.168.10.255

Tips for CCNA Exam

  • Practice a lot with subnetting questions.

  • Understand how to quickly convert between decimal and binary.

  • Know the subnet mask for Class A, B, and C IP addresses.

  • Get comfortable with CIDR notation and VLSM.

  • Use subnetting calculators for quick verification.


CIDR (Classless Inter-Domain Routing)

CIDR (Classless Inter-Domain Routing) is an important concept for the CCNA exam, as it allows for more flexible and efficient allocation of IP addresses compared to traditional class-based IP addressing. Let’s break it down for you.

What is CIDR?

CIDR is a method for allocating IP addresses and routing IP packets, replacing the old class-based system (Class A, B, C). CIDR allows you to specify how many bits are used for the network portion of the address, enabling more efficient use of IP addresses and routing.

CIDR notation is written as an IP address followed by a slash ("/") and the number of bits used for the network portion of the address (also known as the prefix). For example, 192.168.1.0/24.

  • 192.168.1.0 is the IP address (network address).

  • /24 represents the network prefix (the number of bits used for the network portion, in this case, 24 bits).

CIDR vs Classful Addressing

In classful addressing, the network size (subnet mask) was fixed for each IP address class:

  • Class A: 255.0.0.0 (8 bits for the network, 24 for hosts)

  • Class B: 255.255.0.0 (16 bits for the network, 16 for hosts)

  • Class C: 255.255.255.0 (24 bits for the network, 8 for hosts)

With CIDR, you can have a more flexible network design by allowing any number of bits for the network portion (up to 32 bits). This flexibility allows you to create more subnets or use fewer IP addresses per subnet as needed.

CIDR Notation and Subnet Masks

CIDR notation is directly related to the subnet mask. The number after the slash in CIDR tells you how many bits are in the network portion of the address. Here’s a quick reference to help:

CIDR Notation

Subnet Mask

Number of Usable IP Addresses

/8

255.0.0.0

16,777,214

/16

255.255.0.0

65,534

/24

255.255.255.0

254

/25

255.255.255.128

126

/26

255.255.255.192

62

/27

255.255.255.224

30

/28

255.255.255.240

14

/29

255.255.255.248

6

/30

255.255.255.252

2

How CIDR Works:

CIDR allows us to:

  1. Adjust the size of subnets: You can adjust the network and host portions by borrowing bits, unlike classful addressing where the number of network bits was fixed.

  2. Use IP addresses more efficiently: By specifying the number of bits for the network, CIDR allows the creation of subnets that fit an organization's needs without wasting IP addresses.

CIDR Example:

Let’s walk through an example to help clarify how CIDR works in subnetting.

Example 1: 192.168.10.0/28

Step 1: Write the CIDR Notation

  • Network Address: 192.168.10.0

  • Subnet Mask: /28 (meaning 28 bits for the network portion)

Step 2: Convert to Binary

  • 192.168.10.0 → 11000000.10101000.00001010.00000000 (IP address in binary)

  • Subnet mask /28 → 11111111.11111111.11111111.11110000 (Subnet mask in binary)

Step 3: Identify the Network and Host Portions

  • The first 28 bits (network portion) define the network.

  • The remaining 4 bits (host portion) define the hosts.

Step 4: Calculate Number of Hosts

  • For 4 host bits, the number of hosts can be calculated with the formula 2^n - 2, where n is the number of host bits. So, 2^4 - 2 = 14 hosts per subnet.

Step 5: Identify the Subnets

  • Subnet 1: 192.168.10.0 – 192.168.10.15

  • Subnet 2: 192.168.10.16 – 192.168.10.31

  • Subnet 3: 192.168.10.32 – 192.168.10.47

  • … and so on.

Step 6: Assign IPs

  • The first address in each subnet is the network address (e.g., 192.168.10.0, 192.168.10.16).

  • The last address is the broadcast address (e.g., 192.168.10.15, 192.168.10.31).

  • The addresses in between are the usable IP addresses for hosts (e.g., 192.168.10.1 – 192.168.10.14).

CIDR Summary for CCNA Exam:

  1. CIDR Notation: Specifies the number of bits for the network portion of the address (e.g., 192.168.1.0/24).

  2. Subnet Mask Calculation: CIDR helps in calculating subnet masks easily. The number after the slash (/) represents the number of 1's in the subnet mask.

  3. Subnetting with CIDR: Allows for flexible subnetting and more efficient use of IP addresses.

  4. Classless Routing: CIDR eliminates the old class-based system and allows routers to route based on prefixes.

  5. CIDR Prefix and Hosts: The higher the prefix number, the fewer hosts per subnet (e.g., /30 provides only 2 hosts).

Common CIDR Prefixes and Their Subnet Masks:

CIDR Prefix

Subnet Mask

Hosts per Subnet

/24

255.255.255.0

254

/25

255.255.255.128

126

/26

255.255.255.192

62

/27

255.255.255.224

30

/28

255.255.255.240

14

/29

255.255.255.248

6

/30

255.255.255.252

2

CIDR for Routing:

CIDR is also crucial in routing. Classless routing protocols like RIPng, OSPF, and EIGRP use CIDR for more efficient routing.

Tips for CCNA Exam:

  1. Practice converting between binary, decimal, and CIDR.

  2. Memorize common CIDR prefixes and their corresponding subnet masks.

  3. Understand how CIDR enables more flexible subnetting than the old class-based system.

  4. Be able to quickly identify the number of hosts or subnets based on CIDR notation.

  5. Review the subnetting process for both classful and classless networks, as this is a foundational CCNA concept.


Overview of Subnetting

Overview of Subnetting for CCNA Exam Preparation

Subnetting is the process of dividing a large network into smaller, more manageable subnetworks (subnets). It allows for better utilization of IP addresses, improved network performance, and enhanced security by isolating parts of the network. Subnetting is an essential topic for the CCNA exam, as it directly relates to the design and configuration of IP networks.

1. Purpose of Subnetting

  • Efficient IP Address Usage: Without subnetting, an entire class A, B, or C network could have far more IP addresses than needed, wasting address space. Subnetting allows for more efficient allocation of IP addresses by creating smaller subnets based on actual needs.

  • Network Management: Subnetting helps manage large networks by breaking them into smaller, easier-to-manage subnets.

  • Security: Subnetting can isolate network traffic between different subnets, improving security by containing broadcast traffic and reducing potential attack surfaces.

  • Routing: Subnetting can help reduce the size of routing tables by using CIDR (Classless Inter-Domain Routing), which groups IP addresses with similar prefixes.

2. Basic Components of Subnetting

  • IP Address: An IP address uniquely identifies a device on a network. It consists of 32 bits in IPv4, typically written as four decimal numbers separated by dots (e.g., 192.168.1.1).

  • Subnet Mask: A subnet mask is used to divide an IP address into the network and host portions. It helps identify the part of the address that represents the network and which part is used for hosts. Subnet masks are also 32 bits, typically written in decimal form (e.g., 255.255.255.0).

  • Network Portion: The part of the IP address that identifies the network. The number of bits used for the network portion is determined by the subnet mask.

  • Host Portion: The part of the IP address that identifies the specific device (host) within a network.

3. Subnetting Process

Subnetting involves borrowing bits from the host portion of an IP address to create additional network bits. The more bits borrowed, the smaller the subnets become.

Step-by-Step Subnetting Process:

Step 1: Determine the Network Class

  • Class A: IP range from 0.0.0.0 to 127.255.255.255 (default subnet mask: 255.0.0.0).

  • Class B: IP range from 128.0.0.0 to 191.255.255.255 (default subnet mask: 255.255.0.0).

  • Class C: IP range from 192.0.0.0 to 223.255.255.255 (default subnet mask: 255.255.255.0).

Step 2: Identify the Number of Subnets Needed

  • Subnetting allows you to divide a network into multiple smaller subnets. The number of bits borrowed from the host portion determines how many subnets can be created.

  • Formula for calculating subnets: Subnets=2n\text{Subnets} = 2^nSubnets=2n where n is the number of borrowed bits.

Step 3: Determine the Subnet Mask

  • The subnet mask for each subnet is derived from the original subnet mask plus the number of borrowed bits.

  • For example, if you borrow 2 bits from the host portion of a Class C network (255.255.255.0), the new subnet mask becomes 255.255.255.192.

Step 4: Calculate Number of Hosts per Subnet

  • The number of available host IP addresses is determined by the number of bits left in the host portion.

  • Formula for calculating hosts per subnet: Hosts=2n−2\text{Hosts} = 2^n - 2Hosts=2n−2 where n is the number of bits remaining for the host portion. Subtracting 2 accounts for the network address and broadcast address.

Step 5: Subnet the Network

  • Using the subnet mask, divide the original network into subnets by adjusting the network address to reflect the new subnets.

  • The first address in a subnet is the network address (cannot be assigned to a host).

  • The last address is the broadcast address (also cannot be assigned to a host).

  • The addresses in between are available for hosts.

4. Key Concepts for Subnetting

Binary Conversion

  • Subnetting requires working with binary numbers. Each octet (8 bits) in the IP address can range from 0 to 255. Convert decimal numbers (such as 192) into binary (11000000) to understand the network and host divisions.

Subnet Mask and CIDR Notation

  • The CIDR notation (Classless Inter-Domain Routing) is another way to represent subnet masks. Instead of writing out the full subnet mask, you use a slash (/) followed by the number of bits for the network portion. For example:

    • 192.168.1.0/24 means the first 24 bits are used for the network (equivalent to 255.255.255.0).

    • /30 means a subnet with only 2 host addresses.

Subnet Size

  • Subnet size refers to how many IP addresses are available within each subnet. A smaller subnet means fewer available IPs, which can help conserve address space. As the number of bits borrowed increases, the size of the subnet decreases (fewer hosts, more subnets).

5. Common Subnet Masks

Here are some common subnet masks and their corresponding CIDR notations:

CIDR Notation

Subnet Mask

Hosts per Subnet

Subnets

/8

255.0.0.0

16,777,214

1 subnet

/16

255.255.0.0

65,534

256 subnets

/24

255.255.255.0

254

65,536 subnets

/25

255.255.255.128

126

128 subnets

/26

255.255.255.192

62

256 subnets

/27

255.255.255.224

30

512 subnets

/28

255.255.255.240

14

1,024 subnets

/29

255.255.255.248

6

2,048 subnets

/30

255.255.255.252

2

4,096 subnets

6. Subnetting Example

Let’s say you are given the following IP address and subnet mask:

  • IP Address: 192.168.10.0

  • Subnet Mask: 255.255.255.192

You want to divide the network into smaller subnets.

Step 1: Identify the network class

  • The IP address 192.168.10.0 is a Class C address.

Step 2: Borrow bits to create subnets

  • Subnet mask 255.255.255.192 corresponds to /26 CIDR notation (borrowing 2 bits).

Step 3: Calculate the number of subnets and hosts per subnet

  • Subnets: 2^2 = 4 subnets

  • Hosts per subnet: 2^6 - 2 = 62 hosts

Step 4: Subnet the network The subnets would be:

  • Subnet 1: 192.168.10.0 – 192.168.10.63

  • Subnet 2: 192.168.10.64 – 192.168.10.127

  • Subnet 3: 192.168.10.128 – 192.168.10.191

  • Subnet 4: 192.168.10.192 – 192.168.10.255

7. Key Takeaways for CCNA Exam

  • Subnetting helps divide a large network into smaller, manageable networks, making efficient use of IP addresses.

  • Master binary conversions and understand how to quickly calculate subnets and hosts.

  • Understand CIDR notation and its relation to subnet masks.

  • Practice calculating the number of subnets, hosts, and determining network and broadcast addresses.

  • Learn the common subnet masks for various CIDR notations (/24, /25, /26, etc.).


Subnetting Class C networks and VLSM (Variable Length Subnet Mask)

Subnetting Class C Networks and VLSM (Variable Length Subnet Mask)

Subnetting Class C networks and VLSM (Variable Length Subnet Mask) are important concepts that are covered in the CCNA exam. They both deal with efficient IP address management and network design, allowing for better use of address space and more flexible network configurations.

Let’s break these concepts down:

1. Subnetting Class C Networks

In Class C networks, the default subnet mask is 255.255.255.0 (or /24 in CIDR notation). This provides 256 IP addresses, but only 254 are usable for hosts (the first address is the network address, and the last one is the broadcast address).

Class C Network Breakdown

  • IP Range: 192.0.0.0 to 223.255.255.255

  • Default Subnet Mask: 255.255.255.0

    • This means 24 bits are used for the network portion and 8 bits are left for the host portion.

For example, for the IP 192.168.1.0/24:

  • Network Address: 192.168.1.0

  • Broadcast Address: 192.168.1.255

  • Usable IP Range: 192.168.1.1 to 192.168.1.254 (254 usable IP addresses).

Subnetting a Class C Network

To create subnets, we borrow bits from the host portion (the last 8 bits) and add them to the network portion. The more bits you borrow, the more subnets you can create, but this reduces the number of available hosts per subnet.

Let’s go through an example:

Example: Subnetting 192.168.1.0/24 into 4 Subnets

  • Step 1: Determine how many subnets you need.

    • You want 4 subnets.

  • Step 2: Borrow bits.

    • To create 4 subnets, you need to borrow 2 bits from the host portion (2^2 = 4 subnets).

  • Step 3: Calculate the new subnet mask.

    • The original subnet mask is 255.255.255.0 or /24. After borrowing 2 bits, the new subnet mask becomes /26 (since 24 bits + 2 borrowed bits = 26 bits).

    • New Subnet Mask: 255.255.255.192 (or /26 in CIDR notation).

  • Step 4: Calculate the number of hosts per subnet.

    • Each subnet now has 6 host bits (since 32 total bits - 26 bits for the network = 6 bits for hosts).

    • The formula for calculating hosts per subnet is: 2n−22^n - 22n−2 Where n is the number of host bits. 26−2=62 usable hosts per subnet2^6 - 2 = 62 \text{ usable hosts per subnet}26−2=62 usable hosts per subnet

  • Step 5: Divide the network into subnets.

    • The network 192.168.1.0/26 is divided into 4 subnets:

      • Subnet 1: 192.168.1.0/26

        • Network Address: 192.168.1.0

        • Usable IP Range: 192.168.1.1 to 192.168.1.62

        • Broadcast Address: 192.168.1.63

      • Subnet 2: 192.168.1.64/26

        • Network Address: 192.168.1.64

        • Usable IP Range: 192.168.1.65 to 192.168.1.126

        • Broadcast Address: 192.168.1.127

      • Subnet 3: 192.168.1.128/26

        • Network Address: 192.168.1.128

        • Usable IP Range: 192.168.1.129 to 192.168.1.190

        • Broadcast Address: 192.168.1.191

      • Subnet 4: 192.168.1.192/26

        • Network Address: 192.168.1.192

        • Usable IP Range: 192.168.1.193 to 192.168.1.254

        • Broadcast Address: 192.168.1.255

2. VLSM (Variable Length Subnet Mask)

VLSM (Variable Length Subnet Mask) is a technique that allows you to use different subnet masks within the same network. This flexibility helps conserve IP addresses by allocating the appropriate number of IP addresses based on the needs of different subnets.

  • In traditional subnetting, all subnets must have the same size. VLSM allows for creating subnets of different sizes in a single network.

  • With VLSM, you can borrow bits more efficiently, assigning larger subnets where more hosts are needed and smaller subnets where fewer hosts are required.

VLSM Process

  1. Start with the largest subnet: You begin by allocating the largest subnet with the fewest borrowed bits.

  2. Divide the remaining network: Once the first subnet is created, you can continue to create smaller subnets by borrowing more bits for each subsequent subnet.

  3. Use the smallest possible subnet for remaining addresses: This reduces wasted IP addresses.

Example: Using VLSM to Create Subnets for Different Needs

Let’s say we have a Class C network 192.168.1.0/24 and we need to create the following subnets:

  • Subnet 1: 50 hosts

  • Subnet 2: 20 hosts

  • Subnet 3: 6 hosts

Step 1: Start with the largest subnet (50 hosts).

  • To create a subnet with 50 hosts, we need at least 6 host bits (because 2^6 - 2 = 62 usable hosts).

  • The subnet mask will be /26 (255.255.255.192).

    • Subnet 1: 192.168.1.0/26

      • Network Address: 192.168.1.0

      • Usable IP Range: 192.168.1.1 to 192.168.1.62

      • Broadcast Address: 192.168.1.63

Step 2: Create the next subnet (20 hosts).

  • For 20 hosts, we need 5 host bits (because 2^5 - 2 = 30 usable hosts).

  • The subnet mask will be /27 (255.255.255.224).

    • Subnet 2: 192.168.1.64/27

      • Network Address: 192.168.1.64

      • Usable IP Range: 192.168.1.65 to 192.168.1.94

      • Broadcast Address: 192.168.1.95

Step 3: Create the smallest subnet (6 hosts).

  • For 6 hosts, we need 3 host bits (because 2^3 - 2 = 6 usable hosts).

  • The subnet mask will be /29 (255.255.255.248).

    • Subnet 3: 192.168.1.96/29

      • Network Address: 192.168.1.96

      • Usable IP Range: 192.168.1.97 to 192.168.1.102

      • Broadcast Address: 192.168.1.103

Step 4: Remaining addresses.

  • After assigning the subnets above, you would still have IP addresses left for further subnets. You can continue applying VLSM to fit additional subnet sizes based on your needs.

3. Key Differences Between Subnetting and VLSM

  • Traditional Subnetting: All subnets must have the same size.

  • VLSM: Allows the creation of subnets of different sizes, maximizing address efficiency.

For the CCNA exam, understanding VLSM is crucial because it allows for flexible IP address allocation and network design, especially in larger or complex networks.

4. Key Takeaways

  1. Class C Subnetting: Involves dividing a 192.168.x.x range with a default subnet mask of 255.255.255.0 to create smaller subnets by borrowing bits from the host portion.

  2. VLSM (Variable Length Subnet Mask): Allows you to use different subnet masks within the same network, making more efficient use of IP addresses.

  3. Subnet Size: The number of bits borrowed determines how many subnets you can create and how many hosts each subnet can have.

  4. VLSM Process: Start with the largest subnet, allocate it, and then create smaller subnets as needed.


practical subnetting question

Question:

You have been given the network 192.168.10.0/24 and need to create the following subnets:

  • Subnet 1: 50 hosts

  • Subnet 2: 30 hosts

  • Subnet 3: 10 hosts

  • Subnet 4: 6 hosts

Your task is to:

  1. Calculate the subnet mask for each subnet.

  2. Determine the range of IP addresses available in each subnet (network address, usable IP range, and broadcast address).

  3. Ensure there is no overlap in IP address assignments.

Solution:

Step 1: Determine the required number of bits for each subnet

  • Subnet 1 (50 hosts):

    • To accommodate 50 hosts, we need at least 6 host bits because 2^6 - 2 = 62 usable hosts.

    • So, the subnet mask for this subnet will be /26 (255.255.255.192).

  • Subnet 2 (30 hosts):

    • To accommodate 30 hosts, we need at least 5 host bits because 2^5 - 2 = 30 usable hosts.

    • So, the subnet mask for this subnet will be /27 (255.255.255.224).

  • Subnet 3 (10 hosts):

    • To accommodate 10 hosts, we need at least 4 host bits because 2^4 - 2 = 14 usable hosts.

    • So, the subnet mask for this subnet will be /28 (255.255.255.240).

  • Subnet 4 (6 hosts):

    • To accommodate 6 hosts, we need at least 3 host bits because 2^3 - 2 = 6 usable hosts.

    • So, the subnet mask for this subnet will be /29 (255.255.255.248).

Step 2: Subnet the Network

You have the original network 192.168.10.0/24 and need to subnet it. The process will involve assigning the subnets in order of size, starting with the largest subnet.

Subnet 1: 50 Hosts (Subnet Mask: /26)

  • Network Address: 192.168.10.0/26

  • Usable IP Range: 192.168.10.1 to 192.168.10.62

  • Broadcast Address: 192.168.10.63

Subnet 2: 30 Hosts (Subnet Mask: /27)

  • Network Address: 192.168.10.64/27

  • Usable IP Range: 192.168.10.65 to 192.168.10.94

  • Broadcast Address: 192.168.10.95

Subnet 3: 10 Hosts (Subnet Mask: /28)

  • Network Address: 192.168.10.96/28

  • Usable IP Range: 192.168.10.97 to 192.168.10.110

  • Broadcast Address: 192.168.10.111

Subnet 4: 6 Hosts (Subnet Mask: /29)

  • Network Address: 192.168.10.112/29

  • Usable IP Range: 192.168.10.113 to 192.168.10.118

  • Broadcast Address: 192.168.10.119

Step 3: Verify Address Allocation

  • Subnet 1: 192.168.10.0/26 (62 usable IPs: 192.168.10.1 to 192.168.10.62)

  • Subnet 2: 192.168.10.64/27 (30 usable IPs: 192.168.10.65 to 192.168.10.94)

  • Subnet 3: 192.168.10.96/28 (14 usable IPs: 192.168.10.97 to 192.168.10.110)

  • Subnet 4: 192.168.10.112/29 (6 usable IPs: 192.168.10.113 to 192.168.10.118)

As you can see, the subnets have been divided properly with no overlap. The network address, usable IP range, and broadcast address are all correctly assigned.

Recap of Subnetting Details:

Subnet

Network Address

Usable IP Range

Broadcast Address

Subnet Mask

Subnet 1

192.168.10.0/26

192.168.10.1 to 192.168.10.62

192.168.10.63

255.255.255.192 (/26)

Subnet 2

192.168.10.64/27

192.168.10.65 to 192.168.10.94

192.168.10.95

255.255.255.224 (/27)

Subnet 3

192.168.10.96/28

192.168.10.97 to 192.168.10.110

192.168.10.111

255.255.255.240 (/28)

Subnet 4

192.168.10.112/29

192.168.10.113 to 192.168.10.118

192.168.10.119

255.255.255.248 (/29)

Key Takeaways:

  • When subnetting, start with the largest subnet and then work your way down.

  • Calculate the number of bits needed for each subnet based on the number of hosts required.

  • VLSM allows you to create subnets of different sizes within the same network, providing flexibility and better utilization of IP addresses.


Variable Length Subnet Masking (VLSM)

Sure! Let’s go through a Variable Length Subnet Masking (VLSM) example, where you need to create multiple subnets of different sizes from a single network.

VLSM Example:

Given network: 192.168.1.0/24

Subnet requirements:

  • Subnet 1: 50 hosts

  • Subnet 2: 30 hosts

  • Subnet 3: 10 hosts

  • Subnet 4: 5 hosts

Step-by-Step Solution:

Step 1: Determine the Number of Host Bits Needed for Each Subnet

We start by calculating how many host bits are required to support the required number of hosts in each subnet. The formula for calculating the number of usable hosts is:

2n−22^n - 22n−2

Where n is the number of host bits, and -2 accounts for the network and broadcast addresses.

  • Subnet 1 (50 hosts):

    • To accommodate 50 hosts, we need at least 6 host bits because 2^6 - 2 = 62 usable hosts.

    • The subnet mask for this subnet will be /26 (255.255.255.192), since 32 bits - 6 bits = 26 bits for the network.

  • Subnet 2 (30 hosts):

    • To accommodate 30 hosts, we need at least 5 host bits because 2^5 - 2 = 30 usable hosts.

    • The subnet mask for this subnet will be /27 (255.255.255.224), since 32 bits - 5 bits = 27 bits for the network.

  • Subnet 3 (10 hosts):

    • To accommodate 10 hosts, we need at least 4 host bits because 2^4 - 2 = 14 usable hosts.

    • The subnet mask for this subnet will be /28 (255.255.255.240), since 32 bits - 4 bits = 28 bits for the network.

  • Subnet 4 (5 hosts):

    • To accommodate 5 hosts, we need at least 3 host bits because 2^3 - 2 = 6 usable hosts.

    • The subnet mask for this subnet will be /29 (255.255.255.248), since 32 bits - 3 bits = 29 bits for the network.

Step 2: Allocate Subnets Using VLSM

Now, let’s allocate the subnets from the 192.168.1.0/24 network, starting with the largest subnet (to minimize address wastage).

Subnet 1: 50 Hosts (Subnet Mask: /26)

  • Network Address: 192.168.1.0/26

  • Usable IP Range: 192.168.1.1 to 192.168.1.62

  • Broadcast Address: 192.168.1.63

  • Subnet Mask: 255.255.255.192

    • This gives us 62 usable IP addresses (2^6 - 2 = 62).

Now, the next available network is 192.168.1.64.

Subnet 2: 30 Hosts (Subnet Mask: /27)

  • Network Address: 192.168.1.64/27

  • Usable IP Range: 192.168.1.65 to 192.168.1.94

  • Broadcast Address: 192.168.1.95

  • Subnet Mask: 255.255.255.224

    • This gives us 30 usable IP addresses (2^5 - 2 = 30).

Now, the next available network is 192.168.1.96.

Subnet 3: 10 Hosts (Subnet Mask: /28)

  • Network Address: 192.168.1.96/28

  • Usable IP Range: 192.168.1.97 to 192.168.1.110

  • Broadcast Address: 192.168.1.111

  • Subnet Mask: 255.255.255.240

    • This gives us 14 usable IP addresses (2^4 - 2 = 14).

Now, the next available network is 192.168.1.112.

Subnet 4: 5 Hosts (Subnet Mask: /29)

  • Network Address: 192.168.1.112/29

  • Usable IP Range: 192.168.1.113 to 192.168.1.118

  • Broadcast Address: 192.168.1.119

  • Subnet Mask: 255.255.255.248

    • This gives us 6 usable IP addresses (2^3 - 2 = 6).

Step 3: Review Subnet Details

Subnet

Network Address

Usable IP Range

Broadcast Address

Subnet Mask

Subnet 1

192.168.1.0/26

192.168.1.1 to 192.168.1.62

192.168.1.63

255.255.255.192 (/26)

Subnet 2

192.168.1.64/27

192.168.1.65 to 192.168.1.94

192.168.1.95

255.255.255.224 (/27)

Subnet 3

192.168.1.96/28

192.168.1.97 to 192.168.1.110

192.168.1.111

255.255.255.240 (/28)

Subnet 4

192.168.1.112/29

192.168.1.113 to 192.168.1.118

192.168.1.119

255.255.255.248 (/29)

Summary:

  • VLSM allows you to assign different subnet masks to different subnets within the same network based on the number of required hosts.

  • By starting with the largest subnet and working downwards, you can allocate IP addresses more efficiently.

  • Subnet Masking: Each subnet has a different subnet mask (/26, /27, /28, /29) based on its host requirements.

  • The example above demonstrates how to divide a 192.168.1.0/24 network into subnets with varying sizes.

This type of subnetting is crucial for efficiently managing IP addresses, especially in larger networks. By using VLSM, you avoid wasting IP addresses and can allocate just the right amount of addresses for each subnet.

Subnetting a Large Network

Subnetting a Large Network (Subnetting with CIDR, VLSM, and Classless Inter-Domain Routing)

When subnetting large networks, it's important to break down the network into smaller, more manageable parts. Large networks are usually broken into smaller subnets based on the needs of each department, region, or service, ensuring optimal utilization of IP addresses.

Steps for Subnetting Large Networks

1. Understand the Given Network

The first thing you’ll be given is the network address in the form of CIDR notation (Classless Inter-Domain Routing). For example, a typical large network might be 10.0.0.0/8, which has a default subnet mask of 255.0.0.0.

The CIDR notation means:

  • 10.0.0.0/8 means that the first 8 bits are reserved for the network part, and the rest are for hosts.

2. Determine How Many Subnets You Need

Subnetting large networks requires calculating how many subnets you need to create. For example, if you have multiple regions or departments in your organization, you'll want to split the large network into smaller subnets.

  • Let's say you need 100 subnets, you need to figure out how many bits to borrow from the host part to create 100 subnets.

To determine the number of bits to borrow, use this formula:

2n≥Number of required subnets2^n \geq \text{Number of required subnets}2n≥Number of required subnets

Where n is the number of bits to borrow.

For example:

  • If you need 100 subnets, then: 27=128(which is more than 100, so borrow 7 bits)2^7 = 128 \quad (\text{which is more than 100, so borrow 7 bits})27=128(which is more than 100, so borrow 7 bits) This means you need to borrow 7 bits from the host portion.

3. Calculate the New Subnet Mask

After determining how many bits to borrow, you calculate the new subnet mask.

  • The original subnet mask for 10.0.0.0/8 is 255.0.0.0.

  • If we borrow 7 bits, we add 7 to the original 8 bits (from /8), making the new subnet mask /15 (because 8 + 7 = 15).

The new subnet mask would be:

  • /15 (255.254.0.0)

4. Determine the Number of Hosts per Subnet

Once the new subnet mask is determined, you can calculate how many usable host IPs are available in each subnet.

The formula for calculating the number of usable hosts in a subnet is:

2h−22^h - 22h−2

Where h is the number of host bits (the remaining bits after borrowing for the subnet).

For example:

  • For /15 subnet (which is 255.254.0.0):

    • Total bits = 32

    • Network bits = 15 (as per subnet mask /15)

    • Host bits = 32 - 15 = 17 bits for hosts

    Number of usable hosts in each subnet:

    217−2=131,070(usable hosts per subnet)2^{17} - 2 = 131,070 \quad (\text{usable hosts per subnet})217−2=131,070(usable hosts per subnet)

So, each /15 subnet can accommodate 131,070 usable hosts.

5. Subnetting into Smaller Subnets (VLSM)

Now, we start dividing the large subnets into even smaller subnets. This is where Variable Length Subnet Masking (VLSM) comes into play. VLSM allows you to create subnets of different sizes, based on your requirements.

For example, let's assume you need to further divide your /15 subnets into smaller subnets for different departments or regions:

  • Subnet for Finance Department (50 hosts)

  • Subnet for HR Department (30 hosts)

  • Subnet for IT Department (10 hosts)

  • Subnet for Marketing Department (5 hosts)

Let's break it down step-by-step for one of the /15 subnets, say 10.0.0.0/15.

Detailed VLSM Subnetting Example (Further Dividing a /15 Subnet)

Step 1: Start with the largest subnet and move downwards

  • Given subnet: 10.0.0.0/15 with 131,070 usable IPs.

Step 2: Create the first subnet for Finance (50 hosts)

To support 50 hosts, we need at least 6 host bits (because 2^6 - 2 = 62 usable hosts).

The new subnet mask for this subnet will be /26 (because 32 - 6 = 26).

  • Network Address: 10.0.0.0/26

  • Usable IP Range: 10.0.0.1 to 10.0.0.62

  • Broadcast Address: 10.0.0.63

Now, the next available network will be 10.0.0.64.

Step 3: Create the second subnet for HR (30 hosts)

For 30 hosts, we need at least 5 host bits (because 2^5 - 2 = 30 usable hosts).

The new subnet mask for this subnet will be /27 (because 32 - 5 = 27).

  • Network Address: 10.0.0.64/27

  • Usable IP Range: 10.0.0.65 to 10.0.0.94

  • Broadcast Address: 10.0.0.95

Now, the next available network will be 10.0.0.96.

Step 4: Create the third subnet for IT (10 hosts)

For 10 hosts, we need at least 4 host bits (because 2^4 - 2 = 14 usable hosts).

The new subnet mask for this subnet will be /28 (because 32 - 4 = 28).

  • Network Address: 10.0.0.96/28

  • Usable IP Range: 10.0.0.97 to 10.0.0.110

  • Broadcast Address: 10.0.0.111

Now, the next available network will be 10.0.0.112.

Step 5: Create the fourth subnet for Marketing (5 hosts)

For 5 hosts, we need at least 3 host bits (because 2^3 - 2 = 6 usable hosts).

The new subnet mask for this subnet will be /29 (because 32 - 3 = 29).

  • Network Address: 10.0.0.112/29

  • Usable IP Range: 10.0.0.113 to 10.0.0.118

  • Broadcast Address: 10.0.0.119

Step 6: Verify Subnet Allocation

Here is a summary of how the large /15 subnet has been divided using VLSM:

Subnet

Network Address

Usable IP Range

Broadcast Address

Subnet Mask

Finance

10.0.0.0/26

10.0.0.1 to 10.0.0.62

10.0.0.63

255.255.255.192 (/26)

HR

10.0.0.64/27

10.0.0.65 to 10.0.0.94

10.0.0.95

255.255.255.224 (/27)

IT

10.0.0.96/28

10.0.0.97 to 10.0.0.110

10.0.0.111

255.255.255.240 (/28)

Marketing

10.0.0.112/29

10.0.0.113 to 10.0.0.118

10.0.0.119

255.255.255.248 (/29)

Key Takeaways:

  • CIDR and Subnetting: You break a large network into smaller subnets using CIDR notation (/8, /16, /24, etc.) and borrow bits to create the desired number of subnets.

  • VLSM: Allows you to use different subnet masks for different subnets depending on the number of required hosts. Start with the largest subnet and work your way down to smaller subnets.

  • Subnet Mask Calculation: Each subnet mask defines how many host bits are available and, consequently, how many usable IP addresses are available in that subnet.


Subnetting on the 4th octet

Sure! Subnetting on the 4th octet (which is the last octet of an IP address) refers to using the bits in the last octet to create subnets. This is typically done when you're working with a network that has a larger subnet (such as /24 or /16) and need to divide it further, focusing on the 4th octet of the address to create additional subnets.

Understanding the 4th Octet Subnetting

An IPv4 address consists of four octets. For example, the address 192.168.1.0/24 has four octets:

KopierenBearbeiten

192.168.1.0 | | | | Octet 1 Octet 2 Octet 3 Octet 4

When subnetting on the 4th octet, you're borrowing bits from the 4th octet to divide the network further. Each octet consists of 8 bits. So, the 4th octet (or last octet) has 8 bits to work with.

Example: Subnetting on the 4th Octet

Let's work through an example where we have a network of 192.168.1.0/24 and we want to subnet it further using the 4th octet.

Step 1: Initial Setup

The starting point is 192.168.1.0/24, which means:

  • The network portion is /24 (meaning the first 24 bits are the network).

  • The host portion is the remaining 8 bits (in the 4th octet).

Here's the IP address breakdown:

yaml

KopierenBearbeiten

Network: 192.168.1.0 Subnet Mask: 255.255.255.0 (or /24)

The binary representation of 192.168.1.0 is:

KopierenBearbeiten

11000000.10101000.00000001.00000000

The 4th octet (the last part) is 00000000.

Step 2: Decide How Many Subnets You Need

Let's say we want to divide the 192.168.1.0/24 network into 8 smaller subnets using the 4th octet. To do this, we need to borrow some bits from the 4th octet.

  • Borrowing 3 bits from the 4th octet will give us 8 subnets (2^3 = 8).

The new subnet mask will now be:

KopierenBearbeiten

/27

Why /27?

  • Original subnet: /24

  • Borrow 3 bits from the 4th octet: 24 + 3 = 27

  • Subnet mask: 255.255.255.224

The subnet mask in binary becomes:

KopierenBearbeiten

11111111.11111111.11111111.11100000

Step 3: Calculate the Subnets

Now, we can calculate the subnets based on the new subnet mask /27.

  • A /27 subnet mask means 32 IP addresses per subnet (because 2^5 = 32), but remember, two IP addresses are reserved (network and broadcast addresses), so there are 30 usable IP addresses per subnet.

Let's break down the subnets:

  • Subnet 1: 192.168.1.0/27

    • Network Address: 192.168.1.0

    • Usable Range: 192.168.1.1 to 192.168.1.30

    • Broadcast Address: 192.168.1.31

  • Subnet 2: 192.168.1.32/27

    • Network Address: 192.168.1.32

    • Usable Range: 192.168.1.33 to 192.168.1.62

    • Broadcast Address: 192.168.1.63

  • Subnet 3: 192.168.1.64/27

    • Network Address: 192.168.1.64

    • Usable Range: 192.168.1.65 to 192.168.1.94

    • Broadcast Address: 192.168.1.95

  • Subnet 4: 192.168.1.96/27

    • Network Address: 192.168.1.96

    • Usable Range: 192.168.1.97 to 192.168.1.126

    • Broadcast Address: 192.168.1.127

  • Subnet 5: 192.168.1.128/27

    • Network Address: 192.168.1.128

    • Usable Range: 192.168.1.129 to 192.168.1.158

    • Broadcast Address: 192.168.1.159

  • Subnet 6: 192.168.1.160/27

    • Network Address: 192.168.1.160

    • Usable Range: 192.168.1.161 to 192.168.1.190

    • Broadcast Address: 192.168.1.191

  • Subnet 7: 192.168.1.192/27

    • Network Address: 192.168.1.192

    • Usable Range: 192.168.1.193 to 192.168.1.222

    • Broadcast Address: 192.168.1.223

  • Subnet 8: 192.168.1.224/27

    • Network Address: 192.168.1.224

    • Usable Range: 192.168.1.225 to 192.168.1.254

    • Broadcast Address: 192.168.1.255

Step 4: Verify Subnet Allocation

Here’s a table summarizing the subnets:

Subnet

Network Address

Usable IP Range

Broadcast Address

Subnet Mask

Subnet 1

192.168.1.0/27

192.168.1.1 - 192.168.1.30

192.168.1.31

255.255.255.224

Subnet 2

192.168.1.32/27

192.168.1.33 - 192.168.1.62

192.168.1.63

255.255.255.224

Subnet 3

192.168.1.64/27

192.168.1.65 - 192.168.1.94

192.168.1.95

255.255.255.224

Subnet 4

192.168.1.96/27

192.168.1.97 - 192.168.1.126

192.168.1.127

255.255.255.224

Subnet 5

192.168.1.128/27

192.168.1.129 - 192.168.1.158

192.168.1.159

255.255.255.224

Subnet 6

192.168.1.160/27

192.168.1.161 - 192.168.1.190

192.168.1.191

255.255.255.224

Subnet 7

192.168.1.192/27

192.168.1.193 - 192.168.1.222

192.168.1.223

255.255.255.224

Subnet 8

192.168.1.224/27

192.168.1.225 - 192.168.1.254

192.168.1.255

255.255.255.224

Key Concepts in Subnetting on the 4th Octet:

  • CIDR Notation: Subnetting starts with understanding the CIDR notation. For example, /24 indicates 24 bits for the network and 8 bits for the host. By borrowing bits from the 4th octet, you can divide the network into smaller subnets.

  • Subnet Mask: Changing the subnet mask, like /24 to /27, reduces the size of each subnet and increases the number of subnets.

  • Binary Subnetting: Subnetting works by borrowing bits from the host portion of the IP address (the 4th octet in this case). The more bits you borrow, the more subnets you get.

  • Usable IP Range: For each subnet, the usable IP range is the set of IP addresses between the network and broadcast addresses.

Subnetting on the 4th octet helps you manage IP addresses more efficiently by splitting large networks into smaller, more manageable subnets.


Subnetting on the 3rd octet

Subnetting on the 3rd octet is a method of dividing a network into smaller subnets by borrowing bits from the 3rd octet of the IPv4 address. This is typically done when you are working with a Class B address (such as 172.16.0.0/16) or even a Class A address (like 10.0.0.0/8), and you need to break the network down into smaller subnets for better IP address management.

Let's go through an example of subnetting on the 3rd octet of a Class B network. For simplicity, we'll use the address 172.16.0.0/16 (which has a default subnet mask of 255.255.0.0).

Step-by-Step Example of Subnetting on the 3rd Octet

1. Understanding the Class B Network

The network address we have is 172.16.0.0/16. In this network:

  • Class B Network: The first 16 bits are used for the network portion (/16), and the remaining 16 bits are for the host portion.

  • Subnet Mask: 255.255.0.0 (binary: 11111111.11111111.00000000.00000000).

Here, the first two octets (172.16) are dedicated to the network, and the last two octets (0.0) are dedicated to hosts.

2. Deciding How Many Subnets You Need

Let’s assume you want to divide the 172.16.0.0/16 network into 8 subnets.

To do this, you need to borrow some bits from the host portion (which starts in the 3rd octet, i.e., the last 16 bits of the address).

  • To create 8 subnets, we use the formula 2^n ≥ number of required subnets, where n is the number of bits borrowed from the host portion.

For 8 subnets:

23=82^3 = 823=8

So, we need to borrow 3 bits from the 3rd octet to create 8 subnets.

3. Determine the New Subnet Mask

  • Borrowing 3 bits from the 3rd octet increases the number of network bits from 16 to 19 (16 + 3 = 19).

  • The new subnet mask is /19.

So, the new subnet mask is:

  • Subnet Mask: 255.255.224.0 (in binary: 11111111.11111111.11100000.00000000).

4. Calculate the Subnets

Now, let's calculate the subnets. We borrowed 3 bits from the 3rd octet, and now we have a /19 subnet mask, meaning each subnet will have 8192 IP addresses (since 2^13 = 8192, where the remaining 13 bits are for hosts).

Here’s how the subnets will be allocated:

  • Subnet 1: 172.16.0.0/19

    • Network Address: 172.16.0.0

    • Usable IP Range: 172.16.0.1 to 172.16.31.254

    • Broadcast Address: 172.16.31.255

  • Subnet 2: 172.16.32.0/19

    • Network Address: 172.16.32.0

    • Usable IP Range: 172.16.32.1 to 172.16.63.254

    • Broadcast Address: 172.16.63.255

  • Subnet 3: 172.16.64.0/19

    • Network Address: 172.16.64.0

    • Usable IP Range: 172.16.64.1 to 172.16.95.254

    • Broadcast Address: 172.16.95.255

  • Subnet 4: 172.16.96.0/19

    • Network Address: 172.16.96.0

    • Usable IP Range: 172.16.96.1 to 172.16.127.254

    • Broadcast Address: 172.16.127.255

  • Subnet 5: 172.16.128.0/19

    • Network Address: 172.16.128.0

    • Usable IP Range: 172.16.128.1 to 172.16.159.254

    • Broadcast Address: 172.16.159.255

  • Subnet 6: 172.16.160.0/19

    • Network Address: 172.16.160.0

    • Usable IP Range: 172.16.160.1 to 172.16.191.254

    • Broadcast Address: 172.16.191.255

  • Subnet 7: 172.16.192.0/19

    • Network Address: 172.16.192.0

    • Usable IP Range: 172.16.192.1 to 172.16.223.254

    • Broadcast Address: 172.16.223.255

  • Subnet 8: 172.16.224.0/19

    • Network Address: 172.16.224.0

    • Usable IP Range: 172.16.224.1 to 172.16.255.254

    • Broadcast Address: 172.16.255.255

5. Summary of Subnet Allocation

Here’s the summary of the 8 subnets:

Subnet

Network Address

Usable IP Range

Broadcast Address

Subnet Mask

Subnet 1

172.16.0.0/19

172.16.0.1 - 172.16.31.254

172.16.31.255

255.255.224.0

Subnet 2

172.16.32.0/19

172.16.32.1 - 172.16.63.254

172.16.63.255

255.255.224.0

Subnet 3

172.16.64.0/19

172.16.64.1 - 172.16.95.254

172.16.95.255

255.255.224.0

Subnet 4

172.16.96.0/19

172.16.96.1 - 172.16.127.254

172.16.127.255

255.255.224.0

Subnet 5

172.16.128.0/19

172.16.128.1 - 172.16.159.254

172.16.159.255

255.255.224.0

Subnet 6

172.16.160.0/19

172.16.160.1 - 172.16.191.254

172.16.191.255

255.255.224.0

Subnet 7

172.16.192.0/19

172.16.192.1 - 172.16.223.254

172.16.223.255

255.255.224.0

Subnet 8

172.16.224.0/19

172.16.224.1 - 172.16.255.254

172.16.255.255

255.255.224.0

Key Points to Remember When Subnetting on the 3rd Octet:

  • CIDR Notation: You modify the CIDR prefix to reflect the new subnet size after borrowing bits from the host portion. In this example, we started with /16 and ended up with /19.

  • Binary Breakdown: Always break down the subnet mask into binary to see how many bits you are borrowing from the host portion.

  • Subnet Size: Each subnet created has 8192 total IP addresses, with 8190 usable addresses after excluding the network and broadcast addresses.

  • Subnet Allocation: By borrowing bits from the 3rd octet, you divide the Class B network into smaller subnets, each with its own network and broadcast addresses.

This method is commonly used in large enterprise networks where there is a need to split a single Class B network (/16) into multiple smaller subnets.

Private IP addresses

In the CCNA exam and in networking in general, private IP addresses are crucial for understanding how networking works in private environments, especially in regard to NAT (Network Address Translation) and IP address conservation. Let me explain private IP addresses in detail.

1. What Are Private IP Addresses?

Private IP addresses are IP addresses that are reserved for use within private networks. These IP addresses are not routable over the public Internet. They are defined by specific address ranges for IPv4 and IPv6.

The primary reason for having private IP addresses is to conserve public IP addresses and to allow devices within a local network to communicate without using up valuable public IP addresses.

These private IP addresses are defined by the IETF (Internet Engineering Task Force) in RFC 1918 for IPv4. The private IP address ranges are:

Private IP Address Ranges (IPv4)

Private IP addresses in IPv4 fall within the following ranges:

  1. Class A Private IP Range (10.x.x.x):

    • Network: 10.0.0.0/8

    • Usable Range: 10.0.0.1 to 10.255.255.254

    • Total Addresses: 16,777,216 addresses

    • Subnet Mask: 255.0.0.0 or /8

    Class A allows for a large number of hosts (over 16 million), making it suitable for very large networks.

  2. Class B Private IP Range (172.16.x.x to 172.31.x.x):

    • Network: 172.16.0.0/12

    • Usable Range: 172.16.0.1 to 172.31.255.254

    • Total Addresses: 1,048,576 addresses

    • Subnet Mask: 255.240.0.0 or /12

    Class B allows for up to 1 million addresses and is typically used for medium-sized networks.

  3. Class C Private IP Range (192.168.x.x):

    • Network: 192.168.0.0/16

    • Usable Range: 192.168.0.1 to 192.168.255.254

    • Total Addresses: 65,536 addresses

    • Subnet Mask: 255.255.0.0 or /16

    Class C is the most commonly used range in smaller networks (like home and small office networks).

2. Why Are Private IP Addresses Important?

  • Conservation of Public IPs: There is a limited number of public IPv4 addresses available. By using private IP addresses internally, multiple devices can share a single public IP address when connecting to the internet using NAT.

  • Security: Devices on private IP address networks are not directly accessible from the internet, which helps to increase security. To access the internet or external resources, the private IP addresses must use a public IP address via NAT.

  • Simplified Network Management: Using private IP addresses allows large organizations or even home networks to organize and structure their internal IP address spaces without worrying about exhausting the public IP space.

3. How Do Private IP Addresses Work?

Private IP addresses cannot be routed on the public internet. This means that if a device on a private network wants to communicate with a device on the internet (or outside its private network), a mechanism like NAT (Network Address Translation) is needed.

Network Address Translation (NAT)

NAT is a technique used in networking to map private IP addresses to a public IP address, typically using a router or firewall. It allows multiple devices within a private network to share a single public IP address when accessing external resources like the internet.

  • One-to-One NAT: One private IP is mapped to one public IP.

  • Many-to-One NAT (PAT - Port Address Translation): Multiple private IPs share a single public IP, but each connection is distinguished by a unique port number. This is also called overloading.

4. Common Uses of Private IP Addresses

  1. Home Networks:

    • Most home routers use private IP addresses (usually in the 192.168.x.x range) for devices like computers, smartphones, and printers.

    • The home router then uses NAT to allow all devices to access the internet using the router's single public IP address.

  2. Corporate Networks:

    • Large businesses often have Class A or Class B private IP ranges internally to manage large numbers of devices. They use NAT and sometimes VPNs (Virtual Private Networks) to connect to external resources securely.

  3. Network Security:

    • By keeping devices on a private network, they are shielded from direct access by external actors. Routers and firewalls handle traffic between private and public networks.

5. Examples of Private IP Address Assignments

Here’s a breakdown of the ranges of private IP addresses and their typical use cases:

Class A Private IP Range:

  • Network: 10.0.0.0/8

  • Usable Range: 10.0.0.1 to 10.255.255.254

  • Common Use: Large organizations, enterprises, or service providers with extensive internal networks.

Class B Private IP Range:

  • Network: 172.16.0.0/12

  • Usable Range: 172.16.0.1 to 172.31.255.254

  • Common Use: Medium-sized organizations with substantial internal networks. Typically used in corporate environments.

Class C Private IP Range:

  • Network: 192.168.0.0/16

  • Usable Range: 192.168.0.1 to 192.168.255.254

  • Common Use: Home networks, small office networks, and small businesses.

6. How to Identify Private IP Addresses?

The key ranges for private IP addresses are:

  • 10.0.0.0 – 10.255.255.255 (Class A)

  • 172.16.0.0 – 172.31.255.255 (Class B)

  • 192.168.0.0 – 192.168.255.255 (Class C)

Any IP address within these ranges is a private IP address. Non-private IP addresses are considered public IPs, which are globally routable on the internet.

7. Private IP Address Examples

Here are some examples of private IP addresses:

  • 10.10.10.1 (from the Class A range)

  • 172.20.15.5 (from the Class B range)

  • 192.168.1.100 (from the Class C range)

These addresses would only be used internally within a network. They cannot communicate directly with devices on the internet unless NAT is used.

8. Private vs. Public IP Addresses

  • Private IPs: Reserved for use within private networks. Not routable on the internet.

  • Public IPs: Assigned to devices or networks that need to communicate over the internet. They are globally routable and assigned by organizations like IANA (Internet Assigned Numbers Authority).

Private IP addresses are mapped to public IP addresses through NAT when accessing the internet. A single public IP address can represent a whole group of private IP addresses, allowing them to share resources and access external services.

9. CIDR and Private IPs

Private IP addresses can be expressed in CIDR (Classless Inter-Domain Routing) notation. The CIDR notation represents the network size and how many bits are allocated for the network portion. For example:

  • 10.0.0.0/8 (Private Class A network with 16,777,216 addresses)

  • 172.16.0.0/12 (Private Class B network with 1,048,576 addresses)

  • 192.168.0.0/16 (Private Class C network with 65,536 addresses)

10. How Private IP Addresses are Used in the Real World

  • Home/Small Business: Devices in the home or small business network use private IP addresses like 192.168.1.x. These devices connect to the internet through a router that has a public IP address. The router uses NAT to map the private IP addresses to the public one.

  • Corporate Networks: Companies often use private IP ranges for their internal network and use VPNs or firewalls to allow secure communication between different parts of the network or external resources.

Summary for CCNA Exam:

  • Private IP addresses are not routable on the internet.

  • They help conserve the limited number of public IP addresses available.

  • Private IP address ranges for IPv4:

    • 10.0.0.0 – 10.255.255.255 (Class A)

    • 172.16.0.0 – 172.31.255.255 (Class B)

    • 192.168.0.0 – 192.168.255.255 (Class C)

  • NAT (Network Address Translation) allows private IPs to access the internet using a public IP.

  • Understanding private IP addresses and NAT is key to efficient network design and security, and it’s important to know these concepts for the CCNA exam.


Author

abdullah S.

Informationen

Zuletzt geändert