Direct Broadcast Address (DBA):
Two addresses are subtracted from the number of hosts in each network because one is used for Net Id and other one is used for DBA of the network.
In this article we are going to discuss how to find out DBA of a network if a IP address is given. Following is the procedure of finding it.
- First we need to recognize the class of the IP address.
- Then according to the class of IP address, every class has a mask.
- There after we need to find the Net Id which is obtained by doing the bitwise AND of IP and mask.
- Then from obtained Net Id we can obtained the DBA of that network.
Above method can be illustrated by the following example:
Given, IP = 22.214.171.124
And, we have to find the DBA of the network.
- Step-1: It can be recognized that this IP belongs to Class C.
- Step-2: Mask of Class C = 255.255.255.0
- Step-3: In this step Net Id is calculated by doing bitwise AND of IP (126.96.36.199) and mask (255.255.255.0).
201 & 255 = 201 55 & 255 = 55 63 & 255 = 63 123 & 0 = 0 Hence, Net Id = 188.8.131.52
- Step-4: Since Net Id = 184.108.40.206
First host = 220.127.116.11 Second host = 18.104.22.168 . . . Last host = 22.214.171.124
And, DBA of network = 126.96.36.199
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Alternate method to find DBA from given IP address
- Difference Between Network Address Translation (NAT) and Port Address Translation (PAT)
- Difference between MAC Address and IP Address
- Difference between 3-address instruction and 1-address instruction
- Difference between 3-address instruction and 0-address instruction
- Difference between 3-address instruction and 2-address instructions
- Difference between 2-address instruction and 1-address instructions
- Finding IP address of a URL in Java
- Java program to find IP address of your computer
- How DHCP server dynamically assigns IP address to a host?
- Program to determine class, Network and Host ID of an IPv4 address
- Types of Network Address Translation (NAT)
- C Program to find IP Address, Subnet Mask & Default Gateway
- How Address Resolution Protocol (ARP) works?
- Introduction of MAC Address in Computer Network
- C Program to display hostname and IP address
- Python | Remove leading zeros from an IP address
- Extracting MAC address using Python
- Address Resolution in DNS (Domain Name Server)
- Computer Organization | Instruction Formats (Zero, One, Two and Three Address Instruction)
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.