Saturday 21 May 2011

A subnet question with answer

Question:


" On the Network 131.1.123.0/27, what is the last IP address that can be assigned to a host?"

1) 131.1.123.30
2) 131.1.123.31
3) 131.1.123.32

4) 131.1.123.33


Answer:


Your network address is 131.1.123.0 /27= 10000011.00000001.0111 1011.00000000

Always the first host is one greater that the network address.

So “First Host Address” = 131.1.123.1
 

The subnet is /27 which means first 27 bits represents network portion and last 5 bits represents host portion.

You find the broadcast by putting 1 for all your host portion of the network address.

So 10000011.00000001.01111011.000 00000   becomes
     10000011.00000001.01111011.000 11111 = 131.1.123.31

Which is your broadcast address.

Now the last host of your network address is one less that the broadcast address so it is 131.1.123.30
----------------
So Network address = 131.1.123.0
First host = 131.1.123.1
Last host = 131.1.123.30
Broadcast address = 131.1.123.31
-------------------

So I think the correct answer is 131.1.123.30

Ps:

The /27 means that the first 27 bits are used for the "network portion".
Total bits of your network ip are 32 so you left with 5 bits for yours host(s ) portion (2^5-1).
Your subnet mask is 1111 1111. 1111 1111.1111 1111.1110 0000 = 255.255.255.224.

Hope it was helpful !


1 comment: