## How to find IP addresses and subnet number in a few seconds

When 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

**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

**Reference:** CCNA Self-Study, CCNA ICND, Chapter 4: IP Addressing and Subnetting

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?

Yes, you’re right. It’s my fault.

I have fixed them already. Thanks.

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.

I have a new practical knowledge.

Thanks

How do you do the samething for 192.168.200.23 /28

Thanks

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

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

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)

cool I was right! thanks a lot for your help, I think I finally understand this.

How do this problem 172.16.2.0/25

Hi, Preet

Why don’t you try by yourself first? I think it’s not too difficult. There are few examples in comments.

Just wanna say thank you.

U make my life much easier!

sory i want to learn more about subnet number and host number

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)

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????

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).

My question is why is the number 25 used when trying to find the mutiple?

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).

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..

Hi, Ram

I believe that I have shown many examples which you can apply to yours.

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 :>

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

where did 11100000 came from?? ðŸ˜€ thanks

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).

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

Hi, Yogesh Kapil

Here is how to convert Mask Bits (CIDR) 13 to subnet mask,

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

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

Hi, Scott

Yes, that’s right.

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!

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.

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

how to get the subnet of 100.20.0.0/21

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

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…

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?

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?

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

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

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.)

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

Hey Scott:

Help Please…

Regards,

Ravi

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

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…….

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

[email protected]

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.

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

How did you obtain the mask 255.255.252 for the ip address 130.4.102.1?

how to find subnet number and host number

@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.

Ravi,

Did you ever get an understanding?

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

thanks Linglom! I passed the ICND1 with a 887. This site was instrumental in my passing.

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?

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.

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.

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

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!!

failed first attempt at ICND2.

:^(

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?

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

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

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

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

how often in real life that require you to know what subnet number an IP belongs to?

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??

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.

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

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.

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.

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…

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

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

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

i think i can :D,,the subnet mask was invalid

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.

Passed ICND2, CCNA

WooHoo!!

This site was a huge help to me.

Congrates Scott.

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

pl z tel me any one .i,e..

the second subnetwork ID eor 10.0.0.0/8?

pl z tel me any one .i,e..

the second subnetwork ID for 10.0.0.0/8?

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

answer is

D

128.8.129.43 and 128.8.161.55

the second IP address for 10.0.0.0/18 is 10.0.62.0

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.

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.

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).

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.

HI IS DIS VERY HELPFUL PLZ DON’T IGNORE DIS

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!

This article is great!!! Simplified everything for me. I will be taking ICND1 test next week and now I am confident I can pass

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.

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.

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.

Hi, Jerome

That’s correct.

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).

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).

Thanks

an organization is granted the block 21.34.24.0/14…find the first and last adress of block????i tried bt still confused:(

If I borrow 4 bits from a default mask. What is the subnet incrementation value, or delta?

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

Meraj Says:

June 5th, 2009 at 4:11 am

:DDD So the subnet number = 172.16.2.128

172.16.2.0 /25 masc bit never change the subnet when last is .0

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.

Great work! Thank you very much indeed. The best article about sub netting calculations.

so interesting method

what if only d IP is given without any subnet number or mask bit or broadcast number ,how do we get them???. For example; 82.145.209.112. What is d subnet mask and broadcast number.?

Broadcast address of network 192.168.162.128/28?

Mask would therefore be 255.255.255.240

so I worked out the subnet number as 192.168.162.8

Therefore the broadcast address must be 192.168.162.23

I got this wrong though! Seemingly it is 192.168.162.143

Can you show me where I went wrong?

Hi, Adam

The answer would be like this:

can anyone help me out with this… how to find the ip address from this 192.168.10.subnet mask=255.255.255.240

simply, 192.168.10/28…… now what is the ip address

please find the Subnet ID and broad cast ID. Following

115.1.1.20/29

172.18.101.139/28

10.231.115.90/11

10.40.200.181/20

Thank U For This Help. Help me So Much To Do Well In CCNA Exam ðŸ™‚

thanks alot….it realy helped me out to understand… you ar edoing a great job.. ðŸ™‚

you are doing a great job ðŸ˜‰

How to defined ip range?/24/28 etc?

Hi,

I am trying to ping from host system to guest VM(Linux).

My VM details are:

Addr : 192.168.245.128

Mask : 255.255.255.0

Gateway : 192.168.245.2

Host Details:

C:\Windows\system32>ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . . . . : host

Primary Dns Suffix . . . . . . . : test.localdomain

Node Type . . . . . . . . . . . . : Hybrid

IP Routing Enabled. . . . . . . . : No

WINS Proxy Enabled. . . . . . . . : No

DNS Suffix Search List. . . . . . : test.localdomain

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . : test.localdomain

Description . . . . . . . . . . . : Broadcom NetXtreme Gigabit Ethernet

Physical Address. . . . . . . . . : 00-1E-0B-34-8F-BE

DHCP Enabled. . . . . . . . . . . : Yes

Autoconfiguration Enabled . . . . : Yes

IPv4 Address. . . . . . . . . . . : 192.168.100.174(Preferred)

Subnet Mask . . . . . . . . . . . : 255.255.255.0

Lease Obtained. . . . . . . . . . : 2012 6 28 16:21:18

Lease Expires . . . . . . . . . . : 2012 7 28 16:21:26

Default Gateway . . . . . . . . . : 192.168.100.1

DHCP Server . . . . . . . . . . . : 192.168.100.21

DNS Servers . . . . . . . . . . . : 192.168.100.21

192.168.100.232

192.168.100.252

Primary WINS Server . . . . . . . : 192.168.100.21

Secondary WINS Server . . . . . . : 192.168.100.252

NetBIOS over Tcpip. . . . . . . . : Enabled

Tunnel adapter isatap.test.localdomain:

Media State . . . . . . . . . . . : Media disconnected

Connection-specific DNS Suffix . : test.localdomain

Description . . . . . . . . . . . : Microsoft ISATAP Adapter

Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0

DHCP Enabled. . . . . . . . . . . : No

Autoconfiguration Enabled . . . . : Yes

Tunnel adapter Local Area Connection*:

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface

Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0

DHCP Enabled. . . . . . . . . . . : No

Autoconfiguration Enabled . . . . : Yes

IPv6 Address. . . . . . . . . . . : 2001:0:4137:9e76:38f5:f602:220d:7095(Pref

erred)

Link-local IPv6 Address . . . . . : fe80::38f5:f602:220d:7095%10(Preferred)

Default Gateway . . . . . . . . . : ::

NetBIOS over Tcpip. . . . . . . . : Disabled

Can you please tell me what I should do to be able to ping my guest from host.??

Hi, newbie

If you want VM be able to access resource on host’s network, you should change network mode of a VM to brideged and make sure that the vitual network of the VM is enabled.

Next, change IP address of VM to be the same network as host (for example, 192.168.100.175,176,…) in your case.

Lastly, your VM is Linux. You have to make sure that the network is configured and enabled properly.

i have been given 220.168.1.0/24 to subnet and provide ip addressing, the network has the following addressing requirements

branch 1 lan 1 will require 14 host ip addresses

branch 1 lan 2 will require 14 host ip addresses

branch 2 lan 1 will require 14 host ip addresses

branch 2 lan 2 will require 14 host ip addresses

the hq lan will require 25 hosts ip address

the link from hq to branch 1 will require an ip address for each end of the link

the link from hq to branch 2 will require an ip address for each end of the link

the link from hq to branch 1 to branch 2 will require an ip address for each of the link

can you help regards eunan

how to find the ip addressess of subnet of 192.168.1.4 ?

help me please?

How to find the First and last IP of 172.17.16.30.0/23 which have 174 hosts

Please i need help

my question is : What you mean by this

” 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.”

what’s the not greater than the interesting octet

Thanks a lot …this website help me a lot to understand the sub netting and hosts..

how to solve this problem

from this ip add 172.21.0.0 . i want 700 subnet & 50 host on

each subnet

Thank you kind Sir.

Hey

ISP is giving you the block 45.4.10.0/26

What is the subnet mask for this block?

I am trying to study for my final and one of the study questions is…Given an IP address of 172.16.3.5 with a subnet mask of 255.255.255.192 what is the last assignable ip address available on the 10th network? the answer that I came up with is 172.16.3.159… would this be correct

If I have 1 IP address 82.31.64.0 /20 and I need to subnet it to accomodate for 3 sites:

Building 1

Student – 600 Host

Staff – 62 Hosts

Admin – 13 hosts

Building 2

Student – 700 Host

Staff – 80 Hosts

Admin – 18 hosts

Building 3

42 Hosts

Do I order them from largest to smallest host, or do I group them by buildings and subnet based on largest to smallest host in each group?

I did Building 1 700 hosts but don’t know how to continue from there or if its even right?

Subnet Address: 82.31.64.0 /22

Range: 82.31.64.1 – 82.31.66.190

Broadcast: 82.31.66.191

Help!

Which two statements describe the IP address 10.16.3.65/23?

The subnet address is 10.16.3.0 255.255.254.0.

The lowest host address in the subnet is 10.16.2.1 255.255.254.0.

The last valid host address in the subnet is 10.16.2.254 255.255.254.0.

The broadcast address of the subnet is 10.16.3.255 255.255.254.0.

please tell the soluton according to your method

Briliant Incredibly simple, much better than method in CCNA official CCENT/CCNA book !hyyyy,,,,master…what function is this ? can explane ..! for me..please..thaks a lots

haii

what is the subnet for 172.16.209.10/22

how to find firsr address and given address of these ip

first group

first customer ip add is this

1)190.100.0.0/24

find 1 to 64th customer ist and last address?

Hello. Can anybody please help me with this exercice.Network id is 20.1.1.128 and subnet mask is 255.255.255.128.We have 3 LAN contain a number of hosts.LAN 1 has 58 hosts,LAN 2 has 25 hosts and LAN 3 has 4 hosts.a) I have to find subnet address for every LAN. b) I have to find broadcast address, maximum number of hosts, first and last address for LAN 2.Thank you.

how we can find brodcast address of mask /27……if ip address not given

Hi Ann,

You need IP address or network address with subnet mask to calculate broadcast address, only the mask /27 is not enough information.

The broadcast address for an IPv4 host can be obtained by performing a bitwise OR operation between the bit complement of the subnet mask and the host’s IP address. In other words, take the host’s IP address, and set to ‘1’ any bit positions which hold a ‘0’ in the subnet mask.

Reference: https://en.wikipedia.org/wiki/Broadcast_address

I wanted to extract (ip address)of after third dot

eg: 192.168.1.100 here i wanted (after third (.)dot) 100 for further calculation

12.1.1.3 Here i wanted 3 for further calculation …please tell a solution

Hi, Dinesh

Did you mean by programming or coding? But you didn’t mention what language you use. You could use split function on a given IP (if it is string data type) with dot (.) as parameter. And get the last member of result array should be value that you want.

I have this problem, i am tasked to decode this IP address 120.15.179.255/18 and determine the subnet mask, multiplier, network number, subnetwork addresses, and broadcast addresses.

please help me.

I got this challenge for you ðŸ™‚ . A company has 6 VLANs. They have min 300 and max 1300 users. They all have to be in network 192.168.0.0/16. Give Network ID, Subnet Mask, IP adress for each group.

Complete the following table for all of the subnets in this network. Give the subnet number (starting from 0), subnet address, host address range, subnet broadcast address, and identify which subnets are assignable (usable) and which subnets are not assignable. thanks

Guys….. 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Ã¢â‚¬Â¦ plizzz gat a test 2morrow…. Guys help…

Anyone there to help me out

If i required 50 host ip addresses then what is exact subnet for this?

You need 500 subnets, each with about 100 usable host addresses per subnet. What mask will you assign using a class B network address?

10.25.66.154/23

calculate the number of subnet and host bits??

Can you please calculate the subnet and host bits of 10.0.0.0.1.

Which subnet does host 172.23.126.63/22 belong to?