Solved

Subnetting help

Posted on 2012-12-20
6
751 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
  • 3
  • 3
6 Comments
 
LVL 9

Accepted Solution

by:
gt2847c earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

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

Expert Comment

by:gt2847c
Comment Utility
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
Comment Utility
hmmm, thanks for the tip
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Creating an OSPF network that automatically (dynamically) reroutes network traffic over other connections to prevent network downtime.
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

743 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now