Before going to our main topic Network Address, let's discuss about converting ip address dotted notation to a single decimal number.
This is the second post of networking I am sharing
Here is the first post link : Post1
Let's see how to convert ip address dotted notation to a single decimal number.
I think we all know how to convert binary number into a decimal number same process applies here also.
Example : let's convert binary number 1010 into decimal number.
1 0 1 0
2^3 2^2 2^1 2^0= 1*8 + 0*4 + 1*2 + 0*1
= 10
Here we use our base as 2 because binary Language has only two options either 0 or 1
But in Ip address, we can have 0 to 255 so our base is 256.
Let's convert 192.168.31.1 into single decimal.
192 168 31 1 256^3 256^2 256^1 256^0 192*256^3 + 168*256^2 + 31*256^1 + 1*256^0 = 3232243457
192.168.31.1 = 3232243457
We can use ip address as 192.168.31.1 or 3232243457 both are same.
Soo lets go to our main topic Network Address
The laptops, desktops, routers, switches etc.. are called network devices
Network devices having same network address fall into same network named as local area network (LAN)
We identify the network address using netmask
Ip : 192.168.31.1
Netmask : 255.255.255.0
In binary
Ip : 11000000 10101000 00011111 00000001
Netmask : 11111111 11111111 11111111 00000000
So we see continuous 1's in netmask, it's corresponding ip address bits are known as Network address.
In our example
11000000 10101000 00011111
11111111 11111111 11111111
These are the corresponding bits
Place 0's in last remaining bits, So our network address is
11000000 10101000 00011111 00000000
192.168.31.0
Thank you for reading the post
Follow me in LinkedIn and dev.to and share this post to your friends....
Β© images and extra resources can apply their copyrights
Top comments (0)