Ip is 12.1.1.0 and i want 2 valid ip addresses what would be those ips and how to get it?

author
  • Total 1 Answer
  • 1153
Can You answer this question?
author

Hello Vishav Mehta , 

As you mentioned here that subnet is 12.1.1.0 and you want 2 valid ip address which you can assign to any machine . To perform this task , you have to use subnet mask of /30 . By which block size is 4 and valid ip address are 2 because 1 is network and 1 is broadcast ip address .

                        12.1.1.0/30 

128     64      32      16      8       4      2        1 

1          1         1        1      1       1      1        1

1          1         1        1      1       1      1        1

1          1         1        1      1       1      1        1

1          1         1        1      1       1      0        0

By using /30 we have only 2 host bits . so we have only 4 possible values , which are as follows ----

                                         00  ----- 12.1.1.0/30         network  ip address  ( not assignable to any host ) 

                                         01  -----  12.1.1.1/30        valid ip address (1)   ( assignable to any host )

                                         10 ------ 12.1.1.2/30         valid ip address (2)    ( assignable to any host )

                                         11  ----- 12.1.1.3/30           broadcast ip address  ( not assignable to any host )

Hope it will be helpful for you .