Solved

Subnetting help

Posted on 2012-12-20
6
752 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
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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Suggested Solutions

Configuring network clients can be a chore, especially if there are a large number of them or a lot of itinerant users.  DHCP dynamically manages this process, much to the relief of users and administrators alike!
Let’s list some of the technologies that enable smooth teleworking. 
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

863 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

25 Experts available now in Live!

Get 1:1 Help Now