The Gateway to Computer Science Excellence

+29 votes

In the network $200.10.11.144/27$, the $fourth$ octet (in decimal) of the last $IP$ address of the network which can be assigned to a host is _____.

+55 votes

Best answer

Answer= $158$

$144$ in binary = $100 10000$

out of this $3$ $bits$ in left are subnet bits. ($27$ $bits$ are used for subnet, which means top $3$ $bytes$ and leftmost $3$ $bits$ from the last byte)

So, the $4$th octet in the last $IP$ address of the network which can be assigned to a host is $100 11110$. (its not $100 11111$ because its network broadcast address)

So, $10011110$ is $158$ in decimal.

$144$ in binary = $100 10000$

out of this $3$ $bits$ in left are subnet bits. ($27$ $bits$ are used for subnet, which means top $3$ $bytes$ and leftmost $3$ $bits$ from the last byte)

So, the $4$th octet in the last $IP$ address of the network which can be assigned to a host is $100 11110$. (its not $100 11111$ because its network broadcast address)

So, $10011110$ is $158$ in decimal.

+7

here we have 5 bits for hosts, so total 32 addresses. In which 00000 is the network address and 11111 is the broadast address (means this address is used to broadcast a message to every user) thus we are left with a range of 00001 to 11110. so last address is 10011110 which is 158

+2

@arjun sir,

Given Net ID $200.10.11.144$

$\underset{24 \text{ bits} }{\underbrace{200.10.11.}} \mathbf{{\color{Red} {10010000}}}$

Now we can borow $3$ bits from $4^{\text{th}}$ octact .AFAIK , There is no **standard** **rule** that it should be always from Left .

This can also be done like this ?

$\underset{24 \text{ bits} }{\underbrace{200.10.11.}} \mathbf{{\color{Red} {10010}}}\underset{3\text{ bits}}{\underbrace{\mathbf{{\color{Blue} {000}}}}}$

Actaully I think Subnet Mask must also be given with the question .

Correct me if wrong

+1

@pc. If each one borrows from from different place, then how the interpretation is to take place? One router may interpreet in one way and other router in some other way.

Hence, its standard that we borrow from left.

Now, we are creating directly hosts instead of subnets.

SO, this is it.

Hence, its standard that we borrow from left.

Now, we are creating directly hosts instead of subnets.

SO, this is it.

+4

@pC your approach would have been correct if classful notation is given.

Here, /27 implies that it is CIDR notation in which most significant 27 bits are considered as network id and remaining host id. Hence, the given approach is correct.

0

How it would be allowed in classful notation? Could you give example and how the routers would interpret?

+1

@Sushant Gokhale **theoretically** it is possible in classful notations, practically, convention you said is followed.

+2

Do you have any reference for

its standard that we borrow from left.

Actually what I knew by $200.10.11.144/27$ is We are given a NID from which we have to make subnets having $27$ bits we have to take first $24$ bits as we dont have any choice for it . But for last byte to choose $3$ bits we have got 8 positions .

So unless specified a Subnet Mask . How can we be sure about$\mathbf{ 200.10.11.{\color{Red} {100}{\color{Blue} {00000}}}}$ is the **first** **network** in our subnet ?

+2

@pC

Here, /27 is the netmask and not subnet mask.

Regarding your query that why cant we borrow last 3 bits? Theorotically you can do it. But all the network devices in the world should follow the same protocol.

Also, the bits are not simply representing the hosts. They are placeholders like the binary digits e.g 2^{0}=1, 2^{1}=2 and so on. By having the placeholders, hierarchical interpretation becomes possible.

+1

@pC.

Even if its a subnet mask, its still a network. So in general, its a netmask. But, if they give it specifically or we want to create subnets, then we need to differentiate betn netmask and subnet mask.

Even if its a subnet mask, its still a network. So in general, its a netmask. But, if they give it specifically or we want to create subnets, then we need to differentiate betn netmask and subnet mask.

0

Hope the below info. from wiki support ur discussion.

A subnet mask is a bitmask that encodes the prefix length in quad-dotted notation: 32 bits, starting with a number of 1 bits equal to the prefix length, ending with 0 bits, and encoded in four-part dotted-decimal format: 255.255.255.0. A subnet mask encodes the same information as a prefix length, but predates the advent of CIDR. In CIDR notation, the prefix bits are always contiguous, whereas subnet masks may specify non-contiguous bits. However, since IP addresses are almost always allocated in contiguous blocks, a subnet mask has no practical advantage over CIDR notation.

+22 votes

last octate will be 100 11111 = 1 + 2 + 4+ 8+ 16 + 128 = 159

The question seems to by asking about host address. The address with all 1s in host part is **broadcast address** and can't be assigned to a host. So the maximum possible last octal in a host IP is 10011110 which is 158 ( 159 - 1 = 158 ) .

+4 votes

NID = 27 bits

HOST ID = 5 bits

144 in binary = 10010000

so, 200 . 10 . 11 . 100 00000 ( Reserved for Network id)

200 . 10 . 11 . 100 00001

200 . 10 . 11 . 100 00010

---------------------------------

----------------------------------

200 . 10 . 11 .100 11110 = 200 . 10 . 11 .158 (Last IP address of the network which is assigned to host)

200 . 10 . 11 . 100 11111 = 200 . 10 .11 . 159 (Reserved for DBA)

HOST ID = 5 bits

144 in binary = 10010000

so, 200 . 10 . 11 . 100 00000 ( Reserved for Network id)

200 . 10 . 11 . 100 00001

200 . 10 . 11 . 100 00010

---------------------------------

----------------------------------

200 . 10 . 11 .100 11110 = 200 . 10 . 11 .158 (Last IP address of the network which is assigned to host)

200 . 10 . 11 . 100 11111 = 200 . 10 .11 . 159 (Reserved for DBA)

0 votes

Reusing Todd Lammle's method (CCNA) here, which I used in another answer.

$/27$ bits turned on is $255.255.255.224$. Thus $256 - 224 = 32$ is the block size for the last octet. So subnet addresses follow the pattern $200.10.11.0$, $200.10.11.32$, $200.10.11.64$, $200.10.11.96$, $200.10.11.128$, $200.10.11.160$ and so on.

Thus we can easily see that the given IP address is in the $200.10.11.128$ subnet, whose last valid host address is $200.10.11.158$. (as $200.10.11.159$ is the broadcast address).

$/27$ bits turned on is $255.255.255.224$. Thus $256 - 224 = 32$ is the block size for the last octet. So subnet addresses follow the pattern $200.10.11.0$, $200.10.11.32$, $200.10.11.64$, $200.10.11.96$, $200.10.11.128$, $200.10.11.160$ and so on.

Thus we can easily see that the given IP address is in the $200.10.11.128$ subnet, whose last valid host address is $200.10.11.158$. (as $200.10.11.159$ is the broadcast address).

52,345 questions

60,482 answers

201,809 comments

95,283 users