NetCalculator - CodeProject
NetCalculator - CodeProject
NetCalculator - CodeProject
NetCalculator
Micu Radu
Introduction
1 of 5
A year ago, I started the CISCO CCNA course in my country, and the first module was about NetWorking Basics. The first lessons
were about Networking, etc. until NetworkMath came with all these steps of calculating subnets, max number of hosts and so on. It
is not hard after you get the hang of it, it is quite easy, but it takes lots of time to do the calculations so I have made a "calculator".
The Steps
This is the main idea to do the calculations. (You really need to know all steps in order to be able to do something later.)
Network Math
So let's skip steps 1-9 because you all need to know what they are about and it is not appropriate to discuss them here.
Now let's take a closer look at step 10 - IP addresses and network masks.
When IP addresses are assigned to computers, some of the bits on the left side of the 32-bit IP number represent a network. The
number of bits designated depends on the address class. The bits left over in the 32-bit IP address identify a particular computer on
the network. A computer is referred to as a host. The IP address of a computer consists of a network and a host part.
To inform a computer how the 32-bit IP address has been split, a second 32-bit number called a subnetwork mask is used. This mask
is a guide that determines how the IP address is interpreted. It indicates how many of the bits are used to identify the network of the
computer. The subnetwork mask sequentially fills in the 1s from the left side of the mask. A subnet mask will always be all 1s until
the network address is identified and then it will be all 0s to the end of the mask. The bits in the subnet mask that are 0 identify the
computer or host.
2 of 5
Some examples of subnet masks are as follows:
00001010.00100010.00010111.10000110
11111111.00000000.00000000.00000000
00001010.00000000.00000000.00000000
The dotted decimal conversion is 10.0.0.0 which is the network portion of the IP address when the 255.0.0.0 mask is used.
This is the main idea very briefly, for a more complex view we learned about.
Now I will not explain the whole process because it is very long and... boring and... Now if you want this explained in detail with
examples and pictures, you can let me know and I will update the article.
The Project
The project is created in .NET 2003 but can easily be ported in 2005. The screenshot is given above, so it is not a big thing.
I first made this project in Java. After searching the Internet for something familiar, I have came up with nothing, until a friend of
3 of 5
mine gave me a link to a JNetTool made by Arthur Ventruba. I downloaded the app and added more features, some bugs were fixed
and lots more.
So this .NET app is a port of that tool.
The most important class in the project is IPTool.cs. In there, we have all the "tools" that we need to do the calculations.
To Do List
1. Add, WhoIS, DNS, PING, TRACEROUTE, PortScan tabs
2. Fix bugs
3. Copy to clipboard
4. Whatever comes up...
Conclusion
English is not my native language, so please excuse me for all the mistakes that I have made...
This is my first article here, so it is not perfect; you are free to make suggestions, remarks, etc.
If you need some information or have any questions, please email me...
I hope to write more and better articles here (I have made lots of useless:) tools using .NET that I want to share).
History
21st July, 2005: Initial post
License
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
Now I am a Full stack web developer at Ipsos Mori, dealing with everything web related.
I was a 22 years old student at Computer Science and Mathematics in Romania, Brasov. My first touch with a computer was in
1985 when my father bought a HC80 computer from some guy. Since then computers and programming is my true passion and
4 of 5
desire
Comments
and
Discussions
24
messages
have
been
posted
for
this
article
Visit
https://www.codeproject.com
/Articles
/11063
/NetCalculator
to
post
and
view
comments
on
this
article,
or
click
here
to
get
a
print
view
with
messages.
5 of 5