IP Addressing (Part-02)

 IP Addressing:

Part-02

All IPv4 IP addresses can be divided into two major groups

public, or global, or external 

            - this group can also be called 'WAN addresses' — those that are used in the Internet, 

private, or local, or internal addresses 

           - those that are used in the local network (LAN).


There are also special-use addresses, intended for technical purposes such as protocol functions etc. Normally these re not exposed to a user at all.


Note:

The IP address range for APIPA is 169.254.0.1 through 169.254.255.254. The client also

confi gures itself with a default Class B subnet mask of 255.255.0.0.

However, when you’re in your corporate network and you’re running a DHCP server,

and your host displays that it is using this IP address range, this means that either your

DHCP client on the host is not working or the DHCP server is down or can’t be reached

because of a network issue. For example, if you plug a DHCP client into a port that is

disabled, the host will receive an APIPA address. I don’t know anyone who has seen a host

in the APIPA address range and been happy about it!


So, now we have to understand by seeing - is it a private or public IP.

Let's check guys. OK?

1st - we will check Private IP range. If we can identify - Given IP is in private IP range, then easily we can say-it is a private IP. But if given IP is not in private IP range, then we can say that - it is a Public IP. Right guys?

What is our Private IP range?

So, if any IP is in those  range, we will say - that is a Private IP. 
 

  

##  Suppose - you have an IP - 192.168.12.200. This IP is Private or Public?

     Steps - 01 : Identify the class.

           First - we will see the first Octet of given IP. Here first Octet digit is - 192. So it is a Class-C IP Address.

    Step - 02 : Look at range chart and take decision - it is Private or Public.

          Now we will see at chart of private IP range. After seeing, we got the range 192.168.0.0 - 192.168.255.255

    So, our given IP's 1st Octet is same as private IP range of Class-C. 

          our given IP's 2nd Octet is same as private IP range of Class-C.

          our given IP's 3rd Octet is true as private IP range of Class-C. Because 12 is include in 0 - 255

          our given IP's 4th Octet is true as private IP range of Class-C. Because 200 is include in 0 - 255

So, 192.168.2.200  -  is a Private IP.

Very easy, right ? So smile dear guys.😀😀😀☝

## Another Example.

  Suppose - you have an IP - 192.160.12.200. This IP is Private or Public?

 Our given IP is - Class - C  [First Step]

 So our target range will be -> 192.168.0.0  -  192.168.255.255  [Second Step]

 Now, our given IP's 1st Octet is same as private IP range of Class-C. 

Our given IP's 2nd Octet (160) is false  as private IP range of Class-C.Because  160  is out of range 168 - 168 .

 No need to see others Octets any more. Because we have got mismatch with our private IP Range.

So, 192.160.12.200  is a Public IP.

Very easy, right ? So smile again dear guys.😀😀😀☝

## Now another Example.

Suppose - you have an IP - 172.15.25.200. This IP is Private or Public?

 Our given IP is - Class - B  [First Step]

 So our target range will be -> 172.16.0.0 - 172.31.255.255  [Second Step]

 So, our given IP's 1st Octet is same as private IP range of Class-B.

Our given IP's 2nd Octet (15) is false  as private IP range of Class-B.Because 15 is out of range 16-31

So,no need to see others Octets any more. Because we have got mismatch with our private IP Range.

So, 172.15.25.200  is a Public IP.

Very Very easy, right ? So smile again dear guys.😀😀😀☝


## Now another Example.

Suppose - you have an IP - 172.30.25.200. This IP is Private or Public

Our given IP is - Class - B  [First Step]

So our target range will be -> 172.16.0.0 - 172.31.255.255  [Second Step]    

Our given IP's 1st Octet is same as private IP range of Class-B. 

Our given IP's 2nd Octet is True as private IP range of Class-B. Because 30 is in present in the range of 16 - 31.

 Now,no need to see others Octets any more. Because other Octets will be present obviously in 3rd Octet & 4th Octet. Because any digit will be in  0 - 255. 

So, 172.30.25.200  -  is a Private IP.

Very Very Very easy, right ? So again smile dear guys.😀😀😀☝

=========================================================================

Now, we will learn about "SUBNET  MASK"

Let's say, we have some SIM numbers of different different operators.Like-

01982672499   -  Banglalink

01712345678   -  Grameen

we can identify very easily that which SIM number of which operator. Right? But HOW?

     We know that - 

                019  - it is for Banglalink

                017  - it is for Grameen

That means - seeing first some digits, we can say it easily. Right Guys?

If I want to buy a Banglalink SIM, we can not get a number with 017.  again 

If I want to buy a Grameen     SIM, we can not get a number with 019 . 

But WHY? 

Because these are code of those operators & those are fixed/not changeable for corresponding operators. Agree Guys? As well as, by those code number we can identify any number for which network (Operator). 

If 019 see - we say it is Banglalink Network , If we see 017 - we say it is Grameen Network.

Now,

   Rest of digits are changeable. Like - If I want to buy a Banglalink SIM, my code will be start  019 but rest of digits I can get option to choose(Based on Availability).We can change those digits. Means - Those digits for us means HOST.

Let's Say -   I can get 019 12345678

                    I can get 019 111111111

                    I can get 019 22222222

Here we are seeing, 2 parts of my SIM number.

 First Part is Fixed/Network(019)

Second Part is Variable/Host(111111111)

  Network Part  +    Host Part   =  A SIM Number.

At the same way , an IP Address has 2 Parts.

  Network Part  +    Host Part

  (Fixed Part)       (Variable Part)

 So finally we can say, for an IP Address

  Network Part  +    Host Part    =   32 bits

Like = 192.168.100.200   is an IP address.But how we can identify the Network Part & Host Part of this IP?

By which, We can solve this problem, means to identify the Network Part & Host Part of an IP address is called  "SUBNET MASK" . Subent Mask is a 32 bit addresses.

SM = Subnet Mask

SM is written by 2 ways

(1) We can write SM by Dotted Decimal Value

(2) We can write SM by "/" (Slash Notation)

So how we can mention SM?  

        192.168.100.200 /24                                 or                             192.168.100.200     255.255.255.0

Here, /24  and  255.255.255.0    both are   Subnet Mask.

What we are understanding from this SM?

By  /24 means , 

 First 24 bits are Network bits or  first 3rd Octets are Network Parts. 

 Rest of 8 bits are Host bits or rest of last Octet(4th Octet)  is Host Part

Confusion?

Again we are taking an example for you guys. Ok? No worried.

Let's say  - 172.16.100.50 /20    or      172.16.100.50   255.255.240.0

Here, First 20 bits are Network bits and rest of bits means 12 bits are Host bits

Confusion about 12 bits?  we know an IP address is consist of 32 bits. If 20 bits are Network bits, then 30 - 20 = 12 bits are rest. These 12 bits are Host bits. 

Now I think clear guys?

But little bit confusion about Octet? Ok. No issue this at all

/20  or  255.255.240.0  Means 20 bits are Network bits. Here First 2 Octets are combination of 8+8=16 bits. So for taking /20, we need more 4 bits which are in 3rd Octet., Remember, 3rd Octet are not full Network bits. first 4 bits of 3rd Octet are Network bits.


Now another confusion are arising in your mind. That is - how we can write /20 = 255.255.240.0. Right?

See--

/20 Means first 20's 1. Rest of bits will be 0.So

                                1111111.1111111.11110000.00000000

                                     255    .   255    .     240     .       0     = /20

Another Example- If I have SM  /27. What will be this in form of Decimal format?

/27  means  first 27's 1

              11111111.1111111.11111111.11100000

                   255   .     255  .      255   .     224    =/27

Now, check your understanding.

Try to solve these

Convert SM from /(Slash Notation) to Dotted Decimal 

(1) /18            (2) /30            (3) /23           (4) (/28)            (5) /14            (6) /25 

            *** Please do not see the answers of thee. After solving see the answers. ***










Ans:

(1) /18  = 255.255.192.0

(2) /30  = 255.255.255.252        

(3) /23  = 255.255.254.0

(4) /28  = 255.255.255.240

(5) /14  = 255.252.0.0

(6) /25  = 255.255.255.128 


What are the meaning of these,guys?Please guide me. Am I Wrong or Right?Please see at below:

(1) /18  = 255.255.192.0 = First 18 bits are Network bits and rest of 14 bits are Host bits


(2) /30  = 255.255.255.252 = First 30 bits are Network bits and rest of 2 bits are Host bits


(3) /23  = 255.255.254.0 = First 23 bits are Network bits and rest of 9 bits are Host bits


(4) /28  = 255.255.255.240 = First 28 bits are Network bits and rest of 4 bits are Host bits


(5) /14  = 255.252.0.0 = First 14 bits are Network bits and rest of 18 bits are Host bits


(6) /25  = 255.255.255.128 = First 25 bits are Network bits and rest of 7 bits are Host bits

        

 Now, very important things , we will discuss. 

Are you boring guys? Please take some refreshment. ✋✋✋

By default, Subnet Mask is given for classes

Class A :  /8       or      255.0.0.0

Class B : /16      or      255.255.0.0

Class C: /24        or      255.255.255.0


Means: 

All Class A Classful IP Addresses have an 8 bit subnet mask (255.0.0.0).

All Class B Classful IP Addresses have a 16 bit subnet mask (255.255.0.0).

All Class C Classful IP Addresses have a 24 bit subnet mask (255.255.255.0).

One more important thing, we will discuss now guys.

We have known from above discussion that, Network bits are fixed. They are not changeable. So we do not work with network bits. As Host bits are not fixed & it is changeable so we will work with Host Bits.

So our main concern will be host bits.

Again remember please : /28 means 28 bits network bits and rest of 4 bits are host bits.

Now, suppose you have 2 bits. By these 2 bits, how many digits you will get?

                0  0     = 0

                0  1     = 1

                1  0     = 2

                1  1     = 3

So from 2 bits, we will get 4 digits (0-3) . 

Now, suppose you have 3 bits. By these 3 bits, how many digits you will get?

            0    0  0    = 0

            0    0  1    = 1

            0   1   0    = 2

            0   1  1     = 3

            1   0  0     = 4   

            1   0  1     = 5

            1   1  0     = 6 

            1   1  1     = 7 

So from 3 bits, we will get 8 digits (0-7) .

So, what is the formula of this?

                                                         Formula is :   


    Here h = Number of Bits

So, if you have 2 bits, your digits will be 4 according to formula. Because here h=2.

    Digits = 2^2  = 4

      if you have 3 bits, your digits will be 8 according to formula. Because here h=3.

    Digits = 2^3  = 8

Very Simple.

Now--- 

come to our point.At IP Addressing we will not digits, we will say IP. Please tell me now, if you have 7 bits, how many IP we will get?

Very Simple. Right. Are you laughing for  asking you such kind of foolish question? Please pardon me guys.But say please.

Simply you will say - 


We will get 128 IP

I hope now you are clear guys.
Now,
let's assume an IP Address with Subnet Mask:
              192.168.100.100/24
Here, First 24 bits are fixed. We will not be able to work with these bits. We will work with rest of 8 bits. So here we will get the number of IP is - 2^8 = 256

How we will get these IPs?
192.168.100     these 3 Octet's are fixed. We have 8 bits.
Minimum Value of 8 bits are   = 0        [All 8 bits will be 0]
Maximum Value of 8 bits are  = 255     [All 8 bits will be 1]

            0    0    0    0    0    0    0    0    =   0

            1    1    1    1    1    1    1    1    =   255

Total IPs are here = 256  [0-255]

IPs will be 

    192.168.100.0

    192.168.100.1

    192.168.100.2

    192.168.100.3

    ......................

    ......................

    ......................

    ......................

    192.168.100.253

    192.168.100.254

    192.168.100.255

Remember that, we are not using the first 3 octets.We only are working with last Octet.



================================================

***********************  Related Links ***********************

Cisco Software:

https://itbd-training.blogspot.com/2020/10/cisco-packet-tracer-7.html


IP Addressing-1

https://itbd-training.blogspot.com/2020/10/addressing-ip-address-or-logical.html


IP Addressing-2

https://itbd-training.blogspot.com/2020/11/addressing-part-02-all-ipv4-ip.html


Router Basic Configuration:

https://itbd-training.blogspot.com/2020/11/setting-ip-address-there-are-mainly-3.html



Static Route Configuration:

https://itbd-training.blogspot.com/2020/11/static-routing-configuration-video-link.html


DHCP Relay Agent:

https://itbd-training.blogspot.com/2021/06/lab-dhcprelay-agent-our-objectives-1.html







Comments

Post a Comment

Popular posts from this blog

Some Questions for MTCNA Exam

ডিপ্লোমা লেভেল এর ইন্ডাস্ট্রিয়াল এটাচমেন্ট এ আসার পূর্বে একটু ভেবে আসার অনুরোধ রইলো