Questions

# ip/subnets

Locked

### ip/subnets

Given an IP address of 192.168.1.42 255.255.255.248, what is the subnet address?
A. 192.168.1.8/29
B. 192.168.1.32/27
C. 192.168.1.40/29
D. 192.168.1.16/28
E. 192.168.1.48/29

and if anyone can explain how they got the answer i will appreciate that..thanks

## is that

Collapse -

school work?

Collapse -

no its not, what is the difference anyway?

Collapse -

considering that your first question was and you outright admitted it was homework, one can only assume that it is. It matters because if we do it FOR you, you will not learn anything from it. Once again, Google is your friend as are your textbooks.

Collapse -

again i know the answer but the book seems to disagree. so i was just checking to see maybe i was wrong

Collapse -

.248 mask uses 5 bits (1111 1000).
.42 IP in binary is (0010 1010)

The base subnet therefore is the lowest binary value that can be written without changing the output of an AND operation of the subnet mask and IP ...
1111 1000 AND
0010 1010 equals
0010 1000 - which is .40

/24 is standard class C mask.

As an aside: the broadcast address would be the HIGHEST binary value without changing the output of an AND operation of the subnet mask and IP ...

0010 1000 - Base subnet
0010 1111 - (.47) Last three 1's is the highest value without changing the AND operation .. as in .. making it .48 would result in 0011 0000 which changes the outcome of the AND operation against the subnet mask)
usable addresses: .47 - .40 = 7 .. less 2 = 5 usable addresses in that range
(take away 2 because the base subnet and broadcast address can't be used as end device IPs)

Hope that makes sense.
I'm admittedly quite rusty on my IP theory so if I've got anything wrong, please excuse me .. 9and others please feel free to correct me.

Collapse -

Thanks for the answer, i understand how binary numbers work and all that but i still dont get why you are or where you are getting the 42 from? thanks

Collapse -

i still dont get why you are or where you are getting the 42 from This sounds like a Douglas Adams quip. :)

The .42 was just a valid IP in the range determined by your subnet mask. As stated above by [jedi] 29 bits are network and 3 are host. Your host range is .41 through .46 and .42 is a valid host IP. EG

11000000.10101000.00000001.00101010 192.168.1.42
11111111.11111111.11111111.11111000 255.255.255.248 or 29+3
11000000.10101000.00000001.00101000 192.168.1.40 (after AND op)

Make more sense?