Fórum Ubuntu Linux - PT

Suporte Técnico => Internet, Redes e Segurança => Tópico iniciado por: rafaballack em 23 de Setembro de 2017, 05:30

Título: Erro quando tento configurar Interfaces de rede no webmin
Enviado por: rafaballack em 23 de Setembro de 2017, 05:30
Pessoal, instalei o ubuntu-16.04.2-server-amd64 no Virtual Box onde fiz a instalação do webmin. Quando tento Editar o arquivo /etc/network/interfaces para configurar a placa de rede, apresenta o seguinte erro após /etc/init.d/networking restart:

[....] Restarting networking (via systemctl): networking.serviceJob for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details.

MEU IFCONFIG está da seguinte forma:

Código: [Selecionar]
enp0s3    Link encap:Ethernet  Endereço de HW 08:00:27:a0:19:42
          inet end.: 192.168.1.7  Bcast:192.168.1.255  Masc:255.255.255.0
          endereço inet6: fe80::a00:27ff:fea0:1942/64 Escopo:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Métrica:1
          pacotes RX:34461 erros:0 descartados:0 excesso:0 quadro:0
          Pacotes TX:47798 erros:0 descartados:0 excesso:0 portadora:0
          colisões:0 txqueuelen:1000
          RX bytes:18834106 (18.8 MB) TX bytes:41130162 (41.1 MB)

lo        Link encap:Loopback Local
          inet end.: 127.0.0.1  Masc:255.0.0.0
          endereço inet6: ::1/128 Escopo:Máquina
          UP LOOPBACK RUNNING  MTU:65536  Métrica:1
          pacotes RX:413 erros:0 descartados:0 excesso:0 quadro:0
          Pacotes TX:413 erros:0 descartados:0 excesso:0 portadora:0
          colisões:0 txqueuelen:1
          RX bytes:36438 (36.4 KB) TX bytes:36438 (36.4 KB)

O que eu preciso fazer para que funcione corretamente? não sei como configurar para não apresentar mais esse erro. Poderiam me ajudar por favor?
Título: Re:Erro quando tento configurar Interfaces de rede no webmin
Enviado por: zekkerj em 23 de Setembro de 2017, 06:34
Citar
See "systemctl status networking.service" and "journalctl -xe" for details.
Você executou os comandos sugeridos para ver o problema que foi reclamado?
Título: Re:Erro quando tento configurar Interfaces de rede no webmin
Enviado por: rafaballack em 23 de Setembro de 2017, 23:52
Citar
See "systemctl status networking.service" and "journalctl -xe" for details.
Você executou os comandos sugeridos para ver o problema que foi reclamado?

Veja a forma padrão que está em /etc/network/interfaces

Código: [Selecionar]
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto enp0s3
iface enp0s3 inet dhcp

Mas se eu colocar:
Código: [Selecionar]
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto enp0s3
iface enp0s3 inet dhcp

iface enp0s8
iface enp0s8 inet static
address 192.168.1.9
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.9

Apresenta a mensagem:
Código: [Selecionar]
[....] Restarting networking (via systemctl): networking.serviceJob for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details.
 failed!

No Virtual Box, em Redes está:
Adaptador 1 - Placa em modo Bridge
Adaptador 2 - Rede interna

Quando executo  "systemctl status networking.service"
Código: [Selecionar]
networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor prese
  Drop-In: /run/systemd/generator/networking.service.d
           └─50-insserv.conf-$network.conf
   Active: failed (Result: exit-code) since S<E1>b 2017-09-23 23:44:34 BRT; 3min
     Docs: man:interfaces(5)
  Process: 1611 ExecStop=/sbin/ifdown -a --read-environment --exclude=lo (code=e
  Process: 1620 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=
  Process: 1616 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [
 Main PID: 1620 (code=exited, status=1/FAILURE)

Set 23 23:44:34 servidor systemd[1]: Starting Raise network interfaces...
Set 23 23:44:34 servidor sh[1616]: /etc/network/interfaces:14: unknown or no add
Set 23 23:44:34 servidor sh[1616]: ifquery: couldn't read interfaces file "/etc/
Set 23 23:44:34 servidor ifup[1620]: /etc/network/interfaces:14: unknown or no a
Set 23 23:44:34 servidor ifup[1620]: /sbin/ifup: couldn't read interfaces file "
Set 23 23:44:34 servidor systemd[1]: networking.service: Main process exited, co
Set 23 23:44:34 servidor systemd[1]: Failed to start Raise network interfaces.
Set 23 23:44:34 servidor systemd[1]: networking.service: Unit entered failed sta
Set 23 23:44:34 servidor systemd[1]: networking.service: Failed with result 'exi
lines 1-20/20 (END)...skipping...
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
  Drop-In: /run/systemd/generator/networking.service.d
           └─50-insserv.conf-$network.conf
   Active: failed (Result: exit-code) since S<E1>b 2017-09-23 23:44:34 BRT; 3min 7s ago
     Docs: man:interfaces(5)
  Process: 1611 ExecStop=/sbin/ifdown -a --read-environment --exclude=lo (code=exited, status=1/FAILURE)
  Process: 1620 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
  Process: 1616 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (code=exited, status=
 Main PID: 1620 (code=exited, status=1/FAILURE)

Set 23 23:44:34 servidor systemd[1]: Starting Raise network interfaces...
Set 23 23:44:34 servidor sh[1616]: /etc/network/interfaces:14: unknown or no address type and no inherits keyword specified
Set 23 23:44:34 servidor sh[1616]: ifquery: couldn't read interfaces file "/etc/network/interfaces"
Set 23 23:44:34 servidor ifup[1620]: /etc/network/interfaces:14: unknown or no address type and no inherits keyword specified
Set 23 23:44:34 servidor ifup[1620]: /sbin/ifup: couldn't read interfaces file "/etc/network/interfaces"
Set 23 23:44:34 servidor systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Set 23 23:44:34 servidor systemd[1]: Failed to start Raise network interfaces.
Set 23 23:44:34 servidor systemd[1]: networking.service: Unit entered failed state.
Set 23 23:44:34 servidor systemd[1]: networking.service: Failed with result 'exit-code'.

E também quando executo "journalctl -xe" nada acontece



Título: Re:Erro quando tento configurar Interfaces de rede no webmin
Enviado por: zekkerj em 24 de Setembro de 2017, 01:39
Essa segunda placa vai ser o gateway da rede onde está conectada? Pq se ela é o gateway, você não precisa incluir um gateway na declaração dela.

PS: Não gosto de usar o webmin. Principalmente pra uma coisa tão simples quanto editar um arquivo de configuração de rede...