Automation and Detailed Analysis of Subnetting Problems Using Mathematical Modeling
Automation and Detailed Analysis of Subnetting Problems Using Mathematical Modeling
1
Deepank Dixit, 2Gautam Kumar, 3Rajeev Tiwari, 4Abhineet Anand
1
(Student), 1,3CIT, UPES, Dehradun
2,4
SCSE, Galgotias University, Greater Noida
1
[email protected], [email protected]
3
[email protected], [email protected]
Abstract: The existing subnetting techniques require routers within it. The design of TCP/IP IPv4 addressing
us to list all network ranges one by one by setting one scheme doesn’t allow the authorities to assign these
of the bits to on or off. It is always a cumbersome task many public IP address for one organization because
to represent the network ranges in binary and later that would go far beyond our exploitation boundaries of
converting it to decimal. The objective is to develop an IPv4 addresses.1
application to automate the process of by displaying all Subnetting brings with itself a myriad of advantages.
the information of the network (pertaining to Security, Limitations, Speed network transfers and
subnetting) that one needs to know. The applications of improved performance in isolation are only a few of
subnetting are ubiquitous in the realm of networking. them2. Above mentioned almighty routers can require
The mentioned approach presents much easier way of that a WAN link connecting two networks must itself
designing networks by outlining subnets through the form a separate subnet. Troubleshooting, diagnosing,
network. and fixing problems in a TCP/IP internetwork typically
This approach, however, insures to bring solutions require thorough familiarity with subnetting.
to more than 95% of the subnetting problems. There are Subnetting can improve network performance by
a number of ways in which this particular approach can splitting up collision and broadcast domains3. It reflects
be molded but the beauty is that all we have to care organizational structure and help support security
about is one unique outcome because that is what policies. Subnets can be treated in a manner that they
captures the essence of the network. Therefore, solution define administrative units and hence support the
to any subnetting problem can be crosschecked through structuring and delegation of administrative tasks.
online resources. Network traffic control, congestion The process of subnetting involves a series of
avoidance, preservation of address space and enhanced moderately complex mathematical steps, executing
network security are amongst the most remarkable which with precision, demands the supervision of a
advantages of segregating the network. network engineer. A major stumbling block to
successful subnetting is often a lack of understanding
Keywords: Automation, Modeling, Network, Address of the underlying binary math. In fact, the principles of
Space, Segregation subnetting are difficult to grasp without artistic mastery
of binary arithmetic, logic, and binary/decimal
1. Introduction conversions. However skilled an engineer might be,
there is always a slim possibility of calculation mistake.
Subnetting is one of the many vital parts of networking. This paper proposes the idea of an automated system
It is logical subdivision of an IP network. Subnetting is which calculates the subnetting information of a
the practice of dividing a network into two or more network. Such a system would not be prone to
networks. Dividing a large network into subnets mathematical errors, thereby providing the reliable
representing administration responsibility for each information that shapes our network.
subnet can make administration of a large network
easier. Subnetting has a rather vigorous impact in the
realm of networking. Loosely writing, one simple way
to look at the Internet could be that the Internet is a
collection of routers, routers upon routers, a whole web
of routers. The thing about router is that every interface
of a router represents a unique network and an
organization may contain from a few up to hundreds of
807
International Journal of Pure and Applied Mathematics Special Issue
808
International Journal of Pure and Applied Mathematics Special Issue
809
International Journal of Pure and Applied Mathematics Special Issue
Algorithm 2(Calculates the new subnet mask): segregated into several smaller ones. The important
(i)For Class C IP address: information to be gained is at what position in the
db = 8 original one range of the total host does the barrier need
Change var2 number of bits to 1 from most to be placed, so as to discover ranges of each individual
significant bit side in the increment octet(4th sub-network. This sub-module computes this sensitive
octet).These 1s are contiguous and followed by var1 problem.
number of 0s. Every sub-network has its own network ID and a
The new subnet mask will be calculated using the broadcast ID14. The first address among the total
formula- 255.255.255. number of hosts per sub-network is used to denote the
db= 8 shows that the IP address is of class C and first network identity and the last one for the broadcast ID.
three octets (i.e.255.255.255) in the default subnet However, implementing logic of finding ranges through
mask of class C must be preserved. Bits of octet four coding is comparatively arduous; calculation for ranges
are to be altered. Therefore, change is made in the of sub-network is rather trivial. The complexity
fourth octet of the default subnet mask. increases as we transit from class C to class A
(ii)For Class B IP address: calculations. Increment Octet is another parameter
db = 16 which is crucial in penning down these ranges. Since
There are two cases: there are four octets, it is important to know from
Case 1- 1 <= var2 <= 8 which octets begins the ranging mechanism.
Change var2 number of bits to 1 from most significant Mathematical formulation to find increment varies
bit side in 3rd octet. from class to class. Even there are several cases within
The new subnet mask will be calculated using the a class depending upon the number of network/host bits
formula- that are needed to be altered. The value of increment
255.255. .0 octet follows directly from the values of var1 and var2
Case 2- 9 <= var2 <= 15 with little bit of mental calculation. Increment is
Change var2 number of bits to 1 from most significant denoted as inc and increment octet as incOct.
bit side in 4th octet. Algorithm 3(calculates range of sub-networks):
The new subnet mask will be calculated using the (i) Class C
formula- inc = 2var1
255.255.255. incOct = 4
(ii) Class B
(iii)For Class A IP address: Case 1- 1 ≤ var2 ≤ 8
db = 24 inc = 28-var2 incOct = 3
There are three cases: Case 2- 9 ≤ var2 ≤ 15
Case 1- 1 <= var2 <= 8 inc = 216-var2
Change var2 number of bits to 1 from most significant incOct = 4
bit side in 2nd octet. (iii) Class A
The new subnet mask will be calculated using the Case 1-1 ≤ var2 ≤ 8
formula- inc = 28-var2 incOct = 2
255. .0.0 Case 2-9 ≤ var2 ≤ 16
Case 2- 9 <= var2 <= 16 inc = 216-var2
Change var2 number of bits to 1 from most significant incOct = 3
bit side in 3rd octet. Case 3-17 ≤ var2 ≤ 23
The new subnet mask will be calculated using the inc = 224-var2
formula- incOct = 4
255.255. .0 Module 2
Case 3- 17 <= var2 <= 23 Reverse Engineering Subnetting
Change var2 number of bits to 1 from most significant Although, the subnetting style that seems to be mostly
bit side in 4th octet. dealt with is the one above analyzed, it is not the
The new subnet mask will be calculated using the entirety of the situation. The most common style of
formula- subnetting is performed in reverse engineering
255.255.255. manner15. It calls for working out our problems
III. Calculation of increment to find ranges of Sub- backwards.
networks: This type of subnetting mostly proves useful to
Increment is the important parameter to calculate troubleshoot network configuration errors. In most
ranges of the sub-networks. It allows us to determine cases we want to know what network a host belongs to
the segmentation structure of sub-networks. After all, or which network is this host a part of16. Determining
initially there was one network which is now whether a particular host is on the same network as the
other or not, becomes easy with reverse engineering
810
International Journal of Pure and Applied Mathematics Special Issue
Qn € Iand Rn € I
Q0 = Q/2 and R0 = Q - 2Q0
If Q0 = 0
R1=R2=R3=R4=R5=R6=R7 = 0
If Q0 ≠ 0
Q1 = Q0 / 2 and R1 = Q0 - 2Q1
If Q1 = 0
R2=R3=R4=R5=R6=R7 = 0
If Q1 ≠ 0
Q2 = Q1 / 2 and R2 = Q1 - 2Q2
If Q2 = 0
R3=R4=R5=R6=R7 = 0
If Q2 ≠ 0
Q3 = Q2 / 2 and R3 = Q2 - 2Q3
If Q3 = 0
R4=R5=R6=R7 = 0 3. Simulation and Results
811
International Journal of Pure and Applied Mathematics Special Issue
of how the flow of execution is driven in program can prove greatly useful for education purposes.
Students can verify their sub-netting results to make
(a)Module 1 sure whether or not they got the correct answer.
Module 1 solves IP subnetting problem by general
approach. User is prompt to enter an IP address. References
Validity of this IP address is checked. Then, the user is
prompt to choose the type of subnetting problem that [1] Todd Lammle Subnetting class C network
needs to be solved. Once all the inputs are taken, with address www.techrepublic.com/article/subnetting-
the help of algorithms mentioned in Module one: aclass-c-network-address/, Date accessed:
Subnetting procedure, the layout of the sub-netted 24/05/2001.
network is made available to user on screen. Run time
interface for Module 1 is attached in . [2] Jeremy Cioara-Exam Prep CCNA 2nd Edition,
ISBN-13: 978-0-7897-3713-7
https://www.amazon.com/CCNA-Exam-Prep-640-802-
2nd/.../07897371
812
International Journal of Pure and Applied Mathematics Special Issue
813
814