Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Subnetting help

Posted on 2012-12-20
6
Medium Priority
?
759 Views
Last Modified: 2012-12-20
Can anyone help me understand how to do this exercise? It's not homework, it's an exercise to help me with subnetting for my networking class. It's not to be turned in, I just a want to learn how to so this worksheet.
photo-1--8-.JPG
photo-2--6-.JPG
0
Comment
Question by:Mark_Co
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 9

Accepted Solution

by:
gt2847c earned 2000 total points
ID: 38712121
Subnetting is all about powers of two.  With IPv4 you have a 32 bit number or 4 octets (for ease of calculating).  The 32 bit IPv4 address is broken into two parts... The left most bits are the network, the rightmost bits are the host.  The subnet mask shows you where to break them.

Examples to allow you to work through your sheet:

A 255.255.255.0 mask indicates that there are 24 bits of network and 8 bits of address.  8 bits of address (2^8) gives you 256 addresses, but you take away two - one for the network and one for the broadcast.  That leaves you with 254 usable hosts.  

25 bits of network gives you 255.255.255.128 (11111111.11111111.11111111.10000000) leaving you 7 bits of hosts (2^7)or 128 addresses with 126 hosts.

So on and so forth down to two "special cases".  31 bits of network only leaves you with 2 possible addresses, the network and the broadcast with no usable addresses, so not useful for real networks (although can be used for access control lists and the like).  32 bits of network is a single address which can be used in special conditions like loopback addresses for routers that don't need a network per se, but allow you to use a single address efficiently.

For your worksheet, you will need to figure out how to create sub networks that allow 20 hosts.  Using powers of two, find the number of bits that will give you sufficient usable addresses to fit your 20 hosts within.  Remember to subtract two addresses for the network and broadcast.

2^2 = 4 addresses, 2 hosts
2^3 = 8 addresses, 6 hosts
2^4 = 16 addresses, 14 hosts
...

The paper gives you 24 bits of network and 8 bits of host so you have to divide up 256 addresses to have at least 5 subnets.

Once you've broken it up, the next part is to determine if two hosts are on the same network (do you have to go through a router or not).  The way a router determines this is to take the address and the mask to see if it is local to the network or not.  To calculate this by hand you have to use bitwise operations of Exclusive OR and AND.  Exclusive or functions like this:

1 XOR 1 = 0
1 XOR 0 = 1
0 XOR 1 = 1
0 XOR 0 = 0

AND works like this:

1 AND 1 = 1
1 AND 0 = 0
0 AND 1 = 0
0 AND 0 = 0

First you have to calculate the subnet address for the network.  To do so, you "AND off" the host bits by ANDing the subnet mask with the address:

132.241.158.130 in binary is:
10000100.11110001.10011110.10000010 AND with subnet mask of 255.255.255.0:
11111111.11111111.11111111.00000000
-------------------------------------
10000100.11110001.10011110.00000000
which is
132.241.158.0

Take another address you want to check and see if it's on the same network:
1.1.1.1 in binary is:
00000001.00000001.00000001.00000001 AND with subnet mask of 255.255.255.0:
11111111.11111111.11111111.00000000
-------------------------------------
00000001.00000001.00000001.00000000
which is
1.1.1.0

Last, exclusive OR the two networks.  If they're on the same network, you'll get a zero.  Anything else and you have to "route" it to that network.

10000100.11110001.10011110.00000000 132.241.158.0 XOR with
00000001.00000001.00000001.00000000 1.1.1.0
-------------------------------------
10000101.11110000.10011111.00000000          Non-zero, therefore not local, has to go through a router...

Hopefully this will get you started...


Just a note:

Even though your sheet says to assume classful addressing, nobody actually does that any more as has been (long since) replaced by CIDR (classless inter-domain routing) which simply allows you to subnet your ranges efficiently.  It's used mainly as "shorthand notation" for subnet masks rather than actual use.
0
 

Author Closing Comment

by:Mark_Co
ID: 38712123
Wow. I didn't even read it all but I can tell you really helped me out before I even took the time to read it. If I have any other Q's, will ask. Thanks!
0
 
LVL 9

Expert Comment

by:gt2847c
ID: 38712129
No problem.  BTW, if you're really getting into networking especially with IPv4, memorizing the powers of two up to 2^16 helps.  I thought my professor was kidding when he said that, but he was wasn't.
0
Plug and play, no additional software required!

The ATEN UE3310 USB3.1 Gen1 Extender Cable allows users to extend the distance between the computer and USB devices up to 10 m (33 ft). The UE3310 is a high-quality, cost-effective solution for professional environments such as hospitals, factories and business facilities.

 

Author Comment

by:Mark_Co
ID: 38712131
:). I'm just taking an intro networking class. I find it interesting though
0
 
LVL 9

Expert Comment

by:gt2847c
ID: 38712132
Get good at it and it can be a lucrative field... Especially with carriers and large corporations...  Network Engineers are at a premium at the moment.
0
 

Author Comment

by:Mark_Co
ID: 38712133
hmmm, thanks for the tip
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question