1

I rent 2 root servers from my provider that run Ubuntu 12.04.01 LTS. I ordered a second ip for each of them and configure them in /etc/network/interfaces as follows:

iface eth0:1 inet static
    address xxx.xxx.xxx.xxx
    netmask 255.255.0.0
auto eth0:1

The first server is running like this on production just fine. Now I notice as soon as I configure the 2nd ip adress for the 2nd server like this, that machine is unable to ping the first machine on any of the 2 ips and vice versa. Using only 1 ip it works fine. I am fairly unexperienced with server administration, and I do not find anything on google on this topic specifically. Is there something obvious that I am doing wrong?

Both machines are from the same provider, route shows they are using different gateways.

Thanks in advance

rewb0rn
  • 27
  • 1
  • 7
  • 3
    Netmask looks suspiciously wrong at least. –  Jan 05 '14 at 12:50
  • Reading a bit about netmasks I think you might be right. I was copying this once from a tutorial, and as it worked on the first server alone, I did not care too much. I will work on this tonight and give feedback later, thanks for pointing this out! – rewb0rn Jan 05 '14 at 13:26
  • Please provide the full, unredacted contents of /etc/network/interfaces for both servers. – sciurus Jan 05 '14 at 18:20
  • 1
    Your provider, from whom you leased the server, would provide you the correct netmask. – Michael Hampton Jan 05 '14 at 18:23
  • Thanks, the correct netmask for my provider was 255.255.255.255. It is working now :) – rewb0rn Jan 06 '14 at 05:14

1 Answers1

-2

The correct netmask for my provider was 255.255.255.255. It is working now :)

Thanks everyone

edit:

I also added the settings network, broadcast and gateway according to the documentation of my provider:

auto eth0:1
iface eth0:1 inet static
    address xxx.xxx.xxx.xxx
    netmask 255.255.255.255
    network xxx.xxx.xxx.xxx
    broadcast xxx.xxx.xxx.255
    gateway yyy.yyy.yyy.yyy
rewb0rn
  • 27
  • 1
  • 7
  • 1
    Er, that's an invalid mask unless these "servers" are Jails/Containers/similar. – Chris S Jan 06 '14 at 05:31
  • I don't know much about netmasks, but I found this in the documentation from my provider and it is working right now like this on production. The servers are full dedicated root machines. – rewb0rn Jan 06 '14 at 05:34
  • 2
    Stop. Don't "find" things. Ask them. They really should have provided this with the IPs and Default Gateway in the first place; but if they didn't you really need to ask what the ***correct*** subnet mask for your IPs is (it might be different for each too). They may have provided it in [CIDR notation](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation) too. – Chris S Jan 06 '14 at 05:35
  • Right, because the internet appreciates if you ask without looking first. This netmask is taken from the official documentation from my provider in the howto for adding a 2nd ip address and using it solves my problem. I would appreciate if you would back your statement that this is an invalid mask with a link, so I could maybe learn from it, instead of just criticizing me personally. Thank you – rewb0rn Jan 06 '14 at 05:46
  • I updated my answer above to reflect additional changes I made, maybe that clarifies the situation. I apologize in case my initial answer was lacking vital information. – rewb0rn Jan 06 '14 at 06:23
  • 1
    Your netmask is still probably wrong. 255.255.255.0 is the correct netmask for a /24 network for example. Unfortunately, you've never given any information about how/why you picked 255.255.255.255 which as far as I can tell is only used for point to point links. – dmourati Jan 06 '14 at 06:29
  • There are times to look around the Internet, and there are times when the provider should have given you the Subnet Mask in the first place and you should be calling them out on their omission of this highly important detail. A mask of 255.255.255.255 means that your IP is the *only one on the network*; no broadcast address, no gateway; nobody else period. This is correct for a *very limited* set of circumstances. I don't know why you're adverse to asking your provider, you are paying them and all. This isn't an odd question. – Chris S Jan 06 '14 at 14:14