# Enhancing Data Security Through VLSM Subnetting and TCP/IP Model in an ENT
## 3 Methodology
### Subnetting  
Subnetting requires the number of hosts per location in Figure 3 represented in Table 1. VLSM was employed to efficiently allocate IP addresses to create three subnets, each designated for a location based on the number of devices it would host. A subnetting table was developed to document the allocation of IP address ranges and subnet masks for each location, ensuring clear IP management of the ENT. \begin{table}
\begin{tabular}{c c} \hline \hline
**Subnet** & **Number of Hosts** \\ \hline Location C (Subnet A) & 120 \\ \hline Location B (Subnet C) & 60 \\ \hline Location A (Subnet B) & 30 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Allocation of Hosts per Location. 1. Identify the host requirements: The number of hosts required by the subnets in the ENT should be clearly outlined. The Subnets for Local Area Networks (LANs) are arranged from the largest number of hosts with inclusion of the point-to-point Wide Area Network (WAN) links. 1. Router0 (Subnet A--LAN0)--120 hosts. 2. Router2 (Subnet C--LAN1)--60 hosts. 3. Router2 (Subnet B--LAN1)--30 hosts. 4. Router1--connects Router0 and Router2--2 hosts. 5. WAN 1 (Router0 to Router1--LINKR10)--2 hosts. 6. WAN 2 (Router1 to Router2--LINKR12)--2 hosts. 7. WAN 3 (Router0 to Router2--LINKR0R2)--2 hosts. The total number of required hosts for the ENT is 218. The VLSM subnetting on the Subnet A was first conducted. 2. Determine the class of IP subnet: The class of IP subnet was determined with respect to the required number of hosts, which should be based on the required number of hosts. In this paper, we used a single Class C IP address of 192.168.5.0 (see Table 2) with a CIDR of /24 and 256 IP addresses. Class A has 16,777,216 and Class B has 65,536 IP addresses. Figure 4: Topology of the network created with Cisco Packet Tracer. 3. Identify the host bits for each subnet: Our ENT design had 120 hosts connected to Switch0 and linked to Router0 as Subnet A with 7-host bits and a CIDR of /25 (see Table 3). Use the formula \(2^{n}-2\), where \(n=7\). Therefore, \(2^{7}\) (host bits) leading to 128 hosts and subtract 2 relating to the broadcast and network addresses leading to 126 usable host addresses. In the same light, Subnet C was allocated 60 hosts connected to Wireless Router0 and linked to Router2 with 6 hosts bits and a CIDR of/26, leading to 62 usable host addresses. Similarly, Subnet B had been assigned 30 hosts connected to Switch1, then linked to Router2 with 5-host bits with a CIDR of/27. The subtracted two hosts were used for network and broadcast addresses. 4. Calculate the subnet mask: The next step was to identify the network bits and establish the Subnet Mask (SM) of the different Subnets. SM was achieved by subtracting the number of host bits from 128, 64, and 32, respectively, for Subnets A, C, and B. The CIDR for Subnets A, C, and B will be /25, /26, and /27 with SM of 255.255.255.128, 255.255.192, and 255.255.255.224, respectively (see Table 4). 5. Increment the value: Utilise the formula of 2'host bits to determine in which block (CIDR) number will be increased. With Subnets A, C, and B, the increment will be based on \(2^{7}\), \(2^{6}\), and \(2^{5}\) host bits resulting to 128, 64, and 32. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Specification** & **Subnet Mask** & **No. Bits Borrowed** & **No. Useable Hosts** & **First Host IP** & **Last Host IP** \\ \hline Subnet A & 255.255.258.128 & 1 & 126 & 192.168.5.1 & 192.168.5.126 \\ \hline Subnet C & 255.255.255.192 & 2 & 62 & 192.168.5.129 & 192.168.5.190 \\ \hline Subnet B & 255.255.255.224 & 3 & 30 & 192.168.5.193 & 192.168.5.222 \\ \hline WAN 1 & 255.255.255.252 & 6 & 2 & 192.168.5.225 & 192.168.5.226 \\ \hline WAN 2 & 255.255.255.252 & 6 & 2 & 192.168.5.229 & 192.168.5.230 \\ \hline WAN 3 & 255.255.255.252 & 6 & 2 & 192.168.5.233 & 192.168.5.234 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Subnetting in conformity with specification.