# Networking question on determining the IP

1. Feb 10, 2012

### Darkstar3000

Consider the simple network shown below:

http://img856.imageshack.us/img856/8966/wrwrwr.png [Broken]

Write down an IP address for all interfaces at all hosts and routers in the network. The IP addresses for A and E are as given. You should assign IP addresses so that interfaces on the same network have the same network-part of their IP address. Indicate the number of bits in the network-part of this address.

///////////////////////////////////////

This question is in one of my assignments and I have no idea on how to do it, I've tried looking up any relevant information but found nothing. How would I go about calculating the IP address of all the devices ?

Last edited by a moderator: May 5, 2017
2. Feb 10, 2012

### I like Serena

Hi Darkstar!

The first part of an IP address is the network identification.
The second part is the host identification.
It depends on the type op IP address where the separation between the two is.
That is, whether it is a class A, class B, or class C network address.

Last edited by a moderator: May 5, 2017
3. Feb 10, 2012

### Darkstar3000

I'm guessing that mine is a class A since "Range of first octet (decimal) for class A is 0 - 127"

and based on the information you've provided the 2 computers on the left will have "111.111." as the beginning of their ip addresses

4. Feb 10, 2012

### I like Serena

Close.
On the left you have indeed class A addresses.
The netwerk identification is the first octet (the second is not part of it).
The second part is an arbitrary choice, although 0.0.0 (any-mask) and 255.255.255 (broadcast) have special meanings, so you shouldn't use those.
Any other choice is fine, just pick one (or rather two ;).

5. Feb 10, 2012

### Darkstar3000

So it I can assign computer B to have it's address as 111.2.111 or does the last part change to 112 ? or does the middle part need to be 3 digits as well

and on the right we have class C and the computer would have the address 222.3.222 or something similar ?

I'm sorry if my questions sounds stupid, I'm just really confused

6. Feb 10, 2012

### I like Serena

B can have any host identification of 3 octets, for instance 111.2.111 or 0.0.2.
You still have to prefix it with the network identification, which is 111.
So B could be for instance 111.111.2.111 or 111.0.0.2.
An IP address always consists of 4 octets (each octet is in the range 0-255).

On the right we have indeed a class C network, meaning the first 3 octets (24 bits) identify the network, which is 222.222.222 (but not 222.2.222, where did you get that?).

7. Feb 10, 2012

### Darkstar3000

Since the second part is arbitrary, does that mean that my address for computer B can also be 111.111.7.111 ?

I was using 222.2.222 as an example answer for computer D (on the right).

8. Feb 10, 2012

### I like Serena

Yep!

Not an option.
The first 3 octets must be 222.222.222 since that identifies the network.
You can only choose the last octet.

9. Feb 10, 2012

### Darkstar3000

Alright, got that part. Thank you

So computer D is gonna have to be 222.222.222.222.6 (6 being arbitrary as well ?) ?

10. Feb 10, 2012

### I like Serena

Nope. Sorry. An IP address has to consist of exactly 4 octets (not 5).

11. Feb 10, 2012

### Darkstar3000

So 222.222.222.6 ?

In the previous post I put an extra octet because I thought I needed to use the network identifier as the prefix

12. Feb 10, 2012

### I like Serena

Yes. The network identifier has to be there as a prefix.
That leaves only 1 octet for the host identifier.
So 222.222.222.6 is indeed a proper IP address for computer D.

13. Feb 10, 2012

### Darkstar3000

Thank you very much.

So basically all I have to do is remember the class and assigning addresses would be this simple ?

Is there a reputation system on this website ?

14. Feb 10, 2012

### I like Serena

The "network" identifier is "222.222.222".
The host identifier in this case would be "6",

15. Feb 10, 2012

### Darkstar3000

I managed to figure that out from your previous post. once again, Thank you

16. Feb 10, 2012

### I like Serena

You're welcome. :)

Reputation system?

17. Feb 10, 2012

### Darkstar3000

You know, like thanking someone in a thread for helping them

18. Feb 10, 2012

### I like Serena

Ah, okay.

I'm afraid we do not have "like" or "thanks" buttons on PF.
We have medals that are assigned by staff.
And we have awards that result from elections (only in december).

Until the next december the only thing a member can do is write thanks in regular posts.

19. Feb 10, 2012

### Darkstar3000

Oh I see. Well I guess I've thanked you enough, I'll get on with the rest of my assignment :P