dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
2605
share rss forum feed

Network Guy
Premium
join:2000-08-25
New York
kudos:2
Reviews:
·Future Nine Corp..
·T-Mobile US
·Optimum Online

1 edit

Subnetting question

I'm doing the CCNA study guide. This is one of the questions and I'm stumped. Any help is appreciated.


You have a single Cisco 1841 router named Atlanta that connects to two subnets as shown in the network diagram. Your task in this lab is to subnet the 172.18.0.0/24 network to provide sufficient host addresses for both subnets while minimizing wasted IP addresses.

Complete the following tasks:

Choose a single subnet mask to use on both subnets. The mask should provide for enough host addresses without wasting IP addresses.
Configure the IP address on the two router interfaces as follows:
For FastEthernet0/0, use the second possible subnet and the last address on the subnet.
For FastEthernet0/1, use the third possible subnet and the last address on the subnet.
Enable both interfaces.
Save your changes to the startup-config file.




So since each subnet requires a broadcast and gateway address, subnet mask 255.255.255.192 or /26 not would suffice as it leaves only 6 host bits, or 32 valid IP addresses for that subnet when 33 IP addresses are needed (2n-2 or 32-2=30). The next appropriate subnet mask, or 255.255.255.128 or /25 leaves 7 host bits, or 64 valid IP addresses for that subnet, so it fulfills the requirement.

So why does the CCNA course say that a 255.255.255.192 subnet mask is sufficient?


cooldude9919

join:2000-05-29
kudos:5

255.255.255.224 /27 is 32 ips
255.255.255.192 /26 is 64 ips
255.255.255.128 /25 is 128 ips


Network Guy
Premium
join:2000-08-25
New York
kudos:2
Reviews:
·Future Nine Corp..
·T-Mobile US
·Optimum Online

Ahh..

So 1 + 2 + 4 + 8 + 16 + 32 = 63 IPs counting backwards in the host bit side of the octet.

So 128 + 64 = 255.255.255.192 subnet mask applicable in this example

How do I determine the second possible subnet using that subnet mask?



Paulg
Displaced Yooper
Premium
join:2004-03-15
Neenah, WI
kudos:1

Count by the number of IPs in your subnet, EG

for a /26, count by 64, so your subnets would be

172.18.0.0
172.18.0.64
172.18.0.128
172.18.1.0 , etc etc

The easiest way for me to remember how many IPs are in a given mask is to simply subtract the non-255 octet from 256.

EG, 256-192 = 64
--
Guilty or Innocent? You Decide... »Pub Games



contractor

@enta.net
reply to Network Guy

256 (8bits)
192 (7bits) splits the range in half = 128 addresses, minus host and net = 128
this is 2^8 minus 2^7 = 2^1 = 2. One over 2 = a half = 1/2 = 256/128

64 (5 bits).

From 256, or 8 bits. Half(7 bits), half(6 bits), half again (5 bits)= 256 -128 -64, what is left?

a /28 is 16 addresses. That's 1x2x2x2x2 or 2^4 (32-4 which is 2^4)
a /23 is 1000 and change. It's 2 old class C addresses, or 2^8 x 2

Everything is 2s, power of.

Google a logical subnet calculator and play with it. It will help you with this. It will also show you why a network address is what it is and a broadcast address is all ones for that subnet. Hint mask

A useful example is why is a /30 used for transport addresses? A /30 has 4 addresses in total. It's 2^32-2^30 = 2^2. Now two of those addresses are the broadvcst, the other is the network. In other words, one tells the interface where it belongs, the other how far it can reach. So only two are left.

You'll always end up with 2^mask -2 addressable hosts.

Good Luck!



alennon

@enta.net

2nd line, first three chars = 128, not 192


Network Guy
Premium
join:2000-08-25
New York
kudos:2
Reviews:
·Future Nine Corp..
·T-Mobile US
·Optimum Online
reply to contractor

said by contractor :

256 (8bits)
192 (7bits) splits the range in half = 128 addresses, minus host and net = 128
this is 2^8 minus 2^7 = 2^1 = 2. One over 2 = a half = 1/2 = 256/128
Ah so wait.. When figuring the network bits, it starts at 2 and increments in exponentials of two to 256, but when figuring the decimal subnet mask is 128+64+32+16+8+4+2+1?

I think this is what's screwing me up!

Network Guy
Premium
join:2000-08-25
New York
kudos:2
Reviews:
·Future Nine Corp..
·T-Mobile US
·Optimum Online
reply to contractor

said by contractor :

A useful example is why is a /30 used for transport addresses?
How about figuring out what the next possible subnet would be for a given subnet mask..

Say if I had a network address of 172.16.0.0 and a subnet mask of 255.255.248.0, it would start at 172.16.0.0, then 172.16.8.0, then 172.16.16.0, etc etc through 172.16.63.0, last possible IP address being 172.63.254.

And when figuring out how many possible network subnet addresses, I would subtract 256 from last network bit octet.. so 256-248, giving me 8 possible subnets.

Does this sound right?

cramer
Premium
join:2007-04-10
Raleigh, NC
kudos:9
reply to Network Guy

said by Network Guy:

So why does the CCNA course say that a 255.255.255.192 subnet mask is sufficient?
Because your math is wrong... xxx.192 (/26) is 6 bits. That far is correct. However 2^6 is 64, not 32. (256-192 = 64) And you lose 3 addresses to "overhead" -- all-zero (network), all-one (broadcast), and the router itself. So a /26 has room for 61 hosts.


phantasm11b
Premium
join:2007-11-02
reply to Network Guy

You should spend more time on subnetting. Trust me, you will be thankful you did. Check out »subnettingquestions.com/ for subnetting questions and answer.
--
"There are two American flags flying on the property I reside on. Anyone who tries to take them down will be rendered inoperative." -Lindy


cramer
Premium
join:2007-04-10
Raleigh, NC
kudos:9
reply to contractor

said by contractor :

192 (7bits) splits the range in half = 128 addresses ...
64 (5 bits).
...
... or 2^4 (32-4 which is 2^4)
a /23 is 1000 and change.
Damn you people suck at math.

192 is not 7 bits... 192 = 1100.0000b, or 6 bits -- 64 addresses (one quarter)
64 is 2^6 or 6 bits. (again)

/23 is 2 class C's (2 /24's) and it's exactly 512 addresses.

a.b.c.d/x -> x is a "prefix length". It's the number of bits in the address that matter to routing (i.e. the "network") ranging from 0 to 32, where 0 is "no bits matter" (a default route) and 32 is "all bits matter" (a single host)

A prefix and netmask are different ways of writing the same thing. "/24" is 255.255.255.0 [8+8+8+0=24] The size of a network (in total addresses) is the number of bits that "don't matter" -- [0+0+0+8]. So for various prefixes...
•/24 - 255.255.255.000 [0000.0000b] - 2^[32-24=8] = 256
•/25 - 255.255.255.128 [1000.0000b] - 2^[32-25=7] = 128
•/26 - 255.255.255.192 [1100.0000b] - 2^[32-26=6] = 64
•/27 - 255.255.255.224 [1110.0000b] - 2^[32-27=5] = 32
•/28 - 255.255.255.240 [1111.0000b] - 2^[32-28=4] = 16
•/29 - 255.255.255.248 [1111.1000b] - 2^[32-29=3] = 8
•/30 - 255.255.255.252 [1111.1100b] - 2^[32-30=2] = 4