Why am I wrong ?
thegame1234
Member Posts: 2 ■□□□□□□□□□
in CCNA & CCENT
Hello All
I have signed up in the hope that you will be able to tell me what I have done wrong on this question:
What IP address should be assinged to workstation a ?
workstation a
Switch
Router FA0/0 192.168.1.158/28
Now I say the answer is 192.168.1.144 but i am told the correct answer is 192.168.1.145 ??
My working out:
192.168.1.158 =11000000.10101000.00000001.10011110
255.255.255.240 = 11111111.11111111.11111111.11110000
Using anding I get the following:
192.168.1.144 = 11000000.10101000.00000001.10010000
How can it be 192.168.1.145 ??
Thanks for your help
I have signed up in the hope that you will be able to tell me what I have done wrong on this question:
What IP address should be assinged to workstation a ?
workstation a
Switch
Router FA0/0 192.168.1.158/28
Now I say the answer is 192.168.1.144 but i am told the correct answer is 192.168.1.145 ??
My working out:
192.168.1.158 =11000000.10101000.00000001.10011110
255.255.255.240 = 11111111.11111111.11111111.11110000
Using anding I get the following:
192.168.1.144 = 11000000.10101000.00000001.10010000
How can it be 192.168.1.145 ??
Thanks for your help
Comments

r_durant Member Posts: 486 ■■■□□□□□□□thegame1234 wrote:Hello All
I have signed up in the hope that you will be able to tell me what I have done wrong on this question:
What IP address should be assinged to workstation a ?
workstation a
Switch
Router FA0/0 192.168.1.158/28
Now I say the answer is 192.168.1.144 but i am told the correct answer is 192.168.1.145 ??
My working out:
192.168.1.158 =11000000.10101000.00000001.10011110
255.255.255.240 = 11111111.11111111.11111111.11110000
Using anding I get the following:
192.168.1.144 = 11000000.10101000.00000001.10010000
How can it be 192.168.1.145 ??
Thanks for your help
Ok, if the router's ip is 192.168.1.158/28, that means it falls in the 192.168.1.144 subnet and the valid ip range is .145 to .158. Therefore, 192.168.1.144 cannot be correct, because it is the subnet number and 192.168.1.159 is the broadcast address...
/28 means that 4 bits are being used for subnetting...i.e a .240 mask
256 240 = 16...therefore you have subnet blocks of 16
192.168.1.0
192.168.1.16
192.168.1.32
...
...
...
192.168.1.112
192.168.1.128
192.168.1.144
192.168.1.160
So we see that .144 is a subnet...and the valid range is as above. The workstation a can be abything from .145 to .157, since the router is already .158
The anding you did gives you the subnet number, not the workstation's ip address...you then need to workout the valid range based on the subnet number and subnet mask.
Hope that helps...CCNA (Expired...), MCSE, CWNA, BSc Computer Science
Working on renewing CCNA! 
penguinking Member Posts: 80 ■■□□□□□□□□Your mask is /28, which = 255.255.255.240. Therefore your block size is 16 (256240), and if you can count in 16's (I know you can ) then you'll get 192.168.1.144 as your subnet, and the first valid host as 192.168.1.145, which is what they got and (I assume) is the question they asked.
Hope that helped. 
thegame1234 Member Posts: 2 ■□□□□□□□□□Thank you very much for your help.
I guess I got the hard part of the question right (the working out) and forgot a simple rule at the end 
mgeorge Member Posts: 774 ■■■□□□□□□□144 is the subnet id for this network 192.168.1.158/28
subnet is 144, broadcast is 158
valid host would be 145157
If you want an explination
ip;
11000000.10101000.00000001.10011110
netmask
11111111.11111111.11111111.11110000
netid
11000000.10101000.00000001.10010000 = 144
broadcast
11000000.10101000.00000001.10011111 = 158
anything after the bits turned on in the netmask "the 0's" are the host bits
if you make them all 1's, is the broadcast, make them 0's and its network
Does this help?There is no place like 127.0.0.1 
gaby_978 Member Posts: 222mgeorge27 Posted: Tue Aug 21, 2007 4:23 pm Post subject:
144 is the subnet id for this network 192.168.1.158/28
subnet is 144, broadcast is 158
valid host would be 145157
i thought the broadcast address will be 159 since the next subnet is 160"If you spend too much time thinking about a thing,
you'll never get it done" 
NeonNoodle Member Posts: 92 ■■□□□□□□□□gaby_978 wrote:mgeorge27 Posted: Tue Aug 21, 2007 4:23 pm Post subject:
144 is the subnet id for this network 192.168.1.158/28
subnet is 144, broadcast is 158
valid host would be 145157
i thought the broadcast address will be 159 since the next subnet is 160
It is. His binary is good.I recognize the lion by his paw.
Jacob Bernoulli