I can't connect to internet in my server.

Issues related to configuring your network
Post Reply
Jonatanman
Posts: 11
Joined: 2015/05/08 19:25:27

I can't connect to internet in my server.

Post by Jonatanman » 2015/05/28 19:56:18

Hi:

I install a server with Centos 6.6. I set the network parameters, but when i try to go to internet i can't connect it. Also, when i try to reset the network with the command /etc/init.d/network restart , this send the following message: fgrep: ifcfg-ifcfg-Conexión_cableada_1: No such file or directory....What's wrong with my connection? Why i can't connect to internet?

[root@Server /]# /etc/init.d/network restart
fgrep: ifcfg-ifcfg-Conexión_cableada_1: No such file or directory
fgrep: ifcfg-ifcfg-Conexión_cableada_1: No such file or directory
Interrupción de la interfaz eth0: Estado de dispositivo: 3 (desconectado) [ OK ]
Interrupción de la interfaz eth1: [ OK ]
/etc/init.d/network: línea 206: ./ifcfg-ifcfg-Conexión_cableada_1: No existe el fichero o el directorio
Interrupción de la interfaz de loopback: [ OK ]
Activación de la interfaz de loopback: [ OK ]
Activando interfaz eth0: Estado de conexión activa: activada
Ruta de conexión activa: /org/freedesktop/NetworkManager/ActiveConnection/10 [ OK ]
fgrep: ifcfg-ifcfg-Conexión_cableada_1: No such file or directory
fgrep: ifcfg-ifcfg-Conexión_cableada_1: No such file or directory
fgrep: ifcfg-ifcfg-Conexión_cableada_1: No such file or directory
egrep: ifcfg-ifcfg-Conexión_cableada_1: No such file or directory
Activando interfaz ifcfg-Conexión_cableada_1: Estado de conexión activa: activada
Ruta de conexión activa: /org/freedesktop/NetworkManager/ActiveConnection/11 [ OK ]

This is The config of the ifcfg-Conexion_Cableada

TYPE=Ethernet
BOOTPROTO=static
IPADDR=172.30.5.248
PREFIX=24
GATEWAY=172.30.5.1
NETMASK=255.255.255.0
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="Conexión cableada 1"
UUID=dfcd9f4b-140e-4168-9b32-3e719952a552
ONBOOT=yes

This is /etc/sysconfig/network

NETWORKIN=YES
HOSTNAME=SERVERNAME
GATEWAY=172.30.5.1


Regards!

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: I can't connect to internet in my server.

Post by aks » 2015/05/29 07:43:08

The init script (/etc/init.d/network) is looking for a file called ifcfg-ifcfg-Conexión_cableada_1 and the filename is ifcfg-Conexion_Cableada
Try renaming the file to ifcfg-ifcfg-Conexión_cableada_1
As to why the init script is looking for that file, I do not know without looking at the script itself.

Jonatanman
Posts: 11
Joined: 2015/05/08 19:25:27

Re: I can't connect to internet in my server.

Post by Jonatanman » 2015/05/29 16:02:59

I found the problem...

When i execute /etc/init.d/network restart; this erase the config in the /etc/resolv.conf and the dns configured by me.

There are some form of setting this no modify when restart???

Regards.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: I can't connect to internet in my server.

Post by gerald_clark » 2015/05/29 20:35:28

You need to look for an ifcfg file that is set to dhcp instead of static.

I suspect you have NetworkManager running.
It uses a different set of config files.
Also, do not use both PREFIX and NETMASK.

igsmigs88
Posts: 29
Joined: 2014/07/23 20:46:29

Re: I can't connect to internet in my server.

Post by igsmigs88 » 2015/06/03 11:41:28

hi,

just do it

service NetworkManager stop
service NetworkManager disable

then edit /etc/resolv.conf

then hit
service network restart

Post Reply