Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I work at a hosting company (obviously not doing much networking) and the datacenter just gave us an IP block for one of our customers who has a machine in our rack there. When I assign the IPs to a machine, I am generally just told what IPs to assign, but no one is currently online, so I am trying to understand this a bit better.

The IP address block I need to add to the client's machine is 74.117.238.112/28

From what I have read, The usable IPs should be .113 - .125, making it 13 usable, reserving the first and last. When I look at how his other IP block is setup though, it is 64.79.102.64/29 but the usable IPs setup on his machine are .66 - .70, which looks like the first 2 are reserved (.64 and .65)?

Also, the subnet mask for the current IP block is 255.255.255.248 and the gateway is 64.79.102.65. Do these change from block to block or do they stay the same?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

The usable range is .113 to .126 (.112 being the network and .127 being the broadcast, there is some discussion to be had regarding using the network address but let's forget about that right now) - meaning 14 usable IP addresses, this is with a /28 (255.255.255.240) netmask.

The usable range of the second block is .65 to .70 (with .64 as the network and .71 as the broadcast) - meaning 6 usable IP addresses with a /29 (255.255.255.248) netmask. The gateway of 64.79.102.65 falls within this range so is a valid gateway address.

If I were you I'd play around with one of the many web-based IP calculators, they really help learners and even get used by seasoned pros too sometimes.

share|improve this answer
    
Never heard of one being able to use the network number, can you share some information? –  3molo Apr 26 '11 at 8:50
    
Thank you, this helped immensely. All of the IP blocks configured on the machines in this rack have the first 2 not listed as usable. Is the second IP ever reserved for anything or are these all missing a usable IP? –  Brett Powell Apr 26 '11 at 8:52
1  
@Brett, glad to help, probably the reason you have the first two unusable is that your network guys have probably put the gateway/router address at the start, this can go anywhere in the range but at the start is very much the normal way to do it, hence why you lose 2 addresses. @3molo - there was a contentious argument about it on here about a year ago or so, I'll try to find you the link, technically it can be done but is quite a bad idea if you ask me :) –  Chopper3 Apr 26 '11 at 8:57

The tool ipcalc (available on most linux distributions) may solve your questions:

ipcalc 74.117.238.112/28
Address:   74.117.238.112       01001010.01110101.11101110.0111 0000
Netmask:   255.255.255.240 = 28 11111111.11111111.11111111.1111 0000
Wildcard:  0.0.0.15             00000000.00000000.00000000.0000 1111
=>
Network:   74.117.238.112/28    01001010.01110101.11101110.0111 0000
HostMin:   74.117.238.113       01001010.01110101.11101110.0111 0001
HostMax:   74.117.238.126       01001010.01110101.11101110.0111 1110
Broadcast: 74.117.238.127       01001010.01110101.11101110.0111 1111
Hosts/Net: 14                    Class A

As per ipcalc's output you can get the parameters you need. The IPs which are available for your host: 74.117.238.113-74.117.238.126 and the netmask: 255.255.255.240.

About which gateway you have to use, you should ask your network provider.

There are some websites that provide that (or similar) tools, for example this one

share|improve this answer
    
Thank you, that was the best tool I have found –  Brett Powell Apr 26 '11 at 8:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.