How to find IP addresses and subnet number in a few seconds
Networking February 20th, 2007When you know IP address and mask number, you sometimes want to know subnet number, subnet broadcast address and range of valid IP addresses. In common ways, you can find these by convert the IP address with mask number to binary and perform boolean AND but that takes too much time. So let see how to find these answers in a short time.
Before I start, let see the general table which will used to describe IP address. In each column will be the IP address that separate by octet, dot-notation (x.x.x.x). In each row is the IP address.
Generic Subnet Table
| Octet | 1 | 2 | 3 | 4 |
|---|---|---|---|---|
| Address | ||||
| Subnet number | ||||
| First Address | ||||
| Broadcast Address | ||||
| Last Address |
Let’s start
I divide into 2 categories which depend on subnet mask:
- Do Maths with easy masks
For the masks that contain only 255s and 0s. There are three masks which are 255.0.0.0, 255.255.0.0 and 255.255.255.0.
I guess many people know this already, but l will explain a little bit to revise for someone.- Find the subnet number
- Copy first octet (mask 255.0.0.0), first two octets (mask 255.255.0.0) or first three octets (mask 255.255.255.0) from IP address
- Put 0s in the remaining octets
- Find the broadcast the address
- Copy first octet (mask 255.0.0.0), first two octets (mask 255.255.0.0) or first three octets (mask 255.255.255.0) from IP address. This is the same in ‘Find the subnet number’, step 1
- Put 255s in the remaining octets
- Find range of valid IP addresses
- To find the first valid IP address, copy the subnet number and add 1 to the fourth octet
- To find the last valid IP address, copy the broadcast address and subtract 1 to the fourth octet
- Example
- Mask 255.0.0.0
Octet 1 2 3 4 Address 10 110 140 1 Subnet number 10 0 0 0 First Address 10 0 0 1 Broadcast Address 10 255 255 255 Last Address 10 255 255 254 - Mask 255.255.0.0
Octet 1 2 3 4 Address 10 110 140 1 Subnet number 10 110 0 0 First Address 10 110 0 1 Broadcast Address 10 110 255 255 Last Address 10 110 255 254 - Mask 255.255.255.0
Octet 1 2 3 4 Address 10 110 140 1 Subnet number 10 110 140 0 First Address 10 110 140 1 Broadcast Address 10 110 140 255 Last Address 10 110 140 254
- Mask 255.0.0.0
- Find the subnet number
- Do Maths with difficult masks
In this case, most people find it’s difficult to calculate and some has to do by binary math which is time consuming. Let see the way to figure out in few seconds.- Find the subnet number
- I will define the column that contain the difficult number(not 255s and 0s) as the interesting column. For any octets fully to the left of the interesting column, copy value(s) from the original IP Address into all addresses(subnet number, first-last address and broadcast address).
Octet 1 2 3 4 Address 130 4 102 1 Mask 255 255 252 0 Subnet number 130 4 First Address 130 4 Broadcast Address 130 4 Last Address 130 4 - For any octets fully to the right of the interesting column, put 0s in the subnet number.
Octet 1 2 3 4 Address 130 4 102 1 Mask 255 255 252 0 Subnet number 130 4 0 First Address 130 4 Broadcast Address 130 4 Last Address 130 4 - Now the tricky part, find a ‘magic number’ which is 256 minus mask’s interesting octet. In this example, it is 256 – 252 = 4.
- Find the multiple of the magic number that is closest to, but not greater than the the interesting octet of original IP address. For this case, it is 100 (4*25) which also not greater than 102.
- Put the result from previous step in subnet number of the interesting column.
Octet 1 2 3 4 Address 130 4 102 1 Mask 255 255 252 0 Subnet number 130 4 100 0 First Address 130 4 Broadcast Address 130 4 Last Address 130 4
- I will define the column that contain the difficult number(not 255s and 0s) as the interesting column. For any octets fully to the left of the interesting column, copy value(s) from the original IP Address into all addresses(subnet number, first-last address and broadcast address).
- Find the broadcast address
- For any octets fully to the right of the interesting column, put 255s in the broadcast address. The left part should be filled already in Find subnet number, the upper.
- Again, use the magic number. By adding the magic number to the interesting octet of subnet number and subtract 1. In this example, the magic number is 256 – 252 = 4, 100 + 4 – 1 = 103.
- Put the result from previous step in broadcast number of the interesting column.
Octet 1 2 3 4 Address 130 4 102 1 Mask 255 255 252 0 Subnet number 130 4 100 0 First Address 130 4 Broadcast Address 130 4 103 255 Last Address 130 4
- Find range of valid IP addresses
The way used to find the first and last IP addresses are the same in easy mask.- To find the first valid IP address, copy the subnet number and add 1 to the fourth octet
- To find the last valid IP address, copy the broadcast address and subtract 1 to the fourth octet
Octet 1 2 3 4 Address 130 4 102 1 Mask 255 255 252 0 Subnet number 130 4 100 0 First Address 130 4 100 1 Broadcast Address 130 4 103 255 Last Address 130 4 103 254
- Find the subnet number
Reference: CCNA Self-Study, CCNA ICND, Chapter 4: IP Addressing and Subnetting
Related post
No related posts.




February 22nd, 2007 at 5:41 am
For the class A (255.0.0.0) example, shouldn’t the first usable IP be 10.0.0.1? Also, on the first paragraph (Do Maths with easy masks), shouldn’t the last mask be 255.255.255.0?
February 22nd, 2007 at 7:31 am
Yes, you’re right. It’s my fault.
I have fixed them already. Thanks.
March 7th, 2007 at 12:39 am
Oh nice! Very pretty page!
July 30th, 2007 at 2:46 pm
Your work is magnificent.It has been of great help to me.Try to develop simmilar type of page on other topics of networking too.
BEST OF LUCK.
November 5th, 2008 at 9:19 am
I have a new practical knowledge.
Thanks
December 24th, 2008 at 6:46 am
How do you do the samething for 192.168.200.23 /28
Thanks
December 24th, 2008 at 9:43 am
Hi, xzyan
Have you tried to find it by yourself? It’s quite easy and fast.
Mask Bits: 28 => 255.255.255.240
So we’re interested in the last column.
Magic number: 256-240 = 16
So the subnet number = 192.168.200.16
(Multiple of magic number: 16,32,64,..)
The broadcast address = 16 + 16 – 1 => 192.168.200.31
First address = 16 + 1 => 192.168.200.17
Last address = 31 – 1 => 192.168.200.30
January 6th, 2009 at 11:54 pm
Need your help. Tried this out and running into a problem. Can you help me figure out a valid broadcast address for 10.0.0.0/13 ? maybe if i see your work it will show the error in mine. thanks
January 7th, 2009 at 9:10 am
Hi, Matt
Let’s see if I can do it.
Mask Bits: 13 => 255.248.0.0
So the second column is what I’m interested.
Magic Number: 256-248 = 8
So the subnet number = 10.0.0.0
Because there is no multiplier of 8 which greater than 0, so the second column is 0.
The broadcast address = 0(the second column number) + 8(the magic number) – 1 = 7 => 10.7.255.255
First address = 10.0.0.1 (increment subnet number)
Last address = 10.7.255.254 (decrement the broadcast address)
January 8th, 2009 at 1:32 am
cool I was right! thanks a lot for your help, I think I finally understand this.
February 14th, 2009 at 12:59 am
How do this problem 172.16.2.0/25
February 14th, 2009 at 9:40 pm
Hi, Preet
Why don’t you try by yourself first? I think it’s not too difficult. There are few examples in comments.
March 28th, 2009 at 3:18 pm
Just wanna say thank you.
U make my life much easier!
May 19th, 2009 at 5:22 pm
sory i want to learn more about subnet number and host number
June 5th, 2009 at 4:11 am
Hi Preet if i am not wrong then
Mask Bits: 25 => 255.255.255.128
So the fourth column is what we are interested.
Magic Number: 256-128 = 128
So the subnet number = 172.16.2.128
Because the multiplier of 128,256 and so on
The broadcast address = 128(the fourth column number) + 128(the magic number) – 1 = 255 => 172.16.2.255
First address = 172.16.2.129 (increment subnet number)
Last address = 172.16.2.254 (decrement the broadcast address)
August 14th, 2009 at 10:29 pm
I am confused. What happens when the magic number is larger than the subnet number’s last octet? For example:
190.4.80.80/25 (255.255.255.128)
magic number here is 128 (greater than 80)
Subnet# is 190.4.80.0. How does the booklet get a broadcast address of 190.4.80.127????
August 15th, 2009 at 9:10 am
Hi, Luis
The magic number is 128 and the subnet number is 190.4.80.0. Therefore, the broadcast address is 190.4.80.127 where 127 is came from adding the magic number to the interesting octet of subnet number and subtract 1 (0 + 128 – 1 = 127).
August 19th, 2009 at 1:56 am
My question is why is the number 25 used when trying to find the mutiple?
August 19th, 2009 at 8:07 am
Hi, Kevin
Did you means the number 25 on Do Maths with difficult masks -> Find the subnet number -> step 4? If yes, the number is multiple of the magic number and must be closest to and not be greater than the the interesting octet of original IP address.
On the example, the magic number is 4 and the interesting octet is 102. If you try to find the number, (4*1=4, 4*2=8, 4*3=12, …., 4*25=100, 4*26=104, you will see that 25 is the number that is closest to and less than the interesting octet (26 is greater than the interesting octet).
December 18th, 2009 at 1:09 am
what is subnet number and the host number for the ip 108.77.51.70 and the subnet mask 255.255.128.0..
plz explain..?
thanks..
January 6th, 2010 at 11:11 am
Hi, Ram
I believe that I have shown many examples which you can apply to yours.
February 1st, 2010 at 12:15 am
umm.. how well u find the subnet and host per subnet of the ff:
192.162.54.33 if u dont mind…
i solved this one:
255.255.255.224
11100000
subnet: 2cube – 2 = 4
host/subnet: 2(raised to five) – 2 = 30host/subnet
please xplain?. i really need it for tom.. THANK YOUUUU :>
February 1st, 2010 at 12:50 am
sorry.. i asked the wrong question..
what i wanna find out is how you get the binary numbers?..
in order to find your subnet and host/subnet…
e.g.: 255.255.255.224
thanks
where did 11100000 came from??
February 3rd, 2010 at 11:24 am
Hi, Hannah
So the final question is that you want to know how to convert from 224 in decimal to 11100000 in binary?
You can find a binary number using short division by two with remainder. You keep do short division, write the remainder (0 or 1) at the right side of each division. Finally, the answer is read from the bottom to top on the remainder column.
See the example, 224
2)224 0
2)112 0
2)056 0
2)028 0
2)014 0
2)007 1
2)003 1
2)001 1
2)000 0
The answer is 011100000 (the remainder from bottom to top).
February 12th, 2010 at 10:06 am
hi all,
can somebody explain me if 10.0.0.0/13 then how we resolve the mask of this would be Mask Bits: 13 => 255.248.0.0
please explain me
February 16th, 2010 at 10:06 am
Hi, Yogesh Kapil
Here is how to convert Mask Bits (CIDR) 13 to subnet mask,
February 18th, 2010 at 9:33 am
How do you answer a question like:
How many subnets and hosts can be found with 10.0.0.0/20?
I understand from your teaching how to find the ranges but to get the number of subnets and hosts it seems i have to write it all out.
thank you
February 19th, 2010 at 2:59 am
I may have figured it out.
8 bits for the class A
12 subnet bits and 12 host bits
2^s, and 2^h-2.
4096 subnets and 4094 hosts
?? Does that look right?
thanks
Scott
February 23rd, 2010 at 10:11 am
Hi, Scott
Yes, that’s right.
March 2nd, 2010 at 11:24 pm
Very nice post, thank you so much for the simple method to determine IP ranges. I’m about to take Microsoft 70-291 and then the Cisco CCNA test and this helps out a ton!
March 9th, 2010 at 4:22 am
I tried your formula with 190.165.106.119/23 but was way off. Please work it out for me so I can see where I went wrong.
March 12th, 2010 at 9:15 am
Hi, Larry
Mask bits: 23 => 255.255.254.0
So we’re interested in the third column.
Magic number: 256-254 = 2
So the subnet number = 190.165.106.0
(Multiple of magic number: 2,4,6,…,104,106)
The broadcast address = 106 + 2 – 1 => 190.165.107.255
First address = 190.165.106.1
Last address = 190.165.107.254
March 15th, 2010 at 3:47 pm
how to get the subnet of 100.20.0.0/21
March 17th, 2010 at 4:46 pm
first of all we work out 21 bits
21 —> 224 in decimal
255.255.224.255
so we are interested in the third coloumn
the magic number : 256 – 224 = 32
so the subnet : 100.20.32.0
March 20th, 2010 at 6:46 pm
16.0.0.0/8. An organization is granted the block the administrator wants to create 500 fixed-length subnets.
a) Find the subnet mask.
b) Find the number of address in each subnet.
c) Find the first and last addresses in subnet 1.
d) Find the first and last addresses in subnet 500.
How to Find the first and last addresses in subnet 500.
?
Any Solution on it?please provide me..Thank in advance…
March 22nd, 2010 at 11:55 pm
Ahmed – in answering Kulas’s question about finding the subnet of 100.20.0.0/21, shouldn’t the mask be 255.255.248.0? I can get the broadcast of 100.20.7.255, last of 100.20.7.254, but I can’t get the 1st?
March 28th, 2010 at 6:28 pm
Hi Everyone:
I am stuck with this question here… I am new to this so having a lot of trouble in finding out the way around. My question is, given an ip address 17.212.89.111 and that each subnet has been designed to accommodate 700 hosts:
a. What is the subnet mask in dotted decimal and slash notation?
b. How many usable hosts are there per subnet?
c. What is the network and the broadcast address of the subnet the specified host belongs to?
March 28th, 2010 at 9:31 pm
Ravi,
Hope I got this right.
Question B: The power of 2 shows at position 10 you have the number 1024. (2^h-2=hosts) or (2^10-2=1022) The next lowest is 512 which is lower than your required 700.
Question A: So 10 bits for the host part. Look at this,
Class A gives you 8 bits for the network
Using 10 bits for the host leaves a remaining 14 bits for the subnets (subnets available= 2^s=subnets or 2^14=16384)
nnnnnnnn.ssssssss.sssssshh.hhhhhhhh
For the slash notation just count from the left to right till you get to the hosts = 22 or 8+8+6=22 (255.255.252.0)
17.212.89.11/22 or 17.212.89.11 255.255.252.0
Question c: Now armed with the above solutions you can do the math Linglom shows us to get
subnet – 17.212.88.0
broadcast – 17.212.91.255
I checked it with the subnet calculator and it shows true.
Hope it helps,
Scott
March 29th, 2010 at 1:42 pm
Hi Scott:
Thank you for your reply, your response is highly appreciated. However if you could show me a detailed calculation it would be greatly appreciated as I am new to this so I am not able to understand what you have shown in the answers above. For example, why we having a 10 bit host etc… if that could be shown here in this space then it would make my life much easy…
I look forward to your explanation…
Thank you so very much for your response.
Regards,
Ravi
March 29th, 2010 at 6:57 pm
Ravi,
to get the 10 bit host, use the powers of 2 like this:
1×2=2
2×2=4
2×4=8
2×8=16
2×16=32
2×32=64
2×64=128
2×128=256
2×256=512
2×512=1024 and so on…. (I referred to this as position 10 for my own convenience)
Now you have your 10 bit position for the hosts.
How else may I help?
Scott
(Linglom, please check these things. Don’t let me show Ravi wrong. I am just answering his questions because I need the challenge.)
March 30th, 2010 at 12:21 am
Hi Scott:
Thanks again for your response, however here are my few questions again:
1. As per your calculations is it 1024 valid IP’s available?
2. Can you show me a detailed calculation of my last question that is how to find the subnet and broadcast IP addresses?
I know I am asking too much here but I am really getting into it… and trying to figure out with some easy calculations/maths to figure out the answers to my questions… Hope you would understand… All I need is a step by step calculation of my aforesaid questions as I am new to networking and IP addressing, it will be a pleasure to know the in-depth way of calculating the IP addresses etc… I know Linglom has shown it with an easy math but since I am new to all this I am not able to get it…
Your response would be highly appreciated.
Regards,
Ravi
March 30th, 2010 at 9:58 pm
Hey Scott:
Help Please…
Regards,
Ravi
March 30th, 2010 at 10:38 pm
Ravi,
hang in there friend. I am working right now.
force yourself to go line by line, step by step with what Linglom has shown us in the mean time. I will get time for this later. He has given us some good stuff.
Scott
May 9th, 2010 at 11:26 am
Hi Frndz,
Any one pls help me to find the wild card mask range for the IP’s 172.21.188.120 to 172.21.188.140…….
May 15th, 2010 at 3:46 pm
Dear, I have a IP 12.200.50.0/17 where the magic number 128 is grather then 50 . so what is the solution for finding subnet number > please reply me
fasolution@gmail.com
May 16th, 2010 at 4:35 pm
Hey Amit:
After researching on these topics for a long time now, I can now calculate these things in a snap… In your case the subnet with ip address 12.200.50.0/17 would be 255.255.128.0 since 12.200.50.0/17 means you have 8+8+1 of subnet ID and this being a class A ip address you have the rest of the part as host bits. Please revert if you need any further information.
June 12th, 2010 at 7:19 am
hey guys ,
this is my question .
host ip 172.30.1.33 Subnet mask 255.255.255.192(/26)
1. consider octet where subnet masks occur _____
2. subnet address for given ip address ______
3. broadcast address for this subnet ______
can u pls help me with these questions .:)
pls explain every step how u did it as i am new to this
cheers
June 29th, 2010 at 2:42 pm
How did you obtain the mask 255.255.252 for the ip address 130.4.102.1?
August 7th, 2010 at 2:31 am
how to find subnet number and host number
August 23rd, 2010 at 3:06 am
@monu
No. of subnet = 2^n (n = no. of borrowed 1s)
No. of host = 2^m – 2 (m = no. of remaining 0s)
Please note that IOS which is older than 12.x you will have to use “ip subnet zero” command to start subnet from “0″ otherwise no. of subnet will be 2^n – 2. “ip subnet zero” command is enable by default on all IOS after 12.x.
October 9th, 2010 at 2:43 am
Ravi,
Did you ever get an understanding?
October 14th, 2010 at 4:36 am
Hi,
In reply 15, Meraj is incorrect
“So the subnet number = 172.16.2.128″
Wouldn’t the subnet number = 172.16.2.0
-Jerry
October 14th, 2010 at 9:48 am
thanks Linglom! I passed the ICND1 with a 887. This site was instrumental in my passing.
October 18th, 2010 at 7:39 am
How many subnets & host per subnet
172.23.0.0 255.255.255.192
I calulated 62 host.
How do I find how many subnets?
October 19th, 2010 at 1:42 am
How does this help you it doesn’t even give enough details he shows no math or anything.
Show me with math please. How to find the bits borrowed and subnet number, with the subnet address of 202.22.22.160/27 Thanks.
October 19th, 2010 at 1:55 am
nvm i believe i found it. Correct me if I’m wrong but i got 202.22.22.32 as the subnet number and .63 as the broadcast.
Now what if you do this
Given the subnet mask of 255.255.255.240/(28) and host address 220.20.20.97, how do you find subnetwork identifier and broadcast of the subnet the host belongs to.
October 19th, 2010 at 2:07 am
oh and wtf is an easy and difficult mask? I’ve never heard that used before. And what is the difference. because he doesn’t clarify
October 21st, 2010 at 12:17 am
Rub,
For the 202.22.22.160/27 question, you said correct you if you are wrong, so…
The subnet would be 202.22.22.160 Reason being is 256-224=32 so 32 is the magic number. If you find the multiple of the magic number, in this case 32, closest to the last octet but not greater than it, you get 160
Multiples of 32 are …32,64,96,128 and 160, 160 happens to be equal, but not greater. Then, each subnet after will be increased by the magic number 32
202.22.22.160
202.22.22.192
202.22.22.224, etc…
So, you have 202.22.22.160 – subnet number
202.22.22.161 – first usable address
202.22.22.190 – last usable address
202.22.22.191 – broadcast address
Someone please let me know if I am wrong!!
October 22nd, 2010 at 6:01 am
failed first attempt at ICND2.
:^(
October 22nd, 2010 at 8:59 am
Scott, congrats on passing the first one. I thought the first one would be harder, but I guess not. Don’t sweat it, you’ll pass the second time. What did you use to study for the ICND1? And what about ICND2?
October 22nd, 2010 at 9:02 am
Jerry, You are 100% correct. I shoulda put more time into learning it instead of complaining it just frustrates me hardcore! I’m finally starting to understand it now. Thanks for help though
October 22nd, 2010 at 9:23 am
But what do you do if you don’t knwo how many bits are used.
like. 190.90.0.0
How you find all of them based on just that. I don’t think you can can you. The question also says I have 2046 useable subnets created. Not sure where to go from there
October 22nd, 2010 at 6:43 pm
Jerry,
For the ICND1 I used the cisco ICND1 book and the examcram ICND1 and this web site to get ready. This site was key at first and then you get where you don’t hardly have to think about it. You can look at many and just know.
For the ICND2 test I used the ICND2 questions selected from the ICND1 CD and the examcram CCNA book. Some from the Cisco ICND2 book. Felt very comfortable being able to quickly answer all questions for ICND2 study materials. I will now focus more on the Cisco ICND2 book.
Pain in the neck. I never renewed my Certs. I had three tests towards CCNP 10 years ago. Just a lot of stuff I don’t use much. How about you?
Scott
October 23rd, 2010 at 2:36 am
Scott, thank you for the information! It’s not stuff I use much either, but I want to get my CCNA, so that’s why I ask.
There is so much study material out there and so many promises, I don’t know what to buy.
-Jerry
October 24th, 2010 at 9:29 am
how often in real life that require you to know what subnet number an IP belongs to?
November 13th, 2010 at 9:45 pm
I am stumped: Ip add: 172.24.145.128 subnet mask: 255.255.255.224.
The first and last IP address start with 172.24.145 because it is a class B? and the last oct for eachis confusing: 256-224=32 or do I take 256-128=128 ? perplexed??
November 22nd, 2010 at 10:38 am
Thank you so much. You have taught me in half an hour what my tutor’s haven’t been able to explain in 4 months. Now I might actually pass this exam and be able to start making games.
December 7th, 2010 at 8:24 am
where did you get the magic number? or how do you get the magic number? and how to use it? im confused on the magic number… pls reply… ASAP
December 18th, 2010 at 9:51 am
Hi, Eson
I described it on the post with an example. The magic number can be calculated by 256 minus mask’s of the interesting octet.
February 16th, 2011 at 8:56 pm
What if you know the Hostaddress but you want to know in what subnet it resides how do i make a easy quick calculation instead of remebering the whole Subnetrange?
For instance if if have host 192.168.0.203 /30 how can i quickly calculate the subnet adrress and subnetnr i need the formule.
April 6th, 2011 at 10:20 am
ok what I need is a fast ip subnet mask & a gateway auto calculator for maximum speed
May 29th, 2011 at 6:50 pm
i little bit got some knowledge…heres my question
Given 172.150.40.118/22
find
1.network id
2.how many network id’s
3.how many host ids in one network
how to find these…any help is appreciated
REGARDs…
May 30th, 2011 at 2:39 am
do Linglom’s math to get the subnet.
the subnet is 172.150.40.0/22.
Class B address/22 bit mask gives you:
nnnnnnnn.nnnnnnnn.sssssshh.hhhhhhhh
2^h-2=hosts, 2^10-2=1022 hosts
2^s=subnets, 2^6=64 subnets
May 30th, 2011 at 2:29 pm
Thanks scott,,let me know if im wrong,
172.150.40.0/22 the vlsm subnet is:255.255.252.0
NNNNNNNN . NNNNNNNN . sssssshh . HHHHHHHH
11111111 . 11111111 . 11111100 . 00000000
im confused !
Q>is host bits 10 ??(because there are 10 zeros in host octet i.e octet 3 and 4)and subnet bits 6 coz there are six 1′s
what if the subnet mask is 255.255.255.173 ?
answer please
May 30th, 2011 at 3:52 pm
scott, when i entered this subnet 255.255.255.173 and IP ADD -> 172.150.40.0 the ip calulator said it was invalid subnet..ithink this type of mask will not occur ;P
May 30th, 2011 at 4:06 pm
i think i can
,,the subnet mask was invalid
May 30th, 2011 at 7:41 pm
correct – 172.150.40.0/22 the vlsm subnet MASK is:255.255.252.0
is host bits 10 ?? yes, because when you do your powers of 2 to get the required hosts, you end up with 10 bits which use 8 bits from the 4th octet and 2 from the 3rd octet. The remaining 6 bits in the 3rd octet are part of the subnet bits.
255.255.255.173 is an extinct mask, if you find one alive keep it and you will become a Billionaire. {:^)
Hope this helps.
June 3rd, 2011 at 4:52 am
Passed ICND2, CCNA
WooHoo!!
June 3rd, 2011 at 4:52 am
This site was a huge help to me.
August 17th, 2011 at 5:04 pm
Congrates Scott.
August 22nd, 2011 at 7:25 pm
The Subnet mask for a particular network is 255.255.31.0 which of the following pairs of IP addresses could belong to this network ?
a) 172.57.88.62 and 172.56.87.23
b) 10.35.28.2 and 10.35.29.4
c) 191.203.31.87 and 191.234.31.88
d) 128.8.129.43 and 128.8.161.55
August 22nd, 2011 at 10:55 pm
pl z tel me any one .i,e..
the second subnetwork ID eor 10.0.0.0/8?
August 22nd, 2011 at 10:56 pm
pl z tel me any one .i,e..
the second subnetwork ID for 10.0.0.0/8?
August 23rd, 2011 at 1:30 pm
The Subnet mask for a particular network is 255.255.31.0 which of the following pairs of IP addresses could belong to this network ?
a) 172.57.88.62 and 172.56.87.23
b) 10.35.28.2 and 10.35.29.4
c) 191.203.31.87 and 191.234.31.88
d) 128.8.129.43 and 128.8.161.55
No Extra info is given…
pls try to figure it out
August 23rd, 2011 at 11:10 pm
answer is
D
128.8.129.43 and 128.8.161.55
August 24th, 2011 at 12:05 am
the second IP address for 10.0.0.0/18 is 10.0.62.0
September 19th, 2011 at 2:11 am
Ok, reading through directions, trying out the method and I get stuck relatively early. On comment #6, the IP address in the example given was 192.168.200.23/28 and it was answered by Linglom in comment #7. Seemed pretty straightforward. However, I have an IP address to use as an example of 192.168.3.219/28. When I use the method here’s what I get.
IP: 192.168.3.219/28
Mask: 255.255.255.240
My interesting octet is the 4th or 240..so 256-240 = 16, which is my magic number. The closest I can get to my original IP of 219 is 16 x 13 = 208, 16 x 14 = 224. So, by this method 192.168.3.13 should be my Subnet, my First address is 192.168.3.14.
And this is where I get tripped up. Should my broadcast be 192.168.3.255 with the last address being 192.168.3.254? That would then mean that I have 242 usable IP’s in this range. How can I only have 242 IP’s? So, obviously, I’m not doing something right. Can someone please show me the error of my ways? Thanks.
September 19th, 2011 at 2:38 am
As a follow-up to my own comment in #87, by using another calculation method I’ve been taught, I come up with a subnet for the IP of 192.168.3.219/28 as 192.168.3.218. The first usable IP is then 192.168.3.219, which is the IP in my example. The last IP should be 192.168.3.233 and my Broadcast should be 192.168.3.234. So, as you can see, I am not getting the same result by using the math steps described on this site.
September 19th, 2011 at 12:19 pm
Hi, Joyce
Let me try to explain again.
From your given example, the magic number is 256-240 = 16. And we interest in only fourth octet so the first three octets will be the same.
Now subnet number calculation, find the multiple of the magic number that is closest to, but not greater than the the interesting octet of original IP address. It is 16 x 13 = 208 so the subnet number is 192.168.3.208.
Next on broadcast address, adding the magic number to the interesting octet of subnet number and subtract 1. It is 16 + 208 – 1 = 223 so the broadcast address is 192.168.3.223.
The valid IP address range is 192.168.3.209 – 192.168.3.222 (by adding 1 on the subnet number for first IP and subtract 1 on the broadcast number for last IP).
September 19th, 2011 at 6:39 pm
Thanks….I should have checked my math in my other method. I miscalculated. After seeing you work through my example, I see where I goofed. After recalculating, I get the same thing as your method. Your method is by far easier than the one I’ve been using, and more accurate. Thanks again.
September 20th, 2011 at 6:23 pm
HI IS DIS VERY HELPFUL PLZ DON’T IGNORE DIS
October 1st, 2011 at 3:00 am
Best thing I have used to work out subnets. I knew how to work out number of hosts and subnets, for a given IP address and subnet mask, but never could work out the range of IPs. This article is brilliant. Thanks!
October 5th, 2011 at 10:56 pm
This article is great!!! Simplified everything for me. I will be taking ICND1 test next week and now I am confident I can pass
October 6th, 2011 at 9:57 am
10.155.64.110/28
/28 mask is 255.255.255.240
the magic number is 16 (256-240).
We’re interested in the fourth octet
subnet number calculation; find the multiple of the magic number that is closest to, but not greater than the interesting octet of original IP address. It is 16 x 6 = 96 so the subnet number is 10.155.64.96.
broadcast address; add the magic number to the interesting octet of subnet number and subtract 1. It is 16 + 96 – 1 = 111 so the broadcast address is 10.55.64.111.
The valid IP address range is;
10.155.64.97 – 10.155.64.110
(by adding 1 on the subnet number for first IP and subtract 1 on the broadcast number for last IP).
IS THIS CORRECT? I sure hope so….only took me 3 hours to figure this out.
October 22nd, 2011 at 6:03 pm
I tried your formula but failed can you help me find out this what is valid ip address range and subnet id and broadcast address for 198.24.35.128/27 and i want to also know about the multiplier and magic number fundamental.
November 6th, 2011 at 11:35 pm
Hey guys, I’m having a bit of trouble with this one: 66.128.0.0 /11.
I can get the broadcast address by a different method but I can’t seem to grasp this one but it looks easier and faster so I’d love to know it properly.
I can do the other examples at the top but not ones such as the 10.0.0.0 / 13 example and the one I’m having trouble with.
If someone could show me how to get the subnet IP, first IP, last IP, broadcast (66.143.255.255) but in they way Linglom does it I’d very much appreciate it.
November 10th, 2011 at 9:49 pm
Hi, Jerome
That’s correct.
November 10th, 2011 at 9:57 pm
Sandy,
For your case, 192.24.35.128/27. Subnet mask is 255.255.255.224 so we are interested in the fourth octet.
The magic number is 256 – 224 = 32.
Now subnet number calculation, find the multiple of the magic number that is closest to, but not greater than the the interesting octet of original IP address. It is 32 x 4 = 128 so the subnet number is 198.24.35.128.
Next on broadcast address, adding the magic number to the interesting octet of subnet number and subtract 1. It is 32 + 128 – 1 = 159 so the broadcast address is 198.24.35.159.
The valid IP address range is 198.24.35.129 – 198.24.35.158 (by adding 1 on the subnet number for first IP and subtract 1 on the broadcast number for last IP).
November 10th, 2011 at 9:59 pm
Robert,
For your case, 66.128.0.0/11. Subnet mask is 255.224.0.0 so we are interested in the second octet.
The magic number is 256 – 224 = 32.
Now subnet number calculation, find the multiple of the magic number that is closest to, but not greater than the the interesting octet of original IP address. It is 32 x 4 = 128 so the subnet number is 66.128.0.0.
Next on broadcast address, adding the magic number to the interesting octet of subnet number and subtract 1. It is 32 + 128 – 1 = 159 so the broadcast address is 66.159.255.255.
The valid IP address range is 66.128.0.1 – 66.159.255.254 (by adding 1 on the subnet number for first IP and subtract 1 on the broadcast number for last IP).
November 25th, 2011 at 4:22 am
Thanks
December 4th, 2011 at 4:07 pm
an organization is granted the block 21.34.24.0/14…find the first and last adress of block????i tried bt still confused:(
December 7th, 2011 at 6:18 am
If I borrow 4 bits from a default mask. What is the subnet incrementation value, or delta?
December 15th, 2011 at 3:12 am
What is the magic number is greater than the number in the 4th octet? Example:
IP address 192.168.10.11
Mask 255.255.255.192
The interesting octet is the 4th at 192. Figure 256-192=64, the magic number. 64 is greater than 11. What then?
Thank you, Jeanine
January 7th, 2012 at 6:16 pm
Meraj Says:
June 5th, 2009 at 4:11 am
172.16.2.0 /25 masc bit never change the subnet when last is .0
January 7th, 2012 at 6:42 pm
The interesting octet is the 4th at 192. Figure 256-192=64, the magic number. 64 is greater than 11. What then?
if greater write 0
subnet 192.168.10.0 magic 64-1=63 this is bcast
bcast (63-1)= last ip address 192.168.10.62
first ip 192.168.10.1
remember the subnet mask controls only network portion and host portions. when mask increasing the host was reduction.
January 10th, 2012 at 4:21 am
Great work! Thank you very much indeed. The best article about sub netting calculations.
January 30th, 2012 at 4:57 pm
so interesting method