Open Source Software and Linux

Dec 25 2008   4:55AM GMT

Quick Subnetting and IP calculations Part 2

John Little Profile: Xjlittle

In my last post I discussed how to make quick subnetting and IP calculations. This post is will help us determine how many hosts on a network.

Suppose that you know your IP address and an abbreviated notation subnet mask. What you need to find out is the IP of your default gateway.

The address that you are given is 192.168.200.120/26. The last assignable IP is your gateway. Before we get started a quick note about abbreviated subnet masks. You can determine the standard subnet mask by dividing the abbreviated notation by 8 and using the remainder to add together that number of bits starting from the leftmost bit in a subnet mask. In our case 8 will go into 26 three times with two left over. Adding together the two leftmost bits in a subnet mask, 128+64 gives us 192. So our standard subnet mask is 255.255.255.192.

To start solving our gateway problem we first the 192 into bit values which = 11000000.

The smallest bit is 64 so our subnets are incremented by 64. Recall from the previous post how we laid this out:

Network Address Range
0 192.168.200.1 through 63
64 192.168.200.65 through 127
128 192.168.200.129 through 191
192 192.168.200.193 through 255

As we can see from above our machine falls into the second address range with an IP of 192.168.200.120. The first addressable IP is 192.168.200.65 and the broadcast address is 192.168.200.127. Remember that the broadcast address for a network is the last IP shown for that range. This makes the default gateway one less than the broadcast address giving us 192.168.200.126 for the gateway. There are 62 host IP address available on your network segment after taking out the network and broadcast IP.

So there it is. You have now found your default gateway and know how many hosts are on your network segment and what their IP addresses are.

-j

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: