Configurando a segunda interface de rede gera erro

0

Estou tentando conectar dois servidores do Ubuntu 16.04, mas estou recebendo um erro para eth1 on

service networking restart

depois de fazer as alterações.

/etc/network/interfaces parece com

auto lo
iface lo inet loopback
iface lo inet6 loopback

auto eth0
iface eth0 inet static
  address 94.xxx.xxx.xxx
  netmask 255.255.255.192
  gateway 94.xxx.xxx.xxx
  # route 94.xxx.xxx.xxx/26 via 94.xxx.xxx.xxx
  up route add -net 94.xxx.xxx.xxx netmask 255.255.255.192 gw 94.xxx.xxx.xxx dev eth0

iface eth0 inet6 static
  address 2a01....
  netmask 64
  gateway fe80::1

auto eth1
iface eth1 inet static
  address 10.0.0.31
  netmask 255.255.255.0
  gateway 10.0.0.1

O erro que recebo é

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

Então, agora quando eu corro

# systemctl status networking.service
● 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 Fr 2018-01-05 13:19:04 CET; 39s ago
     Docs: man:interfaces(5)
  Process: 1389 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
  Process: 1384 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (code=exited, status=0/SUCCESS)
 Main PID: 1389 (code=exited, status=1/FAILURE)

Jan 05 13:19:04 Ubuntu-1604-xenial-64-minimal systemd[1]: Starting Raise network interfaces...
Jan 05 13:19:04 Ubuntu-1604-xenial-64-minimal ifup[1389]: RTNETLINK answers: File exists
Jan 05 13:19:04 Ubuntu-1604-xenial-64-minimal ifup[1389]: Failed to bring up eth1.
Jan 05 13:19:04 Ubuntu-1604-xenial-64-minimal systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Jan 05 13:19:04 Ubuntu-1604-xenial-64-minimal systemd[1]: Failed to start Raise network interfaces.
Jan 05 13:19:04 Ubuntu-1604-xenial-64-minimal systemd[1]: networking.service: Unit entered failed state.
Jan 05 13:19:04 Ubuntu-1604-xenial-64-minimal systemd[1]: networking.service: Failed with result 'exit-code'.

No entanto, ifconfig mostra

eth1      Link encap:Ethernet  HWaddr 10:7b:44:b0:b3:62  
          inet addr:10.0.0.31  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::127b:44ff:feb0:b362/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:1872 (1.8 KB)
          Memory:fa100000-fa17ffff 

e ip ad retornam

3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 10:7b:44:b0:b3:62 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.31/24 brd 10.0.0.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::127b:44ff:feb0:b362/64 scope link 
       valid_lft forever preferred_lft forever

O seguinte não apresenta um erro:

# ifconfig eth1 down
# ifconfig eth1 up

O outro servidor está configurado para com 10.0.0.11 como seu IP. Eu posso pingar esses ip's do outro servidor.

De onde vem esse erro e como posso resolvê-lo? A configuração está errada como eu fiz?

    
por baao 05.01.2018 / 13:26

0 respostas