Subnetting Study Notes PDF

Document Details

ExcitedMossAgate3075

Uploaded by ExcitedMossAgate3075

Bells University of Technology

Tags

subnetting IP addressing networking computer networks

Summary

These notes provide a comprehensive explanation of subnets and subnetting, including examples for different classes of IP addresses, such as Class A, Class B, and Class C. Useful for understanding how IP addresses are divided for better organization, security, and management within a network.

Full Transcript

Subnets and Subnetting What is a Subnet? A subnet (short for subnetwork) is a logically segmented portion of an IP network. Subnetting is the process of dividing a larger network into smaller, manageable sub-networks. This allows for better organization, security, and efficient use of IP addresses...

Subnets and Subnetting What is a Subnet? A subnet (short for subnetwork) is a logically segmented portion of an IP network. Subnetting is the process of dividing a larger network into smaller, manageable sub-networks. This allows for better organization, security, and efficient use of IP addresses. Key benefits of subnetting include: 1. Reducing network congestion. 2. Enhancing security by isolating segments. 3. Simplifying network management. 4. Efficient use of IP addresses. Subnet Masks A subnet mask defines which portion of an IP address is the network part and which is the host part. For example: 255.255.255.0 (Class C default) means the first three octets identify the network, and the last octet identifies the host. In binary: Subnet masks use contiguous 1s to represent the network portion and 0s for the host portion. Classes of IP Addresses IP addresses are divided into classes, which determine their default subnet mask: Class A: o Range: 1.0.0.0 to 126.0.0.0 o Default subnet mask: 255.0.0.0 (or /8) o Supports: 126 networks, ~16 million hosts per network. Class B: o Range: 128.0.0.0 to 191.255.0.0 o Default subnet mask: 255.255.0.0 (or /16) o Supports: 16,384 networks, ~65,536 hosts per network. Class C: o Range: 192.0.0.0 to 223.255.255.0 o Default subnet mask: 255.255.255.0 (or /24) o Supports: 2,097,152 networks, 254 hosts per network. Subnetting Calculations When subnetting, the subnet mask is extended by borrowing bits from the host portion. Each borrowed bit doubles the number of subnets while reducing the number of available hosts per subnet. Formulas: 1. Number of Subnets: 2n2^n2n nnn: Number of borrowed bits. 2. Number of Hosts per Subnet: 2h−22^h - 22h−2 hhh: Number of host bits (subtract 2 for network and broadcast addresses). 3. Subnet Increment: Increment is calculated as 256−new subnet mask octet256 - \text{new subnet mask octet}256−new subnet mask octet. Subnetting Class A Example: Subnetting 10.0.0.0/8 into /16 subnets 1. Default subnet mask: 255.0.0.0 (/8). 2. New subnet mask: 255.255.0.0 (/16). 3. Borrowed bits: 16−8=16 - 8 = 816−8=8. 4. Number of subnets: 28=2562^8 = 25628=256. 5. Hosts per subnet: 216−2=65,5342^{16} - 2 = 65,534216−2=65,534. 6. Subnet increment: 256−0=256256 - 0 = 256256−0=256. Subnets: 10.0.0.0/16 10.1.0.0/16 10.2.0.0/16, and so on. Subnetting Class B Example: Subnetting 172.16.0.0/16 into /18 subnets 1. Default subnet mask: 255.255.0.0 (/16). 2. New subnet mask: 255.255.192.0 (/18). 3. Borrowed bits: 18−16=218 - 16 = 218−16=2. 4. Number of subnets: 22=42^2 = 422=4. 5. Hosts per subnet: 214−2=16,3822^{14} - 2 = 16,382214−2=16,382. 6. Subnet increment: 256−192=64256 - 192 = 64256−192=64. Subnets: 172.16.0.0/18 172.16.64.0/18 172.16.128.0/18 172.16.192.0/18. Subnetting Class C Example: Subnetting 192.168.1.0/24 into /26 subnets 1. Default subnet mask: 255.255.255.0 (/24). 2. New subnet mask: 255.255.255.192 (/26). 3. Borrowed bits: 26−24=226 - 24 = 226−24=2. 4. Number of subnets: 22=42^2 = 422=4. 5. Hosts per subnet: 26−2=622^6 - 2 = 6226−2=62. 6. Subnet increment: 256−192=64256 - 192 = 64256−192=64. Subnets: 192.168.1.0/26 (hosts: 192.168.1.1 - 192.168.1.62, broadcast: 192.168.1.63). 192.168.1.64/26 (hosts: 192.168.1.65 - 192.168.1.126, broadcast: 192.168.1.127). 192.168.1.128/26 (hosts: 192.168.1.129 - 192.168.1.190, broadcast: 192.168.1.191). 192.168.1.192/26 (hosts: 192.168.1.193 - 192.168.1.254, broadcast: 192.168.1.255). Quick Summary Class Default Mask Subnets (2^n) Hosts per Subnet (2^h - 2) A 255.0.0.0 (/8) 2n2^n2n 224−n−22^{24-n} - 2224−n−2 B 255.255.0.0 (/16) 2n2^n2n 216−n−22^{16-n} - 2216−n−2 C 255.255.255.0 (/24) 2n2^n2n 28−n−22^{8-n} - 228−n−2 This note covers the basics and examples for understanding and calculating subnets in Class A, B, and C networks. Let me know if you'd like further clarifications or advanced examples! 4o You said: a more comprehensive and detailed one with more examples ChatGPT said: ChatGPT Here’s a detailed and comprehensive explanation of subnets and subnetting with expanded examples for Class A, Class B, and Class C networks. Understanding Subnets and Subnetting What is a Subnet? A subnet is a smaller division of a larger IP network, created by borrowing bits from the host portion of an IP address. Subnetting divides an IP address range into smaller, manageable segments, improving efficiency, security, and performance. Example Scenario: A company with an IP address block 192.168.1.0/24 wants to divide its network into four smaller sub-networks for different departments, such as HR, IT, Finance, and Sales. Subnetting allows this by allocating separate ranges for each department. Subnet Masks A subnet mask is used to determine how an IP address is divided into the network and host portions: Network portion: Identifies the specific subnet. Host portion: Identifies individual devices within a subnet. Default Subnet Masks for Classes Class IP Range Default Mask CIDR Notation A 1.0.0.0 - 126.0.0.0 255.0.0.0 (/8) /8 B 128.0.0.0 - 191.255.0.0 255.255.0.0 (/16) /16 C 192.0.0.0 - 223.255.255.0 255.255.255.0 (/24) /24 Subnetting Basics Key Terms in Subnetting 1. Subnet Mask: Defines how the network is divided. 2. CIDR (Classless Inter-Domain Routing): Specifies the number of bits used for the network. o Example: /26 means 26 bits are reserved for the network portion, leaving 6 bits for the host portion. 3. Subnet Increment: The step size between subnet ranges, calculated as 256−new mask octet256 - \text{new mask octet}256−new mask octet. Subnetting Formulas Number of Subnets: 2n2^n2n, where nnn = bits borrowed from the host portion. Hosts per Subnet: 2h−22^h - 22h−2, where hhh = remaining host bits (−2-2−2 accounts for the network and broadcast addresses). Subnet Range: Calculated using the subnet increment. Subnetting in Class A Example 1: Subnetting 10.0.0.0/8 into /10 1. Default Mask: 255.0.0.0 (/8). 2. New Mask: 255.192.0.0 (/10). 3. Borrowed Bits: 10−8=210 - 8 = 210−8=2. 4. Number of Subnets: 22=42^2 = 422=4. 5. Hosts per Subnet: 222−2=4,194,3022^{22} - 2 = 4,194,302222−2=4,194,302. 6. Subnet Increment: 256−192=64256 - 192 = 64256−192=64 (applies to the second octet). Subnets: 10.0.0.0/10 (hosts: 10.0.0.1 - 10.63.255.254, broadcast: 10.63.255.255). 10.64.0.0/10 (hosts: 10.64.0.1 - 10.127.255.254, broadcast: 10.127.255.255). 10.128.0.0/10 (hosts: 10.128.0.1 - 10.191.255.254, broadcast: 10.191.255.255). 10.192.0.0/10 (hosts: 10.192.0.1 - 10.255.255.254, broadcast: 10.255.255.255). Example 2: Subnetting 10.0.0.0/8 into /12 1. New Mask: 255.240.0.0 (/12). 2. Borrowed Bits: 12−8=412 - 8 = 412−8=4. 3. Number of Subnets: 24=162^4 = 1624=16. 4. Hosts per Subnet: 220−2=1,048,5742^{20} - 2 = 1,048,574220−2=1,048,574. 5. Subnet Increment: 256−240=16256 - 240 = 16256−240=16 (applies to the second octet). Subnets: 10.0.0.0/12 (hosts: 10.0.0.1 - 10.15.255.254). 10.16.0.0/12 (hosts: 10.16.0.1 - 10.31.255.254), and so on. Subnetting in Class B Example 1: Subnetting 172.16.0.0/16 into /18 1. Default Mask: 255.255.0.0 (/16). 2. New Mask: 255.255.192.0 (/18). 3. Borrowed Bits: 18−16=218 - 16 = 218−16=2. 4. Number of Subnets: 22=42^2 = 422=4. 5. Hosts per Subnet: 214−2=16,3822^{14} - 2 = 16,382214−2=16,382. 6. Subnet Increment: 256−192=64256 - 192 = 64256−192=64 (applies to the third octet). Subnets: 172.16.0.0/18 (hosts: 172.16.0.1 - 172.16.63.254). 172.16.64.0/18 (hosts: 172.16.64.1 - 172.16.127.254). 172.16.128.0/18 (hosts: 172.16.128.1 - 172.16.191.254). 172.16.192.0/18 (hosts: 172.16.192.1 - 172.16.255.254). Example 2: Subnetting 172.16.0.0/16 into /20 1. New Mask: 255.255.240.0 (/20). 2. Borrowed Bits: 20−16=420 - 16 = 420−16=4. 3. Number of Subnets: 24=162^4 = 1624=16. 4. Hosts per Subnet: 212−2=4,0942^{12} - 2 = 4,094212−2=4,094. 5. Subnet Increment: 256−240=16256 - 240 = 16256−240=16 (applies to the third octet). Subnets: 172.16.0.0/20 (hosts: 172.16.0.1 - 172.16.15.254). 172.16.16.0/20 (hosts: 172.16.16.1 - 172.16.31.254), and so on. Subnetting in Class C Example 1: Subnetting 192.168.1.0/24 into /26 1. Default Mask: 255.255.255.0 (/24). 2. New Mask: 255.255.255.192 (/26). 3. Borrowed Bits: 26−24=226 - 24 = 226−24=2. 4. Number of Subnets: 22=42^2 = 422=4. 5. Hosts per Subnet: 26−2=622^6 - 2 = 6226−2=62. 6. Subnet Increment: 256−192=64256 - 192 = 64256−192=64. Subnets: 192.168.1.0/26 (hosts: 192.168.1.1 - 192.168.1.62, broadcast: 192.168.1.63). 192.168.1.64/26 (hosts: 192.168.1.65 - 192.168.1.126, broadcast: 192.168.1.127). 192.168.1.128/26 (hosts: 192.168.1.129 - 192.168.1.190, broadcast: 192.168.1.191). 192.168.1.192/26 (hosts: 192.168.1.193 - 192.168.1.254, broadcast: 192.168.1.255). Example 2: Subnetting 192.168.1.0/24 into /28 1. New Mask: 255.255.255.240 (/28). 2. Borrowed Bits: 28−24=428 - 24 = 428−24=4. 3. Number of Subnets: 24=162^4 = 1624=16. 4. Hosts per Subnet: 24−2=142^4 - 2 = 1424−2=14. 5. Subnet Increment: 256−240=16256 - 240 = 16256−240=16. Subnets: 192.168.1.0/28 (hosts: 192.168.1.1 - 192.168.1.14, broadcast: 192.168.1.15). 192.168.1.16/28 (hosts: 192.168.1.17 - 192.168.1.30, broadcast: 192.168.1.31), and so on.

Use Quizgecko on...
Browser
Browser