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
  • 1335
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 . 

 

Whoops, looks like something went wrong.

1/1 ErrorException in Filesystem.php line 111: file_put_contents(/var/www/html/storage/framework/sessions/SKMqO9rRQPegxEtwy8nYZ9gSPJnd8UsUusPT4IeN): failed to open stream: No space left on device

  1. in Filesystem.php line 111
  2. at HandleExceptions->handleError(2, 'file_put_contents(/var/www/html/storage/framework/sessions/SKMqO9rRQPegxEtwy8nYZ9gSPJnd8UsUusPT4IeN): failed to open stream: No space left on device', '/var/www/html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php', 111, array('path' => '/var/www/html/storage/framework/sessions/SKMqO9rRQPegxEtwy8nYZ9gSPJnd8UsUusPT4IeN', 'contents' => 'a:4:{s:6:"_token";s:40:"qFFAgQGV5o2GwyjBYFwyOCHVhKapFq2UQoc5EObZ";s:11:"viewed_urls";a:1:{i:0;s:85:"ip-is-12110-and-i-want-2-valid-ip-addresses-what-would-be-those-ips-and-how-to-get-it";}s:9:"_previous";a:1:{s:3:"url";s:113:"http://www.networkbulls.com/ip-is-12110-and-i-want-2-valid-ip-addresses-what-would-be-those-ips-and-how-to-get-it";}s:6:"_flash";a:2:{s:3:"old";a:0:{}s:3:"new";a:0:{}}}', 'lock' => true))
  3. at file_put_contents('/var/www/html/storage/framework/sessions/SKMqO9rRQPegxEtwy8nYZ9gSPJnd8UsUusPT4IeN', 'a:4:{s:6:"_token";s:40:"qFFAgQGV5o2GwyjBYFwyOCHVhKapFq2UQoc5EObZ";s:11:"viewed_urls";a:1:{i:0;s:85:"ip-is-12110-and-i-want-2-valid-ip-addresses-what-would-be-those-ips-and-how-to-get-it";}s:9:"_previous";a:1:{s:3:"url";s:113:"http://www.networkbulls.com/ip-is-12110-and-i-want-2-valid-ip-addresses-what-would-be-those-ips-and-how-to-get-it";}s:6:"_flash";a:2:{s:3:"old";a:0:{}s:3:"new";a:0:{}}}', 2) in Filesystem.php line 111
  4. at Filesystem->put('/var/www/html/storage/framework/sessions/SKMqO9rRQPegxEtwy8nYZ9gSPJnd8UsUusPT4IeN', 'a:4:{s:6:"_token";s:40:"qFFAgQGV5o2GwyjBYFwyOCHVhKapFq2UQoc5EObZ";s:11:"viewed_urls";a:1:{i:0;s:85:"ip-is-12110-and-i-want-2-valid-ip-addresses-what-would-be-those-ips-and-how-to-get-it";}s:9:"_previous";a:1:{s:3:"url";s:113:"http://www.networkbulls.com/ip-is-12110-and-i-want-2-valid-ip-addresses-what-would-be-those-ips-and-how-to-get-it";}s:6:"_flash";a:2:{s:3:"old";a:0:{}s:3:"new";a:0:{}}}', true) in FileSessionHandler.php line 83
  5. at FileSessionHandler->write('SKMqO9rRQPegxEtwy8nYZ9gSPJnd8UsUusPT4IeN', 'a:4:{s:6:"_token";s:40:"qFFAgQGV5o2GwyjBYFwyOCHVhKapFq2UQoc5EObZ";s:11:"viewed_urls";a:1:{i:0;s:85:"ip-is-12110-and-i-want-2-valid-ip-addresses-what-would-be-those-ips-and-how-to-get-it";}s:9:"_previous";a:1:{s:3:"url";s:113:"http://www.networkbulls.com/ip-is-12110-and-i-want-2-valid-ip-addresses-what-would-be-those-ips-and-how-to-get-it";}s:6:"_flash";a:2:{s:3:"old";a:0:{}s:3:"new";a:0:{}}}') in Store.php line 128
  6. at Store->save() in StartSession.php line 88
  7. at StartSession->terminate(object(Request), object(Response)) in Kernel.php line 216
  8. at Kernel->terminateMiddleware(object(Request), object(Response)) in Kernel.php line 187
  9. at Kernel->terminate(object(Request), object(Response)) in index.php line 58
  10. at require_once('/var/www/html/public/index.php') in index.php line 20