[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Subnetting

Posted on 2005-04-06
23
Medium Priority
?
857 Views
Last Modified: 2010-04-10
Hi

Im doing a test in a few days and require help on subnetting, In the test we get given a Host IP and a subnet mask and we have to answer certain questions. Thus ive got to grips with most of the questions id like some help with the following.

Example       Host IP 192.168.2.50 (Class C )
                   Subnet Mask- 255.255.255.240


--Questions i require some help with

1.Subnet address for the given Host IP address
2.Range of host addresses for this subnet
3.Broadcast address for this subnet
4.Total number of useable subnets
5.Number of valid host IP addresses per subnet
6.Subnetwork address with slash (/) mas for the assigned subnet
7.Default Gateway ( first useable host address)


If somebody who could show me step-by-step how to answer the following questions that would be very helpfull.

Thanks



0
Comment
Question by:freshjada
  • 6
  • 5
  • 4
  • +4
20 Comments
 
LVL 5

Expert Comment

by:simonenticott
ID: 13717154
Hi,

try this little freeware program, it will calculate most of that info for you -

http://www.wildpackets.com/products/ipsubnetcalculator

Simon,
0
 
LVL 13

Expert Comment

by:gpriceee
ID: 13717188
1.Subnet address for the given Host IP address
192.168.2.50

2.Range of host addresses for this subnet
192.168.2.49-192.168.2.62

3.Broadcast address for this subnet
192.168.2.63

4.Total number of useable subnets
16

5.Number of valid host IP addresses per subnet
14

6.Subnetwork address with slash (/) mas for the assigned subnet
/28  (This means mask bits)

7.Default Gateway ( first useable host address)
192.168.2.49

Your answers are as above.  To explain would take a lot of space, so here's a good link to a solid explanation of how to do this: http://www.petri.co.il/subnetting_table.htm
0
 
LVL 1

Expert Comment

by:jajjones
ID: 13717191
1.

255.255.255.240 means that your subnets are 0, 16, 32, 48 etc etc (256-240)
So your .50 address is in the 192.168.2.48 subnet.........
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 1

Expert Comment

by:jajjones
ID: 13717202
2.
192.168.2.49 - 62
0
 
LVL 1

Expert Comment

by:jajjones
ID: 13717208
3.
192.168.2.63
0
 
LVL 1

Expert Comment

by:jajjones
ID: 13717229
6.

to work it out, take the last octet (240) and convert to binary. (11110000) Then the number of 1's is added to the default mask for C class (24) which gives 28 :-) just like gpricee got !
0
 
LVL 9

Expert Comment

by:fixnix
ID: 13717409
Here's an informative site explainig subnetting...wasn't quite the one I was looking for but should be worth poking around for you:

http://www.tcpipguide.com/free/t_IPSubnettingStep3DeterminingTheCustomSubnetMask.htm

Also, for #6, the terminology you're looking for is CIDR notation.  Google for CIDR notation and you'll find simple translation tables from decimal dot notation to CIDR and more in-depth sites explaining the whole decimal-binary conversion/mask-determination process.

In any subnet, the first IP address is the network address (192.168.10.0 is the network address for a network containing a machine at 192.168.10.200 if it's mask is 255.255.255.0.  CIDR for the same network would be 192.168.10.0/24, 192.168.10.128 is the network address for a network containing a machine at 192.168.10.200 if it's mask is 255.255.255.128 (CIDR notation for the latter would be 192.168.10.128/25))  The broadcast address is the highest IP address in the subnet...192.168.10.255 for both 192.168.10.0/24 and 192.168.10.128/25 networks)
0
 

Expert Comment

by:Babuchuck
ID: 13719052
-- gpriceee --

Your answer to question 1 is wrong as the subnet address for the specified ip address is 192.168.2.48.

The rest is correct.
0
 
LVL 13

Expert Comment

by:gpriceee
ID: 13719064
Agreed: "subnet address"
I was thinking host address for some reason--maybe my coffee was decaffinated :-)
0
 
LVL 1

Expert Comment

by:jajjones
ID: 13720437
This refers more to Variable Length Subnet Masking (VLSM) as opposed to CIDR (Classless Inter Domain Routing) although it still gets worked out the same - different octest that is all :-)
0
 

Author Comment

by:freshjada
ID: 13720871
gpriceee , Yours answers are correct but i was looking more for an explanation of how to work out the answers.

If you can show me how to work out the answers ill award you an additional 1500 points . The thing is in a few days ill be given a Host IP address and Subnet Mask, ill then have to answer these questions for myself without using a subnet calculator.

So please if you could help me out by explaining how to go about answering the questions that would be great.

Cheers
0
 
LVL 13

Expert Comment

by:gpriceee
ID: 13721940
The max on points is 500 :-)
The link I gave you earlier had the following info (it doesn not look pretty here--the linkl is very clear): http://www.petri.co.il/subnetting_table.htm
Subnetting Table

Use this table to help you calculate Subnet Masks, available hosts per subnet or number of subnets per class. The table deals with Subnetting of only one octet.

  # of Masked bits # of Non-masked bits Bit pattern # of subnets =2^M What will the new subnet mask be? # of hosts per subnet (C Class)
=[(2^N)-2] # of hosts per subnet (B Class)
=[(2^N)-2] # of hosts per subnet (A Class)
=[(2^N)-2]
None 0 8 00000000 0 0 256 65,534 ~16 Million
1 1 1 7 10000000 2 128 126 32,766 ~8 Million
2 2 2 6 11000000 4 192 62 16,382 ~4 Million
3 4 3 5 11100000 8 224 30 8,190 ~2 Million
4 8 4 4 11110000 16 240 14 4,094 ~1 Million
5 16 5 3 11111000 32 248 6 2,046 ~520,000
6 32 6 2 11111100 64 252 2 1,022 ~260,000
7 64 7 1 11111110 128 254 - 510 ~130,000
8 128 8 0 11111111 256 255 - 254 ~65,000

M=Number of Masked bits

N=Number of Non-masked bits - Remember that in Class A and B networks you have other octets besides the one you're subnetting. Therefore in a Class A network instead of saying 7 (for example) you must say 7+8+8. In a Class B network instead of saying 5 (for example again, duh!) you must say 5+8. Only in Class C networks does the N value remain the same.

  Starting bits for the first octet How many networks per Class? How many hosts per network? Range of the first octet  
Class A 0 126 (2^24)-2=~16 Million 1-126 127=Loopback
Class B 10 2^14=16384 (2^16)-2=~65000 128-191  
Class C 110 2^21=~2 Million (2^8)-2=254 192-223  
Class D 1110 - - 224-239  
Class E 1111 - - 240-255  

How many potential IP addresses do we have?

126 networks of 16,777,214 hosts each = 2,113,928,964

16,384 networks of 65,534 hosts each = 1,073,709,056

2,097,152 networks of 254 hosts each = 532,676,608

Total number of hosts = 3,720,314,628

0
 
LVL 13

Accepted Solution

by:
gpriceee earned 500 total points
ID: 13721966
The following Cisco link adds a lot of info that should help you understand subnetting even more: http://www.cisco.com/techtools/ip_addr_help.html
0
 
LVL 2

Expert Comment

by:billypg
ID: 13723905
This is the method I use whenever I  face such an exam and can't use any form of calculator. This is all you need to memorize:

            Last octect in mask        Number of IP addresses
/30       252                               4
/29       248     (252-4)               8    (4*2)
/28       240     (248-8)               16   (8*2)
/27       224     (224-16)             32   (16*2)
/26       192     (224-32)             64   (32*2)
/25       128     (192-64)             128  (64*2)
/24        0        (128-128)           256  (128*2)

For your example the mask is 255.255.255.240 which means that is a /28 with a total number of 16 IP addresses, 16-2=14 usable addresses since the first is the network address and the last is the broadcast address.

The host address is 192.168.2.50, since there are 16 IP addresses in each possible /28 subnet the one that includes .50 is 192.168.2.48/28 this is the net address, 48+15=63 so the broadcast address is 192.168.2.63 (just add 15 instead of 16 since adding 16 would result in the network address for the next subnet).

See how simple it is! just build the table on your sheet and follow the example. No need to start  going from decimal to binary and back to decimal. Good luck on your test!
0
 
LVL 2

Expert Comment

by:billypg
ID: 13724023
My last post is for C classes only, but you can take it further by changing not the last octet but the third one for /23 to /16, the second one for /15 to /8 and the first one for everything else minor to 8. All other octects to the right will be zero.

Just be careful to note that for /23 the mask is 255.255.254.0 for /15 255.254.0.0 and for /7 254.0.0.0 (254 is not on the above table)

The number of hosts follow the same pattern than on the above table.

I hope I'm not confusing you more, perhaps I'm not explaining well my method but I know it works. If you only need to work with C class addresses you're done with my previous post.
0
 

Author Comment

by:freshjada
ID: 13727645
Billypg that tables awesome, its made things alot clearer, Have you got one of those tables for Class A addresses ?

thanks
0
 
LVL 2

Assisted Solution

by:billypg
billypg earned 500 total points
ID: 13728216
The most common subnets are on the above table, you're not limited to using class C adresses as you can do, for example: 10.1.1.0/24. Now, if you want to know how to do the same thing for anything below /23  just extend the table as I mentioned before.

       First octect in mask       Number of IP addresses
/8    255                             16777216     = 2^(32-8)         ==> Note how to get the number of IP addresses for any /n
/7    254                             33554432     = 16777216*2
/6    252                             67108864     = 33554432*2
/5    248                             134217728   = 67108864*2
 .
 .
 .
and so on

Now the second column is the FIRST octect of the decimal mask and all other octects are zero.

Hope it helps.
0
 
LVL 13

Expert Comment

by:gpriceee
ID: 13852692
Hi.  Do you have more subnetting questions?  Have you understood it well enough, or do you need some clarification?
0
 
LVL 13

Expert Comment

by:gpriceee
ID: 14255615
Interested.
0
 
LVL 2

Expert Comment

by:billypg
ID: 14323084
Fair enough
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
This month, Experts Exchange’s free Course of the Month is focused on CompTIA IT Fundamentals.
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 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…

834 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