Open In App

How do You Determine the Subnet ID?

Last Updated : 24 Apr, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

Answer: To determine the subnet ID we use the given IP address and subnet mask of the network. First, we have to find the subnet ID of the network and then convert both the IP address and subnet ID to its binary form. Perform bitwise AND operation on IP address and subnet ID. The result gives us the subnet ID to which the IP address belongs to.

Subnet Mask: The number in which all the network bits are 1 and host bits are 0 is called subnet mask.

Subnet ID: The subnet to which the given IP address is present is called as subnet ID.

Steps To Determine the Subnet ID

Below are the steps to determine the subnet ID.

  • First determine the subnet mask of the given network.
  • Then, convert both the subnet mask and the IP address to its binary form.
  • Perform bitwise AND operation of IP address and subnet mask.
  • The result gives the subnet ID.

Example

Consider an IP address 45. 10. 14. 20 / 25. Find the subnet ID.

Solution:

First find the subnet mask. So, the subnet mask of the given IP  45. 10. 14. 20 / 25 is 255. 255. 255. 128 as we have 25 network bits.
Convert both the IP address and the subnet mask into its binary.
IP address = 00101101. 00001010. 00001110. 00010100
Subnet Mask = 11111111. 11111111. 11111111. 10000000
Perform bitwise AND operation we get
Subnet ID = 00101101. 00001010. 00001110. 00000000
Converting subnet ID to its decimal form
Subnet ID = 45. 10. 14. 0

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads