cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2196
Views
5
Helpful
5
Replies

Subnetting

jennifer26m
Level 1
Level 1

Ok so this is my first time dealing with CISCO. I am enrolled in CISCO 1 and I am having trouble with one specific part. How do you Assign an IP address and an network mask for an interface? And hhow do you assign an IP address, Netmask, and a gateway for a PC? now there are two routers with 9 subnets and 10 host for each. Address given is 192.168.32.0/24 Please help I feel so lost

5 Replies 5

burleyman
Level 8
Level 8

If you have 192.168.32.0 /24 you can subnet that down to get what you need.

If you have 2 routers connected you could sbnet it down so you only have the 2 IP addresses you need but you must remember if you need to USE 2 IP addresses you need to add one for the network address and one for the broadcast address so you would have to subnet it so you have at least 4 IP address. Here is a break down you could use to find what you need.

192.168.32.0 /25 = 128 IP address minus 2 for Network and Broadcast would leave 126 usable IP addresses.

192.168.32.0 /26 = 64 IP address minus 2 for Network and Broadcast would leave 62 usable IP addresses.

192.168.32.0 /27 = 32 IP address minus 2 for Network and Broadcast would leave 30 usable IP addresses.

192.168.32.0 /28 = 16 IP address minus 2 for Network and Broadcast would leave 14 usable IP addresses.

192.168.32.0 /29 = 8 IP address minus 2 for Network and Broadcast would leave 6 usable IP addresses.

192.168.32.0 /30 = 4 IP address minus 2 for Network and Broadcast would leave 2 usable IP addresses.

192.168.32.0 /31 = 2 IP address minus 2 for Network and Broadcast would leave 0 usable IP addresses.

192.168.32.0 /32 = 1 IP address minus 2 for Network and Broadcast would leave 0 usable IP addresses.

From the above you would use a mask of /28 to get your 10 usable IP addresses, and you would use /30 for use between your routers.

Below should help you further understand subnetting...

In subnetting the only thing you really need to memorize is…..

Mask - 128….192….224….240….248….252….254….255

And remember the number 256

Learn that and everything else is easy…..

Now let’s learn how to find the number of IP addresses for a subnet mask or CIDR notation.

Let’s say you want to know how many IP address you have given a subnet mask.

Mask – 255.255.255.224

Take 224 and subtract that from 256…. So 256 – 224 is 32, so that means you have 32 IP addresses available for the mask of 255.255.255.224. Now to find the assignable addresses you subtract 2 (one for the broadcast address and one for the network address) so you have 30 assignable IP addresses. Simple right?

Now let’s say they give you this mask, /29, well here is where that little memorization comes in. So let’s convert that to dotted decimal…. 255.255.255.248

Take 248 and subtract that from 256….. So 256 – 248 is 8, so that means you have 8 IP addresses available for the mask of 255.255.255.248 or /29, which in turn means there are 6 assignable IP addresses after you subtract the broadcast and network IP addresses. Easy right?

Done right? No! What if you see something like this?

255.255.240.0…… Now what! Well we just have to do one more thing.

Let’s use that .240. 0 and pretend the .0 does not exist so just think .240, now from the above work figure out the number of IP addresses for .240 which we would get by subtracting that from 256, remember? So 256 – 240 is 16. Now here is the “one more thing” you need to do. Take that 16 and multiply it by 256 (we use 256 because we are one octet up). So 256*16 is 4,096, and there you have the number of IP address available for the mask of 255.255.240.0 and just subtract the broadcast and network addresses and you have 4,094 assignable IP addresses.

Done right? No! What if you see something like this?

255.192.0.0……Now what! Well we just have to do two more things.

Let’s use that .192.0. 0 and pretend the .0.0 does not exist so just think .192, now from the above work, figure out the number of IP addresses for .192 which we would get by subtracting that from 256, remember? So 256 – 192 is 64. Now here is the “two more things” you need to do. First take 256*256 (we do 256 twice because we are 2 octets up) which is 65,536 now take 65,536 and multiply it by the 64. So 65,536*64 is 4,194,304, and there you have the number of IP address available for the mask of 255.192.0.0 and just subtract the broadcast and network addresses and you have 4,194,302 assignable IP addresses.

Done right? No! Last but not least, what if you see something like this?

248.0.0.0……Now what! Well we just have to do three more things.

For this we have to use 248.0.0.0 and then pretend the .0.0.0 does not exist so just think .248, now from the above work, figure out the number of IP addresses for .248 which we would get by subtracting that from 256, So 256 – 248 is 8. Now here is the “three more things” you need to do. First take 256*256 then take that result and multiply it by 256 (we do 256 three times because we are 3 octets up) which 256*256 is 65,536 now take 65,536 and multiply it by 256 and you get 16,777,216. Now you take 16,777,216 and multiply it by 8 from above and you get 134,217,728 and there you have the number of IP address available for the mask of 248.0.0.0 and just subtract the broadcast and network addresses and you have 134,217,728 assignable IP addresses.

Please say we are done now….my head hurts! Yes that should cover everything you need to find the number of IP addresses for a given mask. Now, thankfully you probably will not see any masks like the last example or the one previous either in real life or on any exams, at least not CCNA or CCNP. I gave those just to show how you can do it if someone decides to test your knowledge.

Now you say, well that is all well and good but what about wildcard masks! Easy I say!....well easy for “normal” wildcard masks. What you need to remember is wildcard masks are not just the inverse of subnet masks, they are and entity of their own.

For “normal” or inverse subnet masks just remember this, substitute all 255’s with 0’s and all 0’s with 255’s.

We will use the above four examples.

Example 1:

255.255.255.224 with 32 IP Addresses. To find the wildcard mask remember replace the 255’s with 0’s, now take the number of IP addresses and subtract 1 and place that where the 224 is. So you would get, 0.0.0.31, and there is your wildcard mask.

Example 2:

255.255.240.0 with 16 IP addresses. Remember substitute all 255’s with 0’s and all 0’s with 255’s so you have this 0.0.?.255 and the ? would be 16 – 1 which is 15. So you get a wildcard mask of 0.0.15.255, not bad right.

Example 3:

255.192.0.0 with 64 IP addresses. Now with the substitutions and subtract 1 from the IP addresses you get a wildcard mask of 0.63.255.255, you’re getting it, one more to go.

Example 4:

248.0.0.0 with 8 IP addresses. Again with the substitutions and subtract 1 from the IP addresses you get a wildcard mask of 7.255.255.255, now you got it, wildcard masking made easy.

Now, for the not so normal wildcard masks. Did you know this is a valid wildcard mask, 64.16.0.3

To look up more on these wildcard masks I found a good explanation at http://inetpro.org/wiki/wildcard_masks

Ok so what would be my network range with the address I provided Jennifer C

What are you being asked to do exactly? Do you have a diagram?

the IP address you provided is 192.168.32.0 /24 which is a class C network and goes from

192.168.32.0 to 192.168.32.255

192.168.32.0 is the network address

192.168.32.255 is the broadcast address

192.168.32.1 to 192.168.32.254 are usable IP addresses.

Mike

ok so this is the example we need to work on. I have two routers A and B that are connected both routers has 9 subnets and 10 host for each.

For each interface we are to assign an IP address and netmask. And for each PC we need to assign an IP address, netmask, and gateway. I know I am going to borrow 4 subnets which give me 16 subnets and 14 IP's. But how do I assign the IP's to the interface.

First we will do the routers. You have two routers and the link between them you only need 2 usable IP address so rather than waste a bunch you can use this..... 192.168.32.0 /30 (255.255.255.252) that would give you 4 IP address and 2 of those would be usable and would be as follows:

192.168.32.0 - Network Address

192.168.32.1 and 19.168.32.2 as usable IP Address and you would assign 192.168.32.1 to Router 1 and 192.168.32.2 to router 2

192.168.32.3 - Broadcast Address

now for the 9 subnets....you are correct as you stated above and they would be as follows.

the mask would be 255.255.255.240 or /28

IP address ranges would be...

192.168.32.4 to 192.168.32.19

192.168.32.20 to 192.168.32.35

192.168.32.36 to 192.168.32.51

192.168.32.52 to 192.168.32.67

192.168.32.68 to 192.168.32.83

192.168.32.84 to 192.168.32.99

192.168.32.100 to 192.168.32.115

192.168.32.116 to 192.168.32.131

192.168.32.132 to 192.168.32.147

The first IP address is the network IP address and the last one is the broadcast IP address.

You would assign the PC's IP address inbetween the network and broadcast address and the mask would be 255.255.255.240 or /28

The gateway would be the network address.

Mike

Review Cisco Networking products for a $25 gift card