Subnetting problem - Magic number

Answered Question
May 13th, 2012
User Badges:

Hi,


This is my IP address 174.121.14.165/23


/23  - 255.255.254.0

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Magic number is: 256-254=2

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Networks:

0

2

4

6

8

10

12

14

16 ...



Network address: 174.121.12.0  

Broadcast address: 174.121.13.255        (12+Magic number -1 = 12+2-1 =13)


Where is mistake?

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

Please help me,

Greetings.

Correct Answer by John Blakley about 4 years 10 months ago

Joni,


In addition to what Peter said, the "magic number" is considered your boundary. For example, if your address the magic number is 2. Multiples of 2 would be the starting network address for the next block:


172.121.2.0

172.121.4.0

172.121.6.0

etc.


The magic number is the starting boundary for that network, and the broadcast address is -1 less than the next starting boundary:


172.121.2.0 - 172.121.3.255 (broadcast) (256 - 1)


The useable addresses are calculated like:


254 (in the second octet) (11111110)


0 = There are 8 bits left in the 4th octet = 00000000


So together it's 11111110.0000000


There are 9 0s in the host portion of your mask, so you get 512 hosts per network. Then you take 512 - 2 leaving you with 510 useable addresses (172.121.2.1 - 172.121.3.254)


HTH,

John

Correct Answer by Peter Paluch about 4 years 10 months ago

Joni,


The magic number, as you call it, is indeed 2 in the third octet of the netmask. Hence, you need to round down the third octet of the IP address to the nearest integral multiple of 2 when calculating the network address. However, in the IP address 174.121.14.165, the "14" is already an integral multiple of 2 so you do not change it. Right?


Best regards,

Peter

Correct Answer by John Blakley about 4 years 10 months ago

Joni,


Your math is fine, but the network address that you have on your interface (your IP) will start at 174.121.14.0 - 172.121.15.255.


HTH,

John

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (3 ratings)
Loading.
lgijssel Sun, 05/13/2012 - 03:31
User Badges:
  • Red, 2250 points or more

Was your ip not in x.x.14.0?

Correct Answer
John Blakley Sun, 05/13/2012 - 04:53
User Badges:
  • Purple, 4500 points or more

Joni,


Your math is fine, but the network address that you have on your interface (your IP) will start at 174.121.14.0 - 172.121.15.255.


HTH,

John

trikantejabuka Sun, 05/13/2012 - 05:11
User Badges:

Thanks for the reply,


I know my IP address should be in the range 174.121.14.0 - 172.121.15.255, in my calculation

Network Address is: 174.121.12.0

Broadcast address is : 174.121.13.255, which is obviously wrong.


But I ask myself why, if I calculate correctly all.

Correct Answer
Peter Paluch Sun, 05/13/2012 - 05:38
User Badges:
  • Cisco Employee,

Joni,


The magic number, as you call it, is indeed 2 in the third octet of the netmask. Hence, you need to round down the third octet of the IP address to the nearest integral multiple of 2 when calculating the network address. However, in the IP address 174.121.14.165, the "14" is already an integral multiple of 2 so you do not change it. Right?


Best regards,

Peter

Correct Answer
John Blakley Sun, 05/13/2012 - 05:57
User Badges:
  • Purple, 4500 points or more

Joni,


In addition to what Peter said, the "magic number" is considered your boundary. For example, if your address the magic number is 2. Multiples of 2 would be the starting network address for the next block:


172.121.2.0

172.121.4.0

172.121.6.0

etc.


The magic number is the starting boundary for that network, and the broadcast address is -1 less than the next starting boundary:


172.121.2.0 - 172.121.3.255 (broadcast) (256 - 1)


The useable addresses are calculated like:


254 (in the second octet) (11111110)


0 = There are 8 bits left in the 4th octet = 00000000


So together it's 11111110.0000000


There are 9 0s in the host portion of your mask, so you get 512 hosts per network. Then you take 512 - 2 leaving you with 510 useable addresses (172.121.2.1 - 172.121.3.254)


HTH,

John

trikantejabuka Sun, 05/13/2012 - 10:15
User Badges:

Thank you all for  help, now I understand

Thank you!.


greeting from Bosnia

Actions

This Discussion