You can use the following logic algorithm to calculate a computer's broadcast address:
Broadcast address = (sub_net_mask AND IP_address) OR (NOT(sub_net_mask))
To calculate a broadcast address
For example, an IP address of 172.16.29.156 and a subnet mask of 255.255.0.0 would be expressed as follows:
IP address = 10101100.00010000.00011101.10011100
sub_net_mask = 11111111.11111111.00000000.00000000
Using AND, the concatenated result is as follows:
10101100.00010000.00000000.00000000
Using the IP address and subnet mask from Step 1, this is expressed as follows:
sub_net_Mask AND IP_address =
10101100.00010000.00000000.00000000 (171.16.0.0)
NOT (sub_net_mask)=
00000000.00000000.11111111.11111111 (0.0.255.255)
Using OR, together we get the following broadcast address:
172.16.11111111.11111111 = (172.16.255.255)
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|