0

I have problems to configure an subnet /25 on an vps with CentOs 6.4 have tried different version.

The original eth0 settings are:

DEVICE=eth0
#HWADDR=de:8f:24:e9:7b:04
TYPE=Ethernet
UUID=64e110dd-d5db-4d6c-b99a-9da73ecc26c5
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=84.60.42.181
NETMASK=255.255.255.224

Other eth's doesn't exist. Now I tried to configure the range with creating a range network file

vi ifcfg-eth0-range0

Then in the file

IPADDR_START=84.180.231.1
IPADDR_END=84.180.231.254
CLONENUM_START=0
NETMASK=255.255.255.255

Save and closed... and network restart.

But it doesn't work. Still can't ping the IPs from outside. Perhaps someone can help me.

Mann87
  • 1
  • Have you tried without the netmask argument in the range file? – NickW Jun 07 '16 at 09:53
  • Ok I have tried it now. I get back Determining if ip address 84.180.231.1 is already in use for device eth0... Determining if ip address 84.180.231.2 is already in use for device eth0... Determining if ip address 84.180.231.3 is already in use for device eth0... ... But ping to IP is still not possible... – Mann87 Jun 07 '16 at 10:00
  • What IP are you trying to ping from? Localhost? – NickW Jun 07 '16 at 10:02
  • For example 84.180.231.1. From outside. – Mann87 Jun 07 '16 at 10:02
  • I don't understand... if I add a ip temporaly an with ip a add 84.180.231.1/24 dev eth0 I can ping and use the ip. But to add 128 IPs on this way is not so effective – Mann87 Jun 07 '16 at 10:03
  • I'm wondering where you are pinging from, the same machine? Since you're assigning a full /24 to the interface, I imagine you'll only be able to ping from the machine itself.. – NickW Jun 07 '16 at 10:05
  • Ping the IP direct on the vps work. But from outside not. – Mann87 Jun 07 '16 at 10:59
  • http://serverfault.com/questions/209203/ and http://serverfault.com/questions/590038 may be of interest – HBruijn Jun 07 '16 at 11:09
  • Considering you are assigning from `.1` to `.254`, it doesn't leave much range outside for another machine, even a router, which could then take traffic in and out of that subnet. – NickW Jun 07 '16 at 12:06
  • @NickW Why that? There is an .0 and .255 also.... – Mann87 Jun 07 '16 at 12:45
  • IN a /24, those are not used, .255 is broadcast, .0 is the net identifier.. [read this](http://cisconet.com/tcpip/tcpip-general/100-ip-addressing-ending-0-or-255.html), in a larger net those are valid addresses. – NickW Jun 07 '16 at 13:12
  • The eth0 has for example this infos: inet addr:219.99.233.200 Bcast:219.99.233.223 Mask:255.255.255.224 – Mann87 Jun 07 '16 at 13:16
  • The rangefile is creating this infos: inet addr:84.180.231.1 Bcast:84.180.231.31 Mask:255.255.255.224 if I remove the netmask argument from the file. – Mann87 Jun 07 '16 at 13:19
  • Yeah, because you created a 32 IP range, what you will want to do is something like this `IPADDR_START=84.180.231.1 IPADDR_END=84.180.231.254 CLONENUM_START=4` then set up a static machine with `84.180.231.1 NETMASK 255.255.255.0` and you should be able to ping.. fromt here you can decide how to set up your network. – NickW Jun 08 '16 at 10:33

1 Answers1

0

84.180.231.1 is not inside 84.60.42.181/25, hope you made it intentionally.

Make sure the rest of the world knows that the specific server has that range of IP, that you have routing configured properly both at your default gateway and that you configured default gw properly on the server.

Also, don't forget to check icmp on your firewall(s)

Putnik
  • 2,095
  • 3
  • 23
  • 40