eth0: ERRO ao obter sinalizadores de interface: Nenhum dispositivo [duplicado]

0

Eu configurei o CentOS ainda.

não é uma conexão de rede. eth0 não é uma lista de dispositivos.

Eu recebo uma mensagem network is unreachable enquanto ping 192.168.0.1

a captura de tela da lista de dispositivos

Como posso fazer rede acessível?

    
por SerefSVN 31.07.2014 / 16:22

3 respostas

2

Sua porta Ethernet é chamada enp2s0 , não eth0 . Esse sistema de nomes é chamado de Nomenclatura de Interface de Rede Previsível e os detalhes estão disponíveis aqui .

Verifique o arquivo /etc/sysconfig/network-scripts/ifcfg-enp2s0 , que deve ser semelhante ao seguinte:

DEVICE='enp2s0'
TYPE=Ethernet
BOOTPROTO=none
ONBOOT='yes'
IPADDR=a.b.c.d
NETMASK=255.255.255.0
GATEWAY=a.b.c.1
NM_CONTROLLED='yes'
DNS1=8.8.4.4
DNS2=8.8.8.8

( a.b.c.d é o seu endereço IP)

Ou, se você estiver usando o DHCP:

DEVICE='enp2s0'
TYPE=Ethernet
BOOTPROTO=dhcp
ONBOOT='yes'
NM_CONTROLLED='yes'

Depois de verificar / editar o arquivo acima, reinicie a rede com:

systemctl restart network.service
    
por 31.07.2014 / 16:49
0

você tem que usar enp2s0, você não tem um dispositivo chamado eth0.

dhcpcd enp2s0
    
por 31.07.2014 / 16:44
0

Seu dispositivo de ethernet é enp2s0 . Isso segue o novo esquema de nomenclatura de dispositivo previsível no linux. Você tem que substituir todas as referências a eth0 por enp2s0 ou reverter para o antigo esquema de nomenclatura; tudo que você precisa é descrito aqui . Para citar de lá:

You basically have four options:

  1. You disable the assignment of fixed names, so that the unpredictable kernel names are used again. For this, simply mask udev's rule file for the default policy: ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules (since v209: this file was called 80-net-name-slot.rules in release v197 through v208)
  2. You create your own manual naming scheme, for example by naming your interfaces "internet0", "dmz0" or "lan0". For that create your own udev rules file and set the NAME property for the devices. Make sure to order it before the default policy file, for example by naming it /etc/udev/rules.d/70-my-net-names.rules
  3. You alter the default policy file, for picking a different naming scheme, for example for naming all interface names after their MAC address by default: cp /usr/lib/udev/rules.d/80-net-setup-link.rules /etc/udev/rules.d/80-net-setup-link.rules, then edit the file there and change the lines as necessary.
  4. You pass the net.ifnames=0 on the kernel command line (since v199)
    
por 31.07.2014 / 16:51