Table of contents
Introduction
We all know that ChatGPT can answer almost every question. Occasionally we might see some inaccuracies , but still we can get the majority of the work done with the help of ChatGPT. In this article we are going to use ChatGPT as a Subnet calculator for Ipv4 address
Practical example on how to use ChatGPT as Subnet calculator
Simple Task
Let’s give a simple task to ChatGPT to build subnets , this can be done by almost every subnet calculator app available on the internet.
#Request to ChatGPT
Can you create 8 subnets with 32 ips each from this network 10.0.0.0/24 ?
#Response from ChatGPT
Sure! To create 8 subnets with 32 IP addresses each from the network 10.0.0.0/24, you can use a subnet mask of /27 (255.255.255.224). This will give you 32 IP addresses per subnet, with 30 usable addresses (one for the network address and one for the broadcast address). Here's how you can divide the network into 8 subnets:
Subnet 1:
Network address: 10.0.0.0/27
Usable IP range: 10.0.0.1 - 10.0.0.30
Broadcast address: 10.0.0.31
Subnet 2:
Network address: 10.0.0.32/27
Usable IP range: 10.0.0.33 - 10.0.0.62
Broadcast address: 10.0.0.63
Subnet 3:
Network address: 10.0.0.64/27
Usable IP range: 10.0.0.65 - 10.0.0.94
Broadcast address: 10.0.0.95
Subnet 4:
Network address: 10.0.0.96/27
Usable IP range: 10.0.0.97 - 10.0.0.126
Broadcast address: 10.0.0.127
Subnet 5:
Network address: 10.0.0.128/27
Usable IP range: 10.0.0.129 - 10.0.0.158
Broadcast address: 10.0.0.159
Subnet 6:
Network address: 10.0.0.160/27
Usable IP range: 10.0.0.161 - 10.0.0.190
Broadcast address: 10.0.0.191
Subnet 7:
Network address: 10.0.0.192/27
Usable IP range: 10.0.0.193 - 10.0.0.222
Broadcast address: 10.0.0.223
Subnet 8:
Network address: 10.0.0.224/27
Usable IP range: 10.0.0.225 - 10.0.0.254
Broadcast address: 10.0.0.255
Each subnet has a subnet mask of /27, which means the first 27 bits of the IP address are fixed, and the last 5 bits can be used for host addresses within each subnet.
Complex Task
Now let’s give ChatGPT some complex tasks , this cannot be done by other subnet calculators out on the internet with just a single request. We are going to use the ChatGPT’s capability of remembering earlier discussion
#Request to ChatGPT
Can you make use of the same network and build variable subnets which has 2 subnets of 16 ips , 4 subnets of 8 ips , 3 subnets of 4 ips , 1 subnet of 2 ips and 3 subnet of 1 ip
#Response from ChatGPT
Certainly! Let's create variable subnets from the network 10.0.0.0/24 based on your requirements:
Subnet 1:
Network address: 10.0.0.0/28
Usable IP range: 10.0.0.1 - 10.0.0.14
Broadcast address: 10.0.0.15
Subnet 2:
Network address: 10.0.0.16/28
Usable IP range: 10.0.0.17 - 10.0.0.30
Broadcast address: 10.0.0.31
Subnet 3:
Network address: 10.0.0.32/27
Usable IP range: 10.0.0.33 - 10.0.0.62
Broadcast address: 10.0.0.63
Subnet 4:
Network address: 10.0.0.64/27
Usable IP range: 10.0.0.65 - 10.0.0.94
Broadcast address: 10.0.0.95
Subnet 5:
Network address: 10.0.0.96/27
Usable IP range: 10.0.0.97 - 10.0.0.126
Broadcast address: 10.0.0.127
Subnet 6:
Network address: 10.0.0.128/29
Usable IP range: 10.0.0.129 - 10.0.0.134
Broadcast address: 10.0.0.135
Subnet 7:
Network address: 10.0.0.136/29
Usable IP range: 10.0.0.137 - 10.0.0.142
Broadcast address: 10.0.0.143
Subnet 8:
Network address: 10.0.0.144/29
Usable IP range: 10.0.0.145 - 10.0.0.150
Broadcast address: 10.0.0.151
Subnet 9:
Network address: 10.0.0.152/29
Usable IP range: 10.0.0.153 - 10.0.0.158
Broadcast address: 10.0.0.159
Subnet 10:
Network address: 10.0.0.160/30
Usable IP range: 10.0.0.161 - 10.0.0.162
Broadcast address: 10.0.0.163
Subnet 11:
Network address: 10.0.0.164/30
Usable IP range: 10.0.0.165 - 10.0.0.166
Broadcast address: 10.0.0.167
Subnet 12:
Network address: 10.0.0.168/30
Usable IP range: 10.0.0.169 - 10.0.0.170
Broadcast address: 10.0.0.171
Subnet 13:
Network address: 10.0.0.172/32
Usable IP range: 10.0.0.172 (only one usable IP)
Broadcast address: None
Subnet 14:
Network address: 10.0.0.173/32
Usable IP range: 10.0.0.173 (only one usable IP)
Broadcast address: None
Subnet 15:
Network address: 10.0.0.174/32
Usable IP range: 10.0.0.174 (only one usable IP)
Broadcast address: None
Please note that for subnets with 1 IP, a /32 subnet mask is used, which means there are no usable IP addresses within those subnets, except for the network address itself.
We can see that the ChatGPT missed the request on creating a 2 Ip Subnet , so we are requesting it again to add it
#Request to ChatGPT
You missed the request for creating 1 subnet of 2 ips
#Response from ChatGPT
Apologies for the oversight. Here's the additional subnet with 2 IP addresses:
Subnet 14:
Network address: 10.0.0.172/31
Usable IP range: 10.0.0.172 - 10.0.0.173
Broadcast address: None
In this subnet, you have two usable IP addresses: 10.0.0.172 and 10.0.0.173.
We can see that it created a Subnet with 2 Ips , but it was overlapping with the other 1 IP subnets , however the subnets provided by the ChatGPT seems correct
Conclusion
In this article we explored how to use ChatGPT as a subnet calculator for ipv4 addresses. Sometimes when our requests are complex ChatGPT might provide some inaccurate responses , however if we are aware of how the Subnetting concepts work we can easily manage and make the corrections necessary