Computer Networks ip addressing


Question: 

So I have this exercise in one of my classes on network ip addressing. The problem is that i cant figure out how to complete the subnet bits and hosts bits..can anyone help me?

the number of hosts is 414, 189, 135 and 90...




2 Answers: 

Subnetting works in binary, with # of hosts being "binary -2". 32 and 31 bit subnets are practically useless, so start with 30. It's basically just inversed, subnets to hosts. Observe:

Subnet     Subnets         Hosts/Subnet
30          4194304          2
29          2097152          6
28          1048576         14
27           524288         30
26           262144         62
25           131072        126
24            65536        254
23            32768        510
22            16384       1022
21             8192       2046
20             4096       4094
19             2048       8190
18             1024      16382
17              512      32766
16              256      65534
15              128     131070
14               64     262142
13               32     524286
12               16    1048574
11                8    2097150
10                4    4194302
 9                2    8388606
 8                1   16777214

So when you're asked for a subnet to hold a # of hosts, just find the next size up. I.E.: 414 hosts would go on a /23 subnet. So 23 subnet bits, 9 host bits (32 bits altogether in IPv4).

Hope it helps!!

 

This is a very basic and important question in IP addressing and I would ask you to go through the Chapter-19 of Data Communications and Networking by Forouzan(4th Edition).It will help you to learn even more in a very intuitive language.I hope this helps.

 

More Articles


android - the app falls when i select a user from a SQLITE list and pass the ID to another activity

i have a minor problem here, the app i created makes the user adds contacts details of his own and can call them again by pressing on them from the listview and thier data should appear on the new activity to edit or delete themthe problem is that the app crashes when i select a contact....where did

scikit learn - How to reuse pickled objects in python?

I have pickled some of the objects so that I can reuse them later. For example, I pickled three different gradient boosting regressors that I wanted reuse later. However, when I tried to use transform method for the regressor, python complained that it needs to be fitted first. Below is the code:mod

r - How to look back a few rows higher to see if a condition is satisfied and then replace a cell accordingly

I have a dataframe whereby if a condition is satisfied, it looks a couple rows above to find a specific row with another string and replaces itself with that entire cell which had the string.Here is an Example:If "test" is detected in the type column, it looks up to 3 rows above for a row which cont


php - How can I protect our site from email subscription spamming?

Our site has email input field for service launch notification. We do not use this for newsletters, only for notification. So I tested our site for basic vulnerabilities and found out that our email list fills up with spam email addresses.I have this kind of php code to prevent spamming but still SO

php - Validating form text input as an integer?

I [think?] that all data sent through $_POST is a string. So if I want the user to enter an integer (per my example, I'm asking the user for hours in one box and minutes in another. It wouldn't make sense for them to say 2.5 hours and 22 minutes), how can I validate that?I do already have a solution

email - PHP mail function not working based on the body of the message

so on my server I tried running:mail('my@email.com', 'asdf', 'asklfdjksalfdsdaf I know I I know I');and PHP sent the mail perfectly....but then when I changed the message to mail('my@email.com', 'asdf', 'hahahahaa');it did NOT send the email to me....what can possibly cause this? the only thing that


apache spark - Scala - How to iterate over tuples on RDD?

I have an RDD that contains tuples like this (A, List(2,5,6,7)) (B, List(2,8,9,10))and I would like to get the index of the first element where a specific condition between value and index holds. So far I have tried this on a single tuple test and it works fine:test._2.zipWithIndex.indexWhere

Dose google play count insalls out of itself downloads?

I recently published my app in google play . The question is how google play show counts ?1 - All device that have google play installed and my apps too , total count of my apps install will show in play store .2 - Just all downloads that directly are downloaded from google play will be count .

c# - Regular expression to match a string that contains only numbers, not letters

My code is currently using the following Regex expression which matches on numbers:Regex numberExpression = new Regex(@"(?<Number>\d+)");This current works fine for input strings like "1", "100", "1a", "a1", etc....But I want to change it so it does NOT match when the input string contains a l

cookies - PHP Unique Computer ID

Is it possible for php(or javascript in the worst case) to create a unique id for a user that is not cookie or ip dependant. I have seen on myminicity.com that on each city the count only goes up once a day(it has a unique id for everyone i think) and even if I delete my cookies and refresh ip it st