Deduce "n" in (2)^n-2 <= max nb of hosts

I was playing with some of the test questions in the INTRO, and I stumbled more than once over something that goes slightly against my logic (which is probably twisted ;)), in regards to requirements mapped as an equation. Here is what I am talking about: there are questions phrased like "Plan the IP addressing and subnets in the network below, where a class B network x.y.0.0 is to be used, with the MAXIMUM number of hosts per subnet at 100" (my emphasis of MAXIMUM).

The way I interpret MAXIMUM is "no more than", which leads me to an equation like:

(2)^n - 2

Reply to
papi
Loading thread data ...

Hmmm - I tend to disagree with your formula interpretation of the requirements: I need NO MORE than k (or 100). Simplistically - if "n" is the number of bits reserved for the hosts part, the higher the n, the further away (upwards) I move from the desired k, when - in fact - I need AT THE MOST k. Your formula addresses MINIMUM k hosts ...

papi

Reply to
papi

Hi,

  1. maximum means : we don´t need more than k addresses (=number of hosts) in that net or subnet

  1. therefore, the number of assignable addreses needs to be k+2 (NWA+BCA)

  2. We´re now looking for n (as in 2^n-2) which gives us an address space that is bigger than the k+2 hosts we plan to put in that net.

In your formula, you just need to reverse

2^n-2 => k

where k in your example was set to 100.

DEF : 2^n is the available address space, where n is the number of bits used for host addresseing

DEF : 2^n-2 is the _assignable_ address space, because network address (NWA) and broadcast address (BCA) cannot be assigned to a host

If your totally confused now, throw something at me ;)

Later,

Don

papi wrote:

Reply to
Don Lope de Aguirre

Remember, you are designing a network for someone to use. Someone who doesn't know how to design it themselves. (or they wouldn't need you, would they?) Someone who will not be happy if it ever stops working for any reason. Once it's designed and installed, it would be a *very bad thing* if it broke in such a way that you had to re-do the design and start over. Running out of addresses is just such a problem, so you *always* ask up front for the maximum number of devices that they expect to connect. Once you've been given an answer, you can pretty much figure that you're committed to actually supporting that number of hosts, so use it as your minimum when selecting a subnet mask. That way, when they break it anyway six months later by adding even more devices without telling you, you will still have some credibility. (Of course, if you do a good job of monitoring in the meantime, you'll be able to predict when they'll hit the ceiling, and save yourself a big headache by planning what weekend you'll give up to do the upgrade...)

Reply to
Mike Dorn

I just hate thinking that what you just said above (i.e AT LEAST) is called a MINIMUM, not a MAXIMUM. Anyhow - I understand all the answers were along the same line as yours, though (you should think for the future ...., what if you need exactly 100..., etc.), while I was just stuck with the pure interpretation of (not even English-exclusive, or the more so) terms MAXIMUM and MINIMUM. But you must be right, 'cause so is the book, and I should think no further about the matter, and just do it "Cisco style".

Thanks everyone for putting up with this ;)

papi

Reply to
papi

You're over thinking the problem. If you need to have AT LEAST one hunred hosts, what is your answer? 64 certainly doesn't cut it, right? That's all there is to it.

Reply to
Hansang Bae

what they're saying is that they'll be connecting a maximum of 100 hosts to the network.

To configure the network to support 100 hosts you need to have more than 6 bits (62 available) so you go to the next step which is 7 bits (126 available). They may currently only have 60 hosts but you've covered yourself for the 100 that they stated and a little more, as we all know there's always something that's been missed off the count or extra devices are added that weren't thought of at the time.

Reply to
Mal

Hi papi,

being no mathematician, I interpret the formula as :

2^n-2 >= k

2^n-2 MUST BE BIGGER THAN k or EQUAL

2^n-2 is the number of assignable addresses k is the number of hosts you want to attach

about MIN/MAX :

k ist the MAX number of hosts you plan to attach, i.e. in your example you want to attach 100 hosts maximum, not 101 or so. There is no MIN, since you may attach 0, 1, 23, 42 or 100 hosts.

n is the MIN number of bits you need to spawn an address space that is big enough for k.

It all depends on the definition of minimum and maximum I guess.

Later,

Don

Reply to
Don Lope de Aguirre

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.