Home / Route / Routing Theory / What is IPv4 address and Subnet Mask?

What is IPv4 address and Subnet Mask?

What is IPv4 address format?

First of all, what is ipv4 address? The format of the Ipv4 address is that it consists of a 32-bit address. All of these 32 bits, some of the bits host bits they represent the client devices on the network. Remaining bits represents the network it’s the network address or some people call it the address of the wire and there is the dividing line somewhere in the middle of the 32 bit that distinguishes between the network bits and the host bits. Imagine that string is of 32 bit if we cut that and makes it two. We can move a middle line to set the desired subnet mask appropriately. Let’s understand first how we write this? Just telling the single IP address like 10.1.1.2 it’s not really enough information to tell. Just IP address is not telling which part is the host and which part is for a network. You don’t know the network address by just seeing IP address all you need to know is subnet mask. Subnet mask explained below.

What is IPv4 address subnet mask explained

Internet protocol version 4(IPv4):

What is ipv4 address means and how we write it? When we write out the IP address we write in dotted decimal. For example, 10.1.2.3 and each of these number we represent as 8 binary bits. That’s how we get the total of 32 bits of an ipv4 network address. Some of the bits represent the network on which the host resides some the bits represents the host itself. We share the same network but we have different host addresses. We have to determine which of the bits representing the network and which of the bits representing the host we don’t know until we know the subnet mask. The subnet mask tells us where to put dividing line. And the subnet mask is written as a contiguous set of 1s followed by a contiguous set of 0s. The subnet mask is always contiguous.

Like in our case we have an IP 10.1.2.3 for this we have subnet mask 255.0.0.0 which means we have first 8 bits one and other 24 bits are zeros. The first 8 bit represents the network bits. The remaining 24 bits are the host bits which represents the devices on the network. It is critical to understand the subnet mask. Sometimes we only give IP address without subnet mask keep in mind that it is not complete information this does not completely tell what network this IP address resides on. We don’t know if it is a valid address or not unless we have subnet mask information. There are different ways of writing out subnet mask information.

Subnet Mask Explained:

One way to write this using prefix notation. We are giving a slash after IP address followed by the number network bits like we have 10.1.2.3/8. There is another way to write subnet mask is by the dotted decimal notation much like as IP address. It’s going to be four numbers separated by dots. We have 8 binary 1s and other 24 bits are 0s. So the 8 binary 1s are equal to the 255 in decimal and other bits are zeros. Therefore, subnet mask becomes 255.0.0.0 so the complete IP address becomes 10.1.2.3 255.0.0.0 in dotted decimal notation. These approaches are perfectly valid for communicating it not just tell only IP addresses information but also subnet mask information. Now we have drawn a line between network bits and host bits so we now able to write out network address. We want all of the host bits on the specific network to belong to one common network address space.

What is IPv4 address subnet mask explained 2

What would be the network address of the previous IP address 10.1.2.3/8. So the network address become 10.0.0.0 question is how we know that? The rule is quite simple we have set all the host bits to zeros.  And we have determined the host bits from the subnet mask as we have 255.0.0.0 subnet mask so we have last 24 bits equal to zero. We have changed our IP by setting the last 24 bits to zeros. Network address with prefix notation 10.0.0.0/8 or in decimal notation as 10.0.0.0 255.0.0.0. This is the fundamental of the subnet which is explained here and If you want to know more about subnet mask explained click here.

Bottom Line:

  1. A 32-bit address commonly written in dotted decimal notation.
  2. A subnet mask is a 32-bit binary string that divides the network bits from the host bits.
  3. Uses a forward slash, followed by the number of network bits, to identify the subnet mask being used.
  4. Ip address with no subnet mask: 10.1.2.3
  5. Ip address with prefix notation: 10.1.2.3/8
  6. 8 binary 1s ( 11111111) is equal to 255
  7. Ip address with dotted decimal notations: 10.1.2.3 255.0.0.0
  8. Network address calculated by setting all of the host bits for given IP address to a 0.

This article describes basics of what is IPv4 address and what is subnet mask? After going through from this article I’m pretty sure you have got the answers to the above question like what is IPv4 address and how to write IPv4 address? And what is subnet mask ? How much subnet mask is important to tell with the IP address. Everything about the subnet mask explained in this article.

Some Related Articles.

Summary
What is IPv4 address and Subnet Mask?
Article Name
What is IPv4 address and Subnet Mask?
Description
When we write out the IP address we write in dotted decimal. For example, 10.1.2.3 and each of these number we represent as 8 binary bits. That's how we get the total of 32 bits of an ipv4 network address. Some of the bits represent the network on which the host resides some the bits represents the host itself.
Author
Publisher Name
Learn Computer Networking
Publisher Logo

Check Also

How to Convert Decimal to Binary?

Decimal to Binary How we route a packet from one network to other network or …

Leave a Reply

Your email address will not be published. Required fields are marked *