Ubuntu 16.04 lts - a rede não inicia no boot-bonding

1

Servidor do Ubuntu 16.04 lts com 4 nics ligados à agregação de links dinâmicos IEEE 802.3ad.

Após a reinicialização, o serviço de rede não é carregado automaticamente e precisa iniciar manualmente usando sudo /etc/init.d/networking start

Todas as interfaces, incluindo a ligação, têm uma carga automática na /etc/network/interfaces

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet manual
bond-master bond0

# The second network interface
auto eth1
iface eth1 inet manual
bond-master bond0

# The third network interface
auto eth2
iface eth2 inet manual
bond-master bond0

# The forth network interface
auto eth3
iface eth3 inet manual
bond-master bond0


# The bond master network interface
auto bond0
iface bond0 inet static
        address 192.168.1.201
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.254
        dns-nameservers xx.xx.xx.x xx.xx.xx.xx
        dns-search xxx.xxx.xxx.xx
        bond-mode 4
        bond-miimon 100
        bond-slaves all
        bond-primary eth1 eth2 eth3 eth0

Isso deve iniciar o serviço de rede na reinicialização, mas não é. O que posso fazer para que a rede inicie na inicialização?

Editar 1

Editar 2

Saída de dmesg | grep -i bond0 :

borgf003@CLD01:~$ dmesg | grep -i bond0
[   12.110687] bond0: Setting MII monitoring interval to 100
[   12.121534] IPv6: ADDRCONF(NETDEV_UP): bond0: link is not ready
[   12.191915] bond0: Adding slave eno2
[   12.348156] bond0: Enslaving eno2 as a backup interface with a down link
[   12.350247] bond0: Adding slave enp12s0f0
[   12.608573] bond0: Enslaving enp12s0f0 as a backup interface with a down link
[   12.608598] bond0: Adding slave enp12s0f1
[   12.856531] bond0: Enslaving enp12s0f1 as a backup interface with a down link
[   12.856552] bond0: Adding slave eno1
[   12.980244] bond0: Enslaving eno1 as a backup interface with a down link
[   13.980065] bond0: link status definitely up for interface eno2, 100 Mbps ful                                                                                                                                                             l duplex
[   13.980071] bond0: now running without any active interface!
[   13.980076] bond0: link status definitely up for interface enp12s0f0, 100 Mbp                                                                                                                                                             s full duplex
[   14.080093] IPv6: ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
[   14.280062] bond0: link status definitely up for interface enp12s0f1, 100 Mbp                                                                                                                                                             s full duplex
[   14.680033] bond0: link status definitely up for interface eno1, 100 Mbps ful                                                                                                                                                             l duplex
[  194.727579] bond0: Removing slave enp12s0f1
[  194.727776] bond0: Releasing active interface enp12s0f1
[  195.010788] bond0: Removing slave eno2
[  195.010872] bond0: Releasing active interface eno2
[  195.010876] bond0: the permanent HWaddr of eno2 - 00:1a:a0:06:f1:dd - is stil                                                                                                                                                             l in use by bond0 - set the HWaddr of eno2 to a different address to avoid confl                                                                                                                                                             icts
[  195.010879] bond0: first active interface up!
[  195.207016] bond0: Removing slave enp12s0f0
[  195.207075] bond0: Releasing active interface enp12s0f0
[  195.207079] bond0: first active interface up!
[  195.278500] bond0: Removing slave eno1
[  195.278553] bond0: Removing an active aggregator
[  195.278556] bond0: Releasing active interface eno1
[  195.293395] bonding: bond0 is being deleted...
[  195.293460] bond0 (unregistering): Released all slaves
[  195.358558] bonding: bond0 is being created...
[  195.404957] bond0: Setting MII monitoring interval to 100
[  195.407792] IPv6: ADDRCONF(NETDEV_UP): bond0: link is not ready
[  195.462566] bond0: Adding slave eno1
[  195.584227] bond0: Enslaving eno1 as a backup interface with a down link
[  195.665846] bond0: Adding slave eno2
[  195.796166] bond0: Enslaving eno2 as a backup interface with a down link
[  195.864614] bond0: Adding slave enp12s0f0
[  196.104464] bond0: Enslaving enp12s0f0 as a backup interface with a down link
[  196.167753] bond0: Adding slave enp12s0f1
[  196.408475] bond0: Enslaving enp12s0f1 as a backup interface with a down link
[  197.204043] bond0: link status definitely up for interface eno1, 100 Mbps ful                                                                                                                                                             l duplex
[  197.204052] bond0: now running without any active interface!
[  197.204110] IPv6: ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
[  197.504039] bond0: link status definitely up for interface eno2, 100 Mbps ful                                                                                                                                                             l duplex
[  197.504045] bond0: link status definitely up for interface enp12s0f0, 100 Mbp                                                                                                                                                             s full duplex
[  197.804037] bond0: link status definitely up for interface enp12s0f1, 100 Mbp                                                                                                                                                             s full duplex
[ 1048.788210] bond0: Removing slave enp12s0f1
[ 1048.788421] bond0: Releasing active interface enp12s0f1
[ 1048.996159] bond0: Removing slave enp12s0f0
[ 1048.996331] bond0: Releasing active interface enp12s0f0
[ 1049.200059] bond0: Removing slave eno2
[ 1049.200152] bond0: Releasing active interface eno2
[ 1049.366490] bond0: Removing slave eno1
[ 1049.366548] bond0: Removing an active aggregator
[ 1049.366551] bond0: Releasing active interface eno1
[ 1049.377410] bonding: bond0 is being deleted...
[ 1049.377479] bond0 (unregistering): Released all slaves
[ 1049.449847] bonding: bond0 is being created...
[ 1049.507089] bond0: Setting MII monitoring interval to 100
[ 1049.510405] IPv6: ADDRCONF(NETDEV_UP): bond0: link is not ready
[ 1049.554116] bond0: Adding slave eno1
[ 1049.657057] bond0: Enslaving eno1 as a backup interface with a down link
[ 1049.730913] bond0: Adding slave eno2
[ 1049.849103] bond0: Enslaving eno2 as a backup interface with a down link
[ 1049.914038] bond0: Adding slave enp12s0f0
[ 1050.160523] bond0: Enslaving enp12s0f0 as a backup interface with a down link
[ 1050.226176] bond0: Adding slave enp12s0f1
[ 1050.476519] bond0: Enslaving enp12s0f1 as a backup interface with a down link
[ 1051.312039] bond0: link status definitely up for interface eno1, 100 Mbps ful                                                                                                                                                             l duplex
[ 1051.312049] bond0: now running without any active interface!
[ 1051.312103] IPv6: ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
[ 1051.612040] bond0: link status definitely up for interface eno2, 100 Mbps ful                                                                                                                                                             l duplex
[ 1051.612046] bond0: link status definitely up for interface enp12s0f0, 100 Mbp                                                                                                                                                             s full duplex
[ 1051.912060] bond0: link status definitely up for interface enp12s0f1, 100 Mbp                                                                                                                                                             s full duplex
borgf003@CLD01:~$

Editar 3

Verificando o bond0

borgf003@CLD01:~$ cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

802.3ad info
LACP rate: slow
Min links: 0
Aggregator selection policy (ad_select): stable

Slave Interface: eno1
MII Status: up
Speed: 100 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:1a:a0:06:f1:db
Slave queue ID: 0
Aggregator ID: 1
Actor Churn State: monitoring
Partner Churn State: monitoring
Actor Churned Count: 0
Partner Churned Count: 0

Slave Interface: eno2
MII Status: up
Speed: 100 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:1a:a0:06:f1:dd
Slave queue ID: 0
Aggregator ID: 1
Actor Churn State: monitoring
Partner Churn State: monitoring
Actor Churned Count: 0
Partner Churned Count: 0

Slave Interface: enp12s0f0
MII Status: up
Speed: 100 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:15:17:4a:94:26
Slave queue ID: 0
Aggregator ID: 1
Actor Churn State: monitoring
Partner Churn State: monitoring
Actor Churned Count: 0
Partner Churned Count: 0

Slave Interface: enp12s0f1
MII Status: up
Speed: 100 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:15:17:4a:94:27
Slave queue ID: 0
Aggregator ID: 1
Actor Churn State: monitoring
Partner Churn State: monitoring
Actor Churned Count: 0
Partner Churned Count: 0
borgf003@CLD01:~$

O link está lento devido ao antigo Cisco Catalyst Switch instalado.

Editar 4

● 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: active (exited) since Mon 2016-12-19 16:11:01 CET; 4min 10s ago
     Docs: man:interfaces(5)
  Process: 3783 ExecStop=/sbin/ifdown -a --read-environment (code=exited, status
  Process: 3933 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=
  Process: 3927 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [
 Main PID: 3933 (code=exited, status=0/SUCCESS)
    Tasks: 0
   Memory: 0B
      CPU: 0
   CGroup: /system.slice/networking.service

Dec 19 16:11:00 CLD01 systemd[1]: Starting Raise network interfaces...
Dec 19 16:11:00 CLD01 ifup[3933]: Waiting for bond master bond0 to be ready
Dec 19 16:11:01 CLD01 systemd[1]: Started Raise network interfaces.

O vínculo parece estar iniciando antes que as interfaces sejam levantadas

Editar 5

O problema foi resolvido veja a resposta aqui

    
por Fab 09.12.2016 / 16:14

3 respostas

1

Resolvido - Ubuntu 16.04 lts com a agregação de link dinâmico IEEE 802.3ad

Situação

Dell PowerEdge 2950 que executa o NextCloud Server no Ubuntu 16.04 lts com a instável rede de agregação de link dinâmico 802.3ad instável com tempos de espera de execução intermitentes e erros de inicialização.

Solução de problemas

Depois de vários testes de configuração do lado do servidor (graças ao George para o suporte), o problema de rede intermitente persistiu. Um problema de compatibilidade foi deduzido entre o builtin Broadcom e o pci Intel nics quando ligado no Ubuntu 16.04 lts.

Solução de hardware

Duas Intel pci nics foram instaladas nos slots 2950 riser pci, nvram foram apagadas e o built-in broadcom foi desativado no bios. Isso foi feito para favorecer a largura de banda, ou seja, 4 (1Gb) nics em vez das interfaces internas de 2 (1Gb).

Solução do servidor

Existem sugestões de configuração de ligação conflitantes para o Ubuntu 16.04 lts e é isso que funcionou para mim.

1 . Ran ifconfig -a para se apossar da nova interface bios e dev names

borgf003@CLD01:~$ ifconfig -a
..........
enp10s0f0 Link encap:Ethernet  HWaddr 00:15:17:4a:94:26
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:5161 errors:0 dropped:0 overruns:0 frame:0
          TX packets:361 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:809816 (809.8 KB)  TX bytes:31274 (31.2 KB)
          Interrupt:17 Memory:fdae0000-fdb00000

enp10s0f1 Link encap:Ethernet  HWaddr 00:15:17:4a:94:26
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:11440 errors:0 dropped:0 overruns:0 frame:0
          TX packets:167 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1963591 (1.9 MB)  TX bytes:20970 (20.9 KB)
          Interrupt:18 Memory:fdaa0000-fdac0000

enp14s0f0 Link encap:Ethernet  HWaddr 00:15:17:4a:94:26
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:4769 errors:0 dropped:4 overruns:0 frame:0
          TX packets:3294 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:582742 (582.7 KB)  TX bytes:1546925 (1.5 MB)
          Interrupt:16 Memory:fd6e0000-fd700000

enp14s0f1 Link encap:Ethernet  HWaddr 00:15:17:4a:94:26
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:3910 errors:0 dropped:1 overruns:0 frame:0
          TX packets:2548 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:497874 (497.8 KB)  TX bytes:838297 (838.2 KB)
          Interrupt:17 Memory:fd6a0000-fd6c0000
..........

2 . Como eu tinha ligação pré-configurada antes de executar sudo apt install --reinstall ifenslave

3 . Verificado se a ligação é carregada na inicialização sudo nano /etc/modules

loop
lp
bonding

NOTA: Eu removo o rtc, pois ele é depreciado em 16.04 lts e eu gosto de uma inicialização limpa

4 . Parou de rede no meu caso eu uso sudo /etc/init.d/networking stop

5 . Editou as interfaces / etc / network / interfaces com a ligação da seguinte forma. Note que você precisa mudar o nome das interfaces com o seu, incluindo os ips

# 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

# The primary network interface
auto enp10s0f0
iface enp10s0f0 inet manual
bond-master bond0

# The second network interface
auto enp10s0f1
iface enp10s0f1 inet manual
bond-master bond0

# The third network interface
auto enp14s0f0
iface enp14s0f0 inet manual
bond-master bond0

# The forth network interface
auto enp14s0f1
iface enp14s0f1 inet manual
bond-master bond0

# The bond master network interface
auto bond0
iface bond0 inet static
        address xxx.xxx.xxx.xxx
        netmask xxx.xxx.xxx.xxx
        network xxx.xxx.xxx.xxx
        broadcast xxx.xxx.xxx.xxx
        gateway xxx.xxx.xxx.xxx
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers xxx.xxx.xxx.xxx
        dns-search yourdomain.com
        bond-mode 4
        bond-miimon 100
        bond-slaves all

6 . Recarregou o módulo de ligação do kernel sudo modprobe bonding

7 . Criado uma configuração de ligação /etc/modprobe.d/bonding.conf com

alias bond0 bonding
options bonding mode=4 miimon=100 lacp_rate=1

8 . Reiniciei a rede, no meu caso eu uso sudo /etc/init.d/networking restart

9 . Verifiquei a ligação cat /proc/net/bonding/bond0

10 . Reinicie para ver se tudo acontece!

    
por Fab 20.12.2016 / 11:47
0

Primeiro verifique se a rede está definida para ser executada na inicialização:

sudo systemctl status networking

Se ele não disser enabled na linha Loaded , será necessário ativá-lo para iniciar na reinicialização da seguinte forma:

sudo systemctl enable networking

Como o seu vínculo deve resolver o problema:

  1. instale este sudo apt install ifenslave
  2. edite seus arquivos /etc/modules : sudo vi /etc/modules
  3. adicione-os ao arquivo (um em cada linha)
    • loop
    • lp
    • rtc
    • colagem
  4. interromper a rede:
    • sudo stop networking
  5. módulo de kernel de ligação de carga:
    • sudo modprobe bonding
  6. edite sua configuração de interfaces:
    • você já fez isso
  7. Adicione isso a vim /etc/modprobe.d/bonding.conf

    alias bond0 bonding options bonding mode=4 miimon=100 lacp_rate=1

  8. inicie a rede novamente:

    • sudo systemctl restart networking
  9. verificar tudo está bem com a interface de ligação
    • cat /proc/net/bonding/bond0
  10. Abra a interface de ligação:
    • ifup bond0

Fonte: UbuntuBonding

fonte: ServerVault

    
por George Udosen 09.12.2016 / 18:50
0

Você está perseguindo um beco sem saída dessa maneira. Suas incompatibilidades são provavelmente apenas configurações e condições de corrida. As opções e nic configurações e e o driver de ligação e > configurações do kernel tudo precisa ser examinado para ver o que está realmente errado.          É hora de largar tudo o que aconteceu antes e ficar sujo                   com systemd-networkd em si.

link

link

    
por Cordeaux 09.03.2017 / 16:10