Who understands IP addressing stuff - help plz?

Soldato
Joined
22 Dec 2002
Posts
10,165
Location
Minehead
Hi all,

I have an assignment to do and as such I am NOT asking for answers, simply how to work out the answers to similar questions. If anyone can suggest any reading or other material to help me understand I'd really appreciate it.

Here's an example, which I will change the IP addresses etc of

Please note the subnet 0 (zero) is counted as the first subnet.

(a) In your network you have chosen to use the address 196.80.22.0
I. What class of address is this? Justify your answer including binary and dotted decimal notation. (2 Marks)
II. What mask should be applied to give 18 usable hosts per subnet? Justify your answer including binary and dotted decimal notation. (4 Marks)
III. What mask should be applied to give 20 subnets? Justify your answer including binary and dotted decimal notation. (4Marks)


Please do not answer the questions unless you really feel the need to, I just would like suggestions on further reading to enable me to complete this!

Thanks
 
Hi mate,

Stage 1 - Write our IP out in binary

Stage 2 - for I read this Linky, specifically where it says "Figure 1"

Stage 3 - For II you need to see how many host bits you need for the number of nodes. For example if I needed 60 nodes in a subnet then I could use a mask of 255.255.255.192 because that gives me 62 assignable IP addresses within that range (write it out in binary and use ANDing to see why). I cant use 255.255.255.224 as I can only have 30 assignable addresses and no point in 255.255.255.128 as that gives me 126 which is too many. Apply the same logic and it should answer it for you. Let me know if that's unclear.

Stage 4
- III is going to be hard to explain for me. Write out your IP and apply your subnet to it. As it doesn't give you any details I would assume that the IP would dictate the subnet, so how many network bits are needed to define it? If it was 10.10.10.0 then it would be 255.255.254.0 or a /23 prefix as it uses 23 bits for the network address. apply the same to your IP range

Stage 5 - Now you have your number of network and host bits look at your host bits. See how many you need to borrow to make 20. If I need to make 5 subnets then I would need to borrow 3 bits (101 = 5 in binary) so apply the same logic. In which case in MY example it would mean I needed to borrow 3 host bits to add to my current 23 to make my 5 subnets so would leave me with a /26 prefix, or 255.255.255.192 subnet. With this you'll end up with spares, I could have up to 8 subnets there.


Remember - ALWAYS binary it :)

If you don't get any of that please ask, of add me to msn (ghostlypea at hotmail dot com)

EDIT: just re-read your post, if you mean the given subnet is 255.255.255.0 my post stands but just wrong for your ip/snet. just apply the same logic!


- Pea0n
 
Last edited:
slightly off topic, but why is there still this obsession with teaching classful networks? It's irrelevent, it's antiquated and it's a pain to beat out of people to make them understand CIDR...

Still, he's right, until you know it doing the binary bit is the easiest way...
 
Holy reply!

Thank you very much I wasn't expecting that much of an answer from one person so thank you very much for explaining it to me! I shall have a good read in a minute and try and apply it to my work! Its annoying, the mark for this thing is 50% of a module and includes the average of the CCNA exams for part of the marks!

Thank you very much though I shall get reading and post back :)
 
I'm confused!

My IP address is 196.80.20.0,

This would make it a class C address, I don't know why or how I'm supposed to prove that but from the cisco document its class C :(

Binary anding doesn't mean a lot to me, I don't see what that has to do with anything? How did you work out or come to the conclusion on your subnet the choice given you wanted in your example 60 hosts? What determines that?
 
You know that a class C address has the leftmost bits as 110 (eg. 1100000 0101000 0000101 0000101).
Now convert your ip address to binary and AND it with an ip address which has its leftmost bits as 110.
eg
11011111 11111111 11111111 11111110
11000000 00000000 00000000 00000001
AND = 11000000 00000000 00000000 00000000

If the result of your AND operation has 110 as the starting bits(leftmost bits) it should prove it?
Im still a CCNA student and i've not had to prove anything on any exam but I'm guessing doing the above would work as proof.
 
Last edited:
I'm confused!

My IP address is 196.80.20.0,

This would make it a class C address, I don't know why or how I'm supposed to prove that but from the cisco document its class C :(

Binary anding doesn't mean a lot to me, I don't see what that has to do with anything? How did you work out or come to the conclusion on your subnet the choice given you wanted in your example 60 hosts? What determines that?

Hey mate,

The classes (as pointed out above) used to be determined by the first bits in the first octet:

00000000 = Class A
10000000 = Class B
11000000 = Class C

Class D and E are for things like multicasting/future use/testing etc. and are basically 224.0.0.0 and up iirc. So when writing it out in binary compare to those first network bits and that how you determine it and prove it.

ANDing:

0 + 0 = 0
1 + 0 = 0
0 + 1 = 0
1 + 1 = 1

So, when working out a subnet using the example the guy above me posted, check the corresponding IP binary bit with its equivalent network address binary bits. This is handy for determining the network mask from a nodes' IP etc.

With my example how did I get 60 hosts? Well I just pulled an easy example figure. With the subnet mask of 255.255.255.192 I will be able to make 64 IP addresses. Assuming my network given was 10.10.10.0 and I applied my mask to it then my IP range would be 10.10.10.0 - 10.10.10.63. I take one off for the network range (10.10.10.0) and one is the broadcast (10.10.10.63). I can tell this as when you AND the network and subnet mask I know that I only have a certain amount of network and hosts bits. If there are no host bits as 1 then it cant be assigned to a node so it is the network address, if it is all 1s then its the broadcast:

10.10.10.0 Network

00001010 00001010 00001010 00000000

255.255.255.192 Subnet mask

11111111 11111111 11111111 11000000

Then everything after the * is host bit, before is network

00001010 00001010 00001010 00*000000
11111111 11111111 11111111 11*000000

So...

Network address is
00001010 00001010 00001010 00000000 - 10.10.10.0
Broadcast is
00001010 00001010 00001010 00111111 - 10.10.10.63

Assuming I was originally given 10.10.10.0 with a subnet mask of 255.255.255.0 and I made that into 4 subnets (as i only need 60 nodes addresses), my network addresses would be

00001010 00001010 00001010 00*000000 - 10.10.10.0: 10.10.10.0 - 10.10.10.63
00001010 00001010 00001010 01*000000 - 10.10.10.64: 10.10.10.64 - 10.10.10.127
00001010 00001010 00001010 10*000000 - 10.10.10126: 10.10.10.128 - 10.10.10.191
00001010 00001010 00001010 11*000000 - 10.10.10.192: 10.10.10.192 - 10.10.10.255

this means each subnet gives me 64 addresses. I cant use 10.10.10.0 as it is a network address (all host bits are 0) and I cant use 10.10.10.63 as it is the broadcast address (all host bits are 1). So that reduces me from 64 to 62 IP addresses. Just enough with 2 spare.

Hope that's not too much rambling and makes sense!

- Pea0n
 
Last edited:
slightly off topic, but why is there still this obsession with teaching classful networks? It's irrelevent, it's antiquated and it's a pain to beat out of people to make them understand CIDR...

Still, he's right, until you know it doing the binary bit is the easiest way...

Lol I don't think I'll ever understand this! To be honest I can't believe its an assignment.... given he talked about it for only a single hour. Love my course tbh!
 
Back
Top Bottom