trying to understand cidr slash notation

viper92086

Gawd
Joined
Sep 3, 2002
Messages
963
Hey guys i'll be straight up and say i have no idea how to solve this and my professor is not the best help. I'm not looking for the right answer, but maybe some help. the problem goes as this:

An ISP has been assigned the address space 157.65.20.0/23. What is the maximum number of customers this ISP can support if each one of these customers needs 80 IP addresses? Provide the IP address assignment to each one of these customers using slash notation. If none of these customers uses subnetting, then what is the corresponding broadcast address of each customer’s network? All addresses must be provided in dotted decimal notation.


for the first question i got an answer of 6 customers. i got this by 2^9 = 512. 6 being the number of host ID bits. then i assume i loose two of those hosts from the broadcast address and the loopback address. so i'm left with 510 available hosts. 510/80 ~ 6 customers. then from here i'm stuck. i found some internet article of how the flash notation works but then i'm lost there because i can't just separate each section of ipaddresses. thanks guys
 
I won't give you the answer but I can tell you that your answer is incorrect (hint- the correct answer is much larger than 6).

Here's what you need to do, figure out the subnet mask for that network that gives you the 80 hosts per subnet, what you've figured out is the total number of hosts per subnet (510 hosts) but with that number of hosts you have 128 subnets (or customers). I won't give you the CIDR tutorial but if you search here or on google you can find one easily.

Once you convert your CIDR notation (/23) to a decimal notation (255.255.254.0) and then figure out the maximum number of subnets you can get with having at least 80 hosts (hint- there will be more than 80 hosts per subnet) that will give you the number of customers you can have as 1 subnet = 1 customer in your problem.

I realized I sort of rambled there but back when I was in school there was a nifty spreadsheet way to figure this out which I have since forgotten, perhaps someone else remembers. If you have a book for any type of basic networking class there should be help in there as well.
 
Ok, I came up with a different answer StarTrek4U. Given the requirements, each customer will need a block capable of supporting at least 80 hosts.

The answer I got, and my justification below


So to get at least 80 hosts, we need to find the number of bits required. I come up with 7 bits, which gives the customer 126 hosts to play with. Going from a /23 network, that brings us up to /30, leaving 2 bits available for the networks.

I came up with 4 as the maximum number of customers

 
Ahh yes, upon further review it turns out I was incorrect as well... lol, glad that networking class stuck with me... ;)
 
Subnetting the easy way!

CIDR:
When you've chosen a possible subnet mask for your network and need to determine the number of subnets, valid hosts, and broadcast addresses of a subnet that the mask provides, all you need to do is answer five simple questions:

How many subnets does the chosen subnet mask produce?
How many valid hosts per subnet are available?
What are the valid subnets?
What's the broadcast address of each subnet?
What are the valid hosts in each subnet?

At this point, it's important that you both understand and have memorized your powers of 2.

How many subnets? 2x = number of subnets. x is the number of masked bits, or the 1s. For example, in 11000000, the number of 1s gives us 22. In this example, there are 4 subnets

How many hosts per subnet? 2y- 2 = number of hosts per subnet. y is the number of unmakes bits, or the 0s. For example, in 1100000, the number of 0s gives us 26- 2 hosts. In this example, there are 62 hosts per subnet. you need to subtract 2 fro the subnet address and the broadcast address, which are not valid hosts.

What are the valid subnets? 256 - subnet mask = block size, or increment number. An example would be 256 - 192 = 64. The block size of a 192 mask is always 64. Start counting at zero in blocks of 64 until you reached the subnet mask value and these are your subnets. 0, 64, 128, 192. easy huh?

What's the broadcast address for each subnet? Now here's the really easy part. Since we counted our subnets in the last section as 0, 62, 128, and 192, the broadcast address is always the number right before the next subnet. For example, the 0 subnet has a broadcast address of 63 because the next subnet is 64. The 64 subnet has a broadcast address of 127 because the next subnet is 128. And so on. And remember, the broadcast address of the last subnet is always 255.

What are the valid hosts? Valid hosts are the numbers between the subnets, omitting the all 0s and all 1s. For example, if 64 is the subnet number and 127 is the broadcast address, then 65-126 is the valid host range-it's always the numbers between the subnet address and the broadcast address.

Practice Example for a Class B /23:
172.16.0.0 = Network Address
255.255.255.254.0 or /23 = Subnet

Subnets? 2^7 = 128
Hosts? 2^9 - 2 = 510
Valid Subnets? 256-254-0,2,4,6,8, etc up to 254
Braodcast address for each subnet?
Valid hosts?

Subnet 0.0 2.0 4.0 6.0 8.0
First Host 0.1 2.1 4.1 6.1 8.1
Last Host 1.254 3.254 5.254 7.254 9.254
Broadcast 1.255 3.255 5.255 7.255 9.255
 
benchi,

Nice guide, but when I first read it, I got confused because your numbers aren't working out. I was struggling to see why you're multiplying numbers and then I realized the forums isn't showing powers properly.

So those who's looking here for reference:
How many subnets? 2x = number of subnets. x is the number of masked bits, or the 1s. For example, in 11000000, the number of 1s gives us 22. In this example, there are 4 subnets
It's really 2^x = # of subnets, where ^ indicates "raised to the xth power".
"... the number of 1s gives us 2^2 [which equals 4]."

How many hosts per subnet? 2y- 2 = number of hosts per subnet. y is the number of unmakes bits, or the 0s. For example, in 1100000, the number of 0s gives us 26- 2 hosts. In this example, there are 62 hosts per subnet. you need to subtract 2 fro the subnet address and the broadcast address, which are not valid hosts.
Again, it's really (2^y) - 2.
"... the number of 0s gives us 2^6 - 2 [which equals 62]."

Hope this clears up any confusion.

edit: Just noticed that your example used "^". Perhaps you can edit your post to reflect "^" in your explanation too ?
 
A few things to remember:

1) a subnet mask (in binary) will always start with X number of consecutive 1's (determines number of network bits), followed by Y number of consecutive 0's (determines number of host bits)

2) your subnet size will always be a power of 2 (2^x)


example:

10.1.2.0/27 network becomes:

00001010.00000010.00000001.00000000 - network
11111111.11111111.11111111.11100000 - subnet mask (27 consecutive 1's = /27)
00001010.00000010.00000001.00011111 - broadcast

number of addresses = 2^(32-27) = 2^5 = 32
number of available host addresses = 32 - (network & broadcast) = 32 -2 = 30

Always remember that when written in this format, when the values above the consecutive 0's are all 0's themselves, it's the network address, and when they're all 1's, it's the broadcast address for that particular subnet.

hope that helps.
 
Subnetting the easy way!

CIDR:
all you need to do is answer five simple questions:

How many subnets does the chosen subnet mask produce?
How many valid hosts per subnet are available?
What are the valid subnets?
What's the broadcast address of each subnet?
What are the valid hosts in each subnet?

You sir have read or been to one of Todd Lammle's prep book / session.

Damn that was the best method of learning subnetting ever.
 
Back
Top