# How do I find valid host addresses with a subnet mask?

Posts: 8Member ■□□□□□□□□□
I have a problem with the following question.

Assuming a subnet mask of 255.255.224.0, which of the following would be valid host addresses?

A. 124.78.103.0
B. 125.67.32.0
C. 125.78.160.0
D. 126.78.48.0
E. 176.55.96.0
F. 186.211.100.0

The answers are A,D and F. I dont know how to get the answers. Does anyone have an idea?
Thanks

• Posts: 32Member ■■□□□□□□□□

255.255.224.0 which I always write at

255.255.11100000.00000000

The first subnet will be the value of the last bit turned on which is 32 (corresponding to the 1 immediately to the left of 00000.00000000)

So for an ip address of x.x.x.x the first subnet would be

x.x.32.0, then
x.x.64.0
x.x.96.0
x.x.128.0
x.x.160.0
x.x.192.0

and so on

A is a valid address in the x.x.96.0 subnet
B is network ID, x.x.32.0 not a valid host
C is network ID, x.x.160.0 not a valid host
D is a valid address in the x.x.32.0 subnet
B is network ID, x.x.96.0 not a valid host
F is a valid address in the x.x.96.0 subnet

So the answer is A,D and F
Yahoo Instant Messanger : spacemancw
Great explanation spacemancw.
• Posts: 317Inactive Imported Users
lots of math in this question, i was wondering if i could get these question types on my 218 exam
• Posts: 7Member ■□□□□□□□□□
Hi all,

Heaps of subnet question on the exam!!

Try this:

256-224=32

32+32=64 32+64=96 32+96=128 32+128=160
32+160=192 32+192=224

0, 32, 64, 96, 128, 160, 192, 224

Valid hosts are:
1-30, 33-62, 65-94, 97-126, 161-190, 193-222

31, 63, 95, 127, 159, 191, 223

The valid hosts will be 1 more than the sub and 2 less than the next sub
eg. subnet 32+1=33 first valid host, next subnet 64-2=62 last valid host

If you can count by 2's, 4's, 8's, 16's, 32's, 64's then good

If like me you can only count by 1's don't panic just write out the 16X
table and use it as a refference too easy.

PS this is how you spell colour.
• Posts: 1Member ■□□□□□□□□□
subnet 255.255.248.0 not sureeeeeeeee

i need to find the following

no. no valid networks
no. of hosts on each network
1st valid host on each network
last valid host on each network
ip addy above belongs to which network

got the following but i dont know if right

networks 30
host 2046

• Posts: 12,314Banned ■■■■■■■■□□
I'll help you out, just because I've never seen anyone resurrect a 5.5 year old thread before

You find the network by ANDing the bits of the subnet mask and ip address

10101100.00010010.00001111.00010001 (172.18.15.17)
11111111.11111111.11111000.00000000 (255.255.248.0)
==============================
10101100.00010010.00000000.00000000

So the network address is 172.168.0.0

You have 12 bits for the hosts, so 2^12-2 = 4094

You have 4 bits for the network, so 2^4 = 16

10101100.00010010.00001111.11111111 = 172.168.15.255

For the next subnet, increment your subnet bits by 1.
10101100.00010010.00010000.00000000 = 172.168.16.0

And repeat...
• Posts: 1,076Member
dynamik wrote:
I'll help you out, just because I've never seen anyone resurrect a 5.5 year old thread before

You find the network by ANDing the bits of the subnet mask and ip address

10101100.00010010.00001111.00010001 (172.18.15.17)
11111111.11111111.11111000.00000000 (255.255.248.0)
==============================
10101100.00010010.00000000.00000000

So the network address is 172.168.0.0

You have 12 bits for the hosts, so 2^12-2 = 4094

You have 4 bits for the network, so 2^4 = 16

10101100.00010010.00001111.11111111 = 172.168.15.255

For the next subnet, increment your subnet bits by 1.
10101100.00010010.00010000.00000000 = 172.168.16.0

And repeat...

Actually, with Sabby's example....wouldn't it be like this?....or am I retarded?

10101100.00010010.00001110.00010001 (172.18.14.17)
11111111.11111111.11111000.00000000 (255.255.248.0)
==============================
10101100.00010010.00000000.00000000

So the network address is 172.18.0.0

You have 12 bits for the hosts, so 2^12-2 = 4094

You have 4 bits for the network, so 2^4 = 16

10101100.00010010.00001111.11111111 = 172.18.15.255

For the next subnet, increment your subnet bits by 1.
10101100.00010010.00010000.00000000 = 172.18.16.0

Sabby,
This comes in handy to double check your work.
http://www.techexams.net/ip-subnet-calculator/
WIP: CCENT/CCNA (.....probably)
• Posts: 12,314Banned ■■■■■■■■□□
Whoops. I did the binary right, but yea, 18 not 168. That one IP was off too, but fortunately it didn't matter in the grand scheme of things. Remember kids, don't drink and subnet
• Posts: 445Member
dynamik wrote:
Whoops. I did the binary right, but yea, 18 not 168. That one IP was off too, but fortunately it didn't matter in the grand scheme of things. Remember kids, don't drink and subnet

crazy talk, nothing better than knockin back a few cans and hitting up subnettingquestions.com.
"There are 3 types of people in this world, those who can count and those who can't"
• Posts: 56Member ■■□□□□□□□□
rc240sx wrote:
I have a problem with the following question.

Assuming a subnet mask of 255.255.224.0, which of the following would be valid host addresses?

A. 124.78.103.0
B. 125.67.32.0
C. 125.78.160.0
D. 126.78.48.0
E. 176.55.96.0
F. 186.211.100.0

The answers are A,D and F. I dont know how to get the answers. Does anyone have an idea?
Thanks

According to me none of the options are correct because Question is to find valid HOST addresses(which is not in the option).A, D and F are valid Network addresses...

Question should be "which of the following would be valid NETWORK addresses?"

Well,If I am wrong because of any misconception, Do correct me.
Distractions all along the way.....perhaps will end up breaking everything
• Posts: 445Member
*StarFire wrote:
rc240sx wrote:
I have a problem with the following question.

Assuming a subnet mask of 255.255.224.0, which of the following would be valid host addresses?

A. 124.78.103.0
B. 125.67.32.0
C. 125.78.160.0
D. 126.78.48.0
E. 176.55.96.0
F. 186.211.100.0

The answers are A,D and F. I dont know how to get the answers. Does anyone have an idea?
Thanks

According to me none of the options are correct because Question is to find valid HOST addresses(which is not in the option).A, D and F are valid Network addresses...

Question should be "which of the following would be valid NETWORK addresses?"

Well,If I am wrong because of any misconception, Do correct me.

You're wrong...and dude, look at the date of that post you've quoted.

Take option A. as an example. (124.78.103.0)

Host range is 124.78.96.1 - 124.78.127.254

124.78.103.0 falls within the host range.
"There are 3 types of people in this world, those who can count and those who can't"
• Posts: 247Member
Just because there is a ZERO in the last OCTET doesn't automatically make it a Network Address. Especially with Classless and large Network Addressing Class A and B!

The valid Host range for A D and F are:

A) 124.78.96.1 - 124.78.127.254 with a Network address of 124.78.96.0 and broadcast of 124.78.127.255.

D) 126.78.32.1 - 126.78.63.254, 124.78.32.0 Network, 124.78.63.255 broadcast.

F) 186.211.96.1 - 186.211.127.254, 186.211.96.0 Network, 186.211.127.255 broadcast.
• Posts: 56Member ■■□□□□□□□□
Thanks Friendss ..........
Distractions all along the way.....perhaps will end up breaking everything
• Posts: 48Member ■■□□□□□□□□
I dont care how old this is, its STILL GREAT, and always valid!

It took me a while to get it, but I get it now. It is a great explanation.
• Posts: 1Registered Users ■□□□□□□□□□
amtt81 wrote: »
I dont care how old this is, its STILL GREAT, and always valid!

It took me a while to get it, but I get it now. It is a great explanation.

I want to re-OPEN this thread. WAY 2 COOL!
• Posts: 180Member ■■■□□□□□□□
Haha awesome first post to open a thread that is 10 years old!
• Posts: 1Registered Users ■□□□□□□□□□
Now i am the one who opened this 2 year old thread! lol
• Posts: 1Registered Users ■□□□□□□□□□
• 192.168.73.13 and 192.168.73.37
• 192.168.73.37 and 192.168.73.55
• 192.168.73.62 and 192.168.73.13
• 192.168.73.55 and 192.168.73.37
• None of the above

Can someone help me out by solving this?
The answer is 192.168.73.37 and 192.168.73.55
• Posts: 2,338Member ■■■■■■■■□□
It's a poorly-written question. You won't find anything unclear like this on the actual exam.

First, "192.168.73.37 and 192.168.73.55" and "192.168.73.55 and 192.168.73.37" contain identical host addresses. One should not be asked to choose between them, as they are both equally correct or incorrect.

Second, "192.168.73.46/27" is not a subnet ID.

I leave the math to you. See above, or another popular thread on subnetting technique--

• Posts: 241Member
range of network: 192.168.73.32 - 192.168.73.63

and the options are wrong. 2nd & 4th options are same, and I never saw any options in that format.
[ ]CCDA; [ ] CCNA Security
• Posts: 10Member ■□□□□□□□□□
Hi everybody!

Can't believe it has passed 10 years already since somebody started this post. It made me wonder what I was doing back than. Anyways need some help/explanation to a newbie with next question, please.

What is he last valid host on the subnetwork 172.16.242.0 255.255.254.0?According to the subnettingquestions.com answer should be: 172.16.243.254

Here is what I know for now.

172.16.242.0 255.255.254.0
1 bit left in the 3rd octet which equals 1 when converted from binary. So 242 + 1 = 243 for the 3rd octet.
and we have 8 bits left in the 4th octet which is 255 - 1 for the last host.

Just want to make sure I'm doing it right and maybe there is some formula or anything else I should know?

• Posts: 1,340Member
Elias38 wrote: »
It made me wonder what I was doing back than.

I was in college (Summer 2003) and taking "Introduction to C++" and "Computer Imaging I" that semester.
R&S: CCENT CCNA CCNP CCIE [ ]
Security: CCNA [ ]
Virtualization: VCA-DCV [ ]
• Posts: 1Registered Users ■□□□□□□□□□
Elias38 wrote: »
Hi everybody!

Can't believe it has passed 10 years already since somebody started this post. It made me wonder what I was doing back than. Anyways need some help/explanation to a newbie with next question, please.

What is he last valid host on the subnetwork 172.16.242.0 255.255.254.0?According to the subnettingquestions.com answer should be: 172.16.243.254

Here is what I know for now.

172.16.242.0 255.255.254.0
1 bit left in the 3rd octet which equals 1 when converted from binary. So 242 + 1 = 243 for the 3rd octet.
and we have 8 bits left in the 4th octet which is 255 - 1 for the last host.

Just want to make sure I'm doing it right and maybe there is some formula or anything else I should know?

Elias38 wrote: »
Hi everybody!

Can't believe it has passed 10 years already since somebody started this post. It made me wonder what I was doing back than. Anyways need some help/explanation to a newbie with next question, please.

What is he last valid host on the subnetwork 172.16.242.0 255.255.254.0?According to the subnettingquestions.com answer should be: 172.16.243.254

Here is what I know for now.

172.16.242.0 255.255.254.0
1 bit left in the 3rd octet which equals 1 when converted from binary. So 242 + 1 = 243 for the 3rd octet.
and we have 8 bits left in the 4th octet which is 255 - 1 for the last host.

Just want to make sure I'm doing it right and maybe there is some formula or anything else I should know?

That's not a good way to do it. If for instance, if it was a /20, then are you going to add 16 to 242? It would be wrong. The way you are thinking makes the number of the octet you are working on, the network base every time. But it isn't always the base.

Use the magic bit technique.

in each octet there are 8 bits. Each 1 reps a number. If 0 it doesn't equal anything.

1 1 1 1 1 1 1 1
128 64 32 16 8 4 2 1

In your case the 24th place is in the OFF position. It's a Zero. The last active bit is the 23rd place, which is a 2.

11111110 = 254 (11111111.11111111.11111110.00000000 is 255.255.254.0)

Right? Because 128+64+32+16+8+4+2 = 254 . The last "1" is missing, since it's a 0

So, you look at the last active bit and see what it's value is. Since the value is 2, you then know you can have your network by 2's.

0,2,4,6,8,10....all the way up to 242. SO, your answer is right. It is 172.16.242.0 - 172.16.243.255.

But, if you thought for instance that the Network base was 172.16.241.0, it would be wrong since counting by twos means the network base would be even. In fact, just a tip..the base is always even and the broadcast always odd. Usable hosts can be either though.
You can use the MAGIC bit and count from zero up until you run into your network address you are trying to figure out.

Another example.

172.16.240.0 /19
255.255.224.0

ok. Count the bits on the subnet mask..there are 19 right?

11111111.11111111.11100000.00000000

Find the last one which is the magic bit and see it's value. It is 32.

0-32-64-96-128-160-192-224-256

So you can see your address (240) is in between 224 and 256.

So, network base is 172.16.224.0 - 172.16.255.255

The magic bit allows you to count the networks inside of the octet.

One more.

172.16.224.0 /17

11111111.11111111.10000000.0000000

What is the value of the last 1? 128

So count from zero. 0 - 128 -256 So Network base is

172.16.0.0 - 172.16.127.255

And

172.16.128.0 - 172.16.255.255 (the 240 would be inside of this range)

Hope this helps someone.
• Posts: 6Member ■□□□□□□□□□
I found a cool site that will break down subnetting. You just have to figure out how it gets the calculations. It gets easy as you find out each step. This is actually a calculator, but use it as a learning tool. https://www.adminsub.net/ipv4-subnet-calculator

Good luck!

And ALWAYS drink and SUBNET! It makes it funner!

172.25.12.52/24

10101100.00011001.00001100.00110100

172.25.12.52 <-- This is a Host IP

11111111.11111111.11111111.00000000

255.255.255.0 = 24

Wild Card

00000000.00000000.00000000.11111111

255

Network

10101100.00011001.00001100.00000000

172.25.12.0 (Class

10101100.00011001.00001100.11111111

172.25.12.255

First IP

10101100.00011001.00001100.00000001

172.25.12.1

Last IP

10101100.00011001.00001100.11111110

172.25.12.254

Hosts

254

N,n,H,h

N.N.N.H (Private)

• Posts: 6Member ■□□□□□□□□□
Here's some more examples I did:

192.168.28.45/28

11000000.10101000.00011100.00101101

192.168.28.45

11111111.11111111.11111111.11110000

255.255.255.240

Wild Card

00000000.00000000.00000000.00001111

15

Network

11000000.10101000.00011100.00100000

192.168.28.32

11000000.10101000.00011100.00101111

192.168.28.47

First IP

192.168.28.33

Last IP

192.168.28.46

Hosts

14

N,n,H,h

N.N.N.nnnnhhhh Private

10.1.1.1

00001010.00000001.00000001.00000001

10.1.1.1 <--This is a Host IP

11111111.11111111.11111111.11111100

255.255.255.252

Wild Card

00000000.00000000.00000000.00000011

3

Network

00001010.00000001.00000001.00000000

10.1.1.0

00001010.00000001.00000001.00000011

10.1.1.3

First IP

10.1.1.1 <--This is a Host IP

Last IP

10.1.1.2

Hosts

2

N,n,H,h

N.N.N.nnnnnnhh (Private)

192.168.33.63

11000000.10101000.00100001.00111111

192.168.33.63 <--This is a Broadcast IP

11111111.11111111.11111111.11000000

255.255.255.192

Wild Card

00000000.00000000.00000000.00111111

63

Network

11000000.10101000.00100001.00000000

192.168.33.0

11000000.10101000.00100001.00111111

192.168.33.63 ß This is a Broadcast IP

First IP

192.168.33.1

Last IP

192.168.33.62

Hosts

62

N,n,H,h

N.N.N.nnhhhhhh (Private)