Finding DBA from given IP address

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.


  1. First we need to recognize the class of the IP address.
  2. Then according to the class of IP address, every class has a mask.
  3. There after we need to find the Net Id which is obtained by doing the bitwise AND of IP and mask.
  4. Then from obtained Net Id we can obtained the DBA of that network.

Above method can be illustrated by the following example:

Given, IP =
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 =
  • Step-3: In this step Net Id is calculated by doing bitwise AND of IP ( and mask (
    201 & 255 = 201
    55 & 255 = 55
    63 & 255 = 63
    123 & 0 = 0
    Hence, Net Id = 
  • Step-4: Since Net Id =
    First host =
    Second host =
    Last host = 

    And, DBA of network =

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.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to 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.

Article Tags :
Practice Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.