Impossibile richiamare eth2 - Ubuntu 16.04

7

Ho configurato un server Ubuntu 16.04 come guest in Virtualbox. Il server utilizza 3 interfacce nelle impostazioni di rete: Solo host, NAT, Bridged

Il file / etc / network / interfaces è impostato come segue:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# Host-only interface
auto eth0
iface eth0 inet static
address 192.168.56.105
netmask 255.255.255.0
network 192.168.56.0
broadcast 192.168.56.255

# NAT interface
auto eth1
iface eth1 inet dhcp

# Bridged interface
auto eth2
iface eth2 inet static
address 192.168.0.105
netmask 255.255.255.0
gateway 192.168.0.255
dns-nameservers 8.8.8.8

Ho disabilitato l'opzione "Nodi di interfaccia di rete prevedibili" in grub config

GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=0"

Durante il riavvio ho questo messaggio:

Failed to start Raise network interfaces

ma quando eseguo ifconfig tutto sembra ok:

eth0      Link encap:Ethernet  HWaddr 08:00:27:37:e4:c4  
          inet addr:192.168.56.105  Bcast:192.168.56.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe37:e4c4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:311 errors:0 dropped:0 overruns:0 frame:0
          TX packets:39 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:35338 (35.3 KB)  TX bytes:5530 (5.5 KB)

eth1      Link encap:Ethernet  HWaddr 08:00:27:d6:8d:1a  
          inet addr:10.0.3.15  Bcast:10.0.3.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fed6:8d1a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:29 errors:0 dropped:0 overruns:0 frame:0
          TX packets:37 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2970 (2.9 KB)  TX bytes:3063 (3.0 KB)

eth2      Link encap:Ethernet  HWaddr 08:00:27:6d:be:ad  
          inet addr:192.168.0.105  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe6d:bead/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:634 errors:0 dropped:0 overruns:0 frame:0
          TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:55125 (55.1 KB)  TX bytes:1988 (1.9 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:160 errors:0 dropped:0 overruns:0 frame:0
          TX packets:160 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:11840 (11.8 KB)  TX bytes:11840 (11.8 KB)

Tuttavia quando corro

sudo service networking restart

Ricevo questo messaggio:

Job for networking.service failed because the control process exited with 
error code. See "systemctl status networking.service" and "journalctl -xe" 
for details.

Ecco il risultato di journalctl -xe

-- Unit networking.service has begun starting up.
May 07 16:31:54 jakku ifup[2056]: RTNETLINK answers: File exists
May 07 16:31:54 jakku ifup[2056]: Failed to bring up eth2.
May 07 16:31:54 jakku systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
May 07 16:31:54 jakku systemd[1]: Failed to start Raise network interfaces.
-- Subject: Unit networking.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit networking.service has failed.

Qualcuno può aiutarmi?

    
posta Duddy67 07.05.2016 - 17:02

1 risposta

4

La mia ipotesi è che stai cadendo in una vecchia trappola. Secondo diversi messaggi esempio uno di codeghar sudo service networking restart è stato a lungo deprecato

  

perché potrebbe non abilitare nuovamente alcune interfacce

Jorge Castro ha dato questa risposta

sudo ifdown --exclude=lo -a && sudo ifup --exclude=lo -a

Quindi sostituisci networking restart con ifdown... && ifup... .

Solo a parte: ifconfig è stato deprecato per molto tempo - usa ip dal pacchetto iproute2 (vedi anche la mia domanda / risposta )

    
risposta data guntbert 01.01.2017 - 20:11

Leggi altre domande sui tag