Ok so I'm new to networking and trying to get my head round subnetting.
I find the method below works ok but I don't understand how broadcast address ends with 255. Is it always 255? How do you work this out please.
IP 172.21.92.254
Subnet mask 255.255.240.0
Network ID 172.21.80.0
1st host ID 172.21.80.1
Last host ID 172.21.95.254
Broadcast ID 172.21.95.255
Network ID = 172.21.80.0 = as subnet mask is 255.255.240.0 then the network ID is 172.21 as 0 is at the end of the network ID as anything other than 255 or 0 becomes a problem, in this case 240.
Take 240 from 256 leaves 16 (magic number), going up in multiples of 16 until you pass 92 so 16, 32, 48, 64, 80, 96 so the missing host ID within the network ID is 80 (interesting number).
Broadcast ID = 172.21.95.255 = concentrate on the ‘interesting’ number (80) and add the ‘magic’ number (16) to it and minus 1 = 80+16-1 = 95
First host ID = 172.21.80.1 = add 1 to the last number of the network ID (172.21.80.0)
Last host ID = 172.21.95.254 = minus 1 to the last number of the broadcast ID (172.21.95.255)
I find the method below works ok but I don't understand how broadcast address ends with 255. Is it always 255? How do you work this out please.
IP 172.21.92.254
Subnet mask 255.255.240.0
Network ID 172.21.80.0
1st host ID 172.21.80.1
Last host ID 172.21.95.254
Broadcast ID 172.21.95.255
Network ID = 172.21.80.0 = as subnet mask is 255.255.240.0 then the network ID is 172.21 as 0 is at the end of the network ID as anything other than 255 or 0 becomes a problem, in this case 240.
Take 240 from 256 leaves 16 (magic number), going up in multiples of 16 until you pass 92 so 16, 32, 48, 64, 80, 96 so the missing host ID within the network ID is 80 (interesting number).
Broadcast ID = 172.21.95.255 = concentrate on the ‘interesting’ number (80) and add the ‘magic’ number (16) to it and minus 1 = 80+16-1 = 95
First host ID = 172.21.80.1 = add 1 to the last number of the network ID (172.21.80.0)
Last host ID = 172.21.95.254 = minus 1 to the last number of the broadcast ID (172.21.95.255)