How To Calculate Broadcast Address?
Case 1:
Consider an IP address of class A – 10.20.15.3 and the default subnet mask for class A is 255.0.0.0. In each octet, there are 8 bits. So now at bit-level we’ll perform an OR operation on ‘inverted’ Subnet Mask. See the below diagram :
Final Broadcast Address : 10.255.255.255
Case 2:
Consider an IP address of class C – 192.168.3.33 and the subnet mask given is: 255.255.255.248.
Perform same Bitwise OR operation on the given IP & subnet mask till 3rd octet.
But in the 4th octet as we can see its value is neither 0 nor 255 so we’ll have to take some ADDITIONAL STEPS :
- There is a total of 256 values for each octet (0-255). So we’ll subtract 248 from 256. 256-248 = 8.
- 8 here is called the multiplier. Now we have to determine how many multiples of 8 we need to come up with in order to obtain a value just GREATER than – 33 (4th octet in the given IP – 192.168.3.33).
- Checking multipliers of 8 (keep adding 8 until you get a number greater than 33) :-
- 8 + 8 = 16 (16 < 33)
- 16 + 8 = 24 (24 < 33)
- 24 + 8 = 32 (32 < 33)
- 32 + 8 = 40 (40 > 33)
- We got our answer – 40 which is immediate greater than 33 and is the multiplier of 8.
- Now, the next step is to subtract 1 from 40. 40-1 = 39. And put 39 in the last octet of our broadcast address and that’s the final broadcast address : 192.168.3.39
What is Broadcasting in Computer Network?
In computer network, there are various ways in which we can transmit data from one node to another node, one node to multiple node, and many node to many nodes. For each type of transmission, there’s a term associated with it. Let’s see their examples in brief :
- For node to node: ‘Unicast’ also known as POINT-TO-POINT communication. Example: cell phone conversation.
- When multiple POINT-TO-POINT communications are made its called – ‘Multicast‘. The message is received by only those hosts who choose to be a part of a multicast group. Example: Video conferencing, sending a message targeting number of people at at a time.
- One Node to ALL Nodes – Broadcasting. Today we’ll discuss broadcasting in depth.