SAGARFIVE

Advanced Networking

IPv4

IP : Internet Protocol : used for addressing internet enabled devices, Types : ipv4 ,ipv6


IPv4 :

– 32 bit unique addressing of computer network. We can get max of 4billion IP’s including public & private .
– IPv4 is means 4 octets binary number

IP DecimalBinary Value
192.168.1.10111000000.10101000.00000001.01100101
IP DecimalOctet 1Octet 2Octet 3Octet 4
192.168.1.10111000000.10101000.00000001.01100101

Unlike the decimal number system where we use the digits 0 to 9 to represent a number, in a binary system, we use only 2 digits that are 0 and 1 (bits). 

Finding Binary value of 192.168.1.101:
192 : Divide 192 by 2. Use the integer quotient obtained in this step as the dividend for the next step. Repeat the process until the quotient becomes 0.

DividendRemainder
192/2 = 960
96/2 = 480
48/2 = 240
24/2 = 120
12/2 = 60
6/2 = 30
3/2 = 11
1/2 = 01

Note : Write the remainder from bottom to top i.e. in the reverse chronological order. This will give the binary equivalent of 192.

Therefore, the binary equivalent of decimal number 192 is 11000000.


168 : Divide 168 by 2. Use the integer quotient obtained in this step as the dividend for the next step. Repeat the process until the quotient becomes 0.

DividendRemainder
168/2 = 840
84/2 = 420
42/2 = 210
21/2 = 101
10/2 = 50
5/2 = 21
2/2 = 10
1/2 = 01

Value : Write the remainder from bottom to top i.e. in the reverse chronological order. This will give the binary equivalent of 168.

Therefore, the binary equivalent of decimal number 168 is 10101000.


1 : Divide 1 by 2. Use the integer quotient obtained in this step as the dividend for the next step. Repeat the process until the quotient becomes 0.

DividendRemainder
1/2 = 01

Value : Write the remainder from bottom to top i.e. in the reverse chronological order. This will give the binary equivalent of 1.

Therefore, the binary equivalent of decimal number 1 is 1.


101 : Divide 101 by 2. Use the integer quotient obtained in this step as the dividend for the next step. Repeat the process until the quotient becomes 0.

DividendRemainder
101/2 = 501
50/2 = 250
25/2 = 121
12/2 = 60
6/2 = 30
3/2 = 11
1/2 = 01

Value : Write the remainder from bottom to top i.e. in the reverse chronological order. This will give the binary equivalent of 101.

Therefore, the binary equivalent of decimal number 101 is 1100101.


Grabbing 4 octets at one place:

IP DecimalOctet 1 @ 192Octet 2 @ 168Octet 3 @ 1Octet 4 @ 101
192.168.1.10111000000.10101000.00000001.01100101

To Indicate 4 octets, we have to separate them with full stop .

IP DecimalBinary Value
192.168.1.10111000000.10101000.00000001.01100101


Binary to Decimal : Sum the values of Decimals where binary value is 1.

What is the decimal value of IP address : 11001001.10101000.00000001.01100101 = ?

Power of two2726252423222120
Decimal1286432168421
Binary bits11000000128+64= 192
10101000128+32+8=168
000000011=1
0110010164+32+4+1=101

110000.10101000.00000001.01100101 = 192.168.1.101