Subnetting Reference Guide: 3 20 2024 - ConnorEast/Tech-Journal GitHub Wiki
Subnetting Reference Guide.
IP ADDR-Classes
Class A ---> Range: 0.0.0.0 - 127.255.255.255 ---> Default Subnet: 255.0.0.0
Class B ---> Range: 128.0.0.0 - 191.255.255.255 ---> Default Subnet: 255.255.0.0
Class C ---> Range: 192.0.0.0 - 223.255.255.255 ---> Default Subnet: 255.255.255.0
Class D ---> Range: 224.0.0.0 - 239.255.255.255 ---> Default Subnet: NA
Class E ---> Range: 240.0.0.0 - 255.255.255.255---> Default Subnet: NA
~ Bit Subnet Conversion ~
Class A Conversion:
Class B Conversion:
Class B has the following binary values - 128, 64, 32, 16, 8, 4, 2, 1, 128, 64, 32, 16, 8, 4, 2, 1.
Class B has the following Subnet number - 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536.
Class B has the following Hosts per Sub - 65636, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2.
Class C conversion
Class C has the following binary values - 128, 64, 32, 16, 8, 4, 2, 1.
Class C has the following Subnet number - 2, 4, 8, 16, 32, 64, 128, 256.
Class C has the following Hosts per Sub - 256, 128 64, 32, 16, 8, 4, 2.
How Does network segmentation work?
Network segmentation through subnetting is essentially the act of taking a network and setting limits based upon the devices IP. This allows for packets to remain localized between each subsection of the network and decreases network congestion while increasing security.
Switches & Routers in subnetting:
switches allow for network devices to communicate while mitigating network congestion. Switches work by memorizing either the MAC or IP address of the system and then checking if packets were being sent to a IP/MAC address on their network. A router connects all of the subnets within the network in order to allow for communication between the different subnets, as well as external communications.
CIDR (Classless Inter-Domain Routing) Notation
CIDR notation is essentially the addition of a "/X" after an IP address. The X is calculated by the number of ones in the subnet mask. If the subnet mask was 255.255.255.255 the /X would be 32. If the subnet mask was 255.224.0.0 The X would be 11. Below is a calculation of an IP address into Binary.
198.10.5.0 == 11000000|00001010|000000101|00000000
Let's say we wanted this address to be divided into 6 subnets. Given it is a C Address that means its base subnet would be 255.255.255.0 (/24). Given we want 6 subnets that must mean we will be taking 3 bits (3 bits will give us 8 subnets which covers the 6 subnets needed). the first bit will have a value of 128, second 64, and third 32. This means the edited subnet would be 255.255.255.224. Below is said subnet in binary.
255.255.255.224 == 11111111.11111111.11111111.11100000
If we count the number of Bits set to 1 then the answer for our cider notation subnet would be /27. This is a lot simpler to read and calculate from instead of the basal subnet and is easier to look at and understand for non-tech Savey individuals.
If you were to make a subnet for a large company, you would want a class A network with a CIDR mask set between \8 and \22. If you were working with a medium sized corporation, you would want a class B network with a CIDR mask between 16 and 24). Small networks can use a type C network with a CIDR mask between 25/30
Creating a VSwitch
Custom Subnet Masks document problems
Problem 4:
Requirements: Number of needed subnets (6), Number of needed Usable Hosts (30), Address 195.85.8.0
Address Class: C
Default Subnet: 255.255.255.0
Custom Subnet: 255.255.255.224
Total Subnet: 8
Total Hosts: 64
Usable Hosts: 62
Bits Borrowed:3
Problem 4 logic: the address starts after 191 therefore it must be class C. The default subnet for Class C addresses is 255.255.255.0 Therefore we only have 8 bits to play with. The bits available are 128, 64, 32, 16, 8, 4, 2, and 1. one bit adds (2^#Bits) subnets. Therefore 2^3 = 8 subnets the host as a result would be 64
Problem 5:
Requirements: Number of needed subnets (6), Number of needed Usable Hosts (30), Address (210.100.56.0)
Address Class: C
Default Subnet: 255.255.255.0
Custom Subnet: 255.255.255.224
Total Subnet: 8
Total Hosts: 64
Usable Hosts:62
Bits Borrowed: 3
Problem 5 logic: the address starts after 191 therefore it must be class C. The default subnet for Class C addresses is 255.255.255.0 Therefore we only have 8 bits to play with. The bits available are 128, 64, 32, 16, 8, 4, 2, and 1. one bit adds (2^#Bits) subnets. Therefore 2^3 = 8 subnets the host as a result would be 64.
Problem 6:
Requirements: Number of needed subnets (126), Number of needed Usable Hosts (131070), Address (118.0.0.0)
Address Class: A
Default Subnet: 255.0.0.0
Custom Subnet: 255.254.0.0
Total Subnet: 128
Total Hosts: 262144
Usable Hosts:262142
Bits Borrowed: 7
Problem 6 logic: The Address starts below 121 therefore it must be class A. The default subnet for Class A is 255.0.0.0 therefore we have a total of 24 bits to play with. This means we can have 4,194,304 hosts or subnets. if we choose this number the other would only have 8. However at 7 bits borrowed we have a total of 128 subnet and 262142 usable hosts which is enough to satisfy the requirements of this problem.
Problem 7
Requirements: Number of needed subnets (2000), Number of usable hosts (15), Address (178.100.0.0)
Address Class: B
Default Subnet: 255.255.0.0
Custom Subnet: 255.255.255.224
Total subnets 2048
Total Hosts: 64
Usable Hosts: 62
Problem 7 Logic:
Calculating the Host ID range
The simplest way to calculate the HOST ID range is if you can find the following information.
- Network ID
- Subnet Mask
- of usable hosts
- Broadcast ID
** Problem 1**:
Requirements: Address (195.223.50.0), Subnets (2)
Address Class: Type A;
Default Subnet: 255.255.255.0;
Custom Subnet: 255.255.255.128 (CIDR /25);
Total Subnets: 2;
Total Hosts per-sub: 128;
Usable Hosts: 126;
Bits Borrowed: 1;
What is the 2nd Subnets Range:
- 195.223.50.128 ---> 195.223.50.254
What is the Subnet number for the 2nd subnet: - 195.223.50.128
What is the subnet broadcast address for the 1st subnet: - 195.223.50.127
What are the assignable addresses for the 1st network: - 195.223.50.1 ---> 195.223.50.126
Problem 2:
Requirements: Address (190.35.0.0), Subnets 750
Class: Type B
Default Subnet: 255.255.0.0
Custom Subnet: 255.255.255.192 (CIDR /26)
Total subnets: 1024
Hosts: 128
Total hosts: 126
Bits borrowed 10
What is the 15th subnet range:
- 190.35.7.1 ---> 190.35.7.126
What is the subnet number for the 13th subnet:
- 190.35.6.1
What is the subnet broadcast address for the 10th subnet:
- 190.35.5.255
What are the assignable addresses for the 6th subnet:
- 190.35.2.128 ---> 190,35.2.254
Total assignable Ranges:
190.35.0.0 ---> 190.35.255.255
Problem 3: Address (126.0.0.0), Usable hosts 6;
Class: A;
Default Subnet mask: 255.0.0.0;
Custom subnet mask:255.255.255.248 (CIDR /29);
Total number of subnets 2097152;
Total number of host addresses:8;
Number of usable hosts: 6;
Bits borrowed: 21;
What is the second subnet range:
- 126.0.0.8 ---> 126.0.0.16
What is the fifth subnet range:
- 126.0.0.32 ---> 127.0.0.40
What is the subnet broadcast address for the seventh subnet:
- 126.0.0.56
What are the assignable addresses for the tenth subnet:
- 126.0.0.73 ---> 126.0.0.79
Problem 4: Address (192.70.10.0), Subnets (10)
Address Class: C;
Default subnet mask: 255.255.255.0;
Custom subnet mask: 255.255.255.240;
Total Number of subnets: 16;
Total number of hosts: 16;
Usable hosts: 14;
Bits Borrowed: 4;
What is the 9th subnet range:
192.70.10.128 ---> 292.70.10.144
What is the subnet number for the 4th subnet:
192.70.10.48
What is the subnet broadcast address for the 12th subnet:
192.70.10.192
What are the assignable addresses for the 10th subnet:
192.70.10.145 ---> 192.70.10.159
Problem 5: Address (10.0.0.0), CIDR(/16)
Address Class: A;
Default subnet mask: 255.0.0.0;
Custom subnet mask: 255.255.0.0;
Total number of subnets: 128;
Total number of hosts: 262,144;
Total number of usable hosts: 262,142;
Number of bits borrowed: 8;
What is the 11th subnet range:
- 10.20.0.0 ---> 10.22.0.0
What is the subnet number for the 6th subnet:
- 10.10.0.0
What is the subnet broadcast address for the 2nd subnet:
- 10.4.255.255
What are the assignable addresses for the 9th subnet:
- 10.16.0.1 ---> 10.17.255.254
Problem 8 Address (172.50.0.0) Subnets (5)
Address Class: B;
Default Subnet mask: 255.255.0.0;
Custom subnet mask: 255.255.224.0;
Total number of subnets: 8;
Total number of hosts: 16,384;
Total usable hosts: 16,382;
Bits Borrowed: 3
What is the 4th subnet range:
- 172.50.84.0 ---> 172,50.112.0
What is the subnet number for the 5th subnet:
- 170.50.112.0
What is the subnet broadcast address for the 6th subnet:
- 170.50.167.254
What are the assignable addresses for the 3rd subnet:
- 172.50.56.1 ---> 172.50.83.254
Practical subnetting Problems:
Address class: B;
Default subnet: 255.255.0.0;
Custom subnet: 255.255.255.124 (CIDR: 27);
Maximum subnets: 6;
Maximum hosts: 231;
Bits borrowed: 9;
Ip address range for Sales: 172.16.1.0 ---> 172.16.2.1;
Ip address range for Marketing: 172.16.2.2 ---> 172.16.3.3;
Ip address range for Administrative: 172.16.3.4 ---> 172.16.4.5;
Ip address range for Router A to Router B serial connection: 172.16.4.5 ---> 172.16.5.6;