AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / server / Perguntas / 1075418
Accepted
MikeyB
MikeyB
Asked: 2021-08-24 09:56:17 +0800 CST2021-08-24 09:56:17 +0800 CST 2021-08-24 09:56:17 +0800 CST

configuração do systemd-networkd não adicionando nenhuma rota e não finalizando a configuração

  • 772

Com o systemd 241 no Debian 10, estou tentando configurar a rede no estilo systemd-networkd para um servidor de borda.

O problema que tenho é que ao systemd-networkdinicializar, ele não adiciona as rotas v4 ou v6, mas informa que ainda está no estado "configurando":

IDX LINK             TYPE               OPERATIONAL SETUP
  1 lo               loopback           carrier     unmanaged
  2 eth0             ether              carrier     configuring
  3 eth1             ether              carrier     configuring
  6 docker0          bridge             routable    unmanaged
  8 veth9a70b3d      ether              degraded    unmanaged
 32 ext              bond               routable    configuring
 33 int              vlan               routable    configured

Aqui estão os logs de depuração da networkdinicialização:

Aug 23 17:15:52 te1a systemd[1]: Started Network Service.
Aug 23 17:15:52 te1a systemd-networkd[29413]: ext: Created
Aug 23 17:15:52 te1a systemd-networkd[29413]: ext: Link state is up-to-date
Aug 23 17:15:52 te1a systemd-networkd[29413]: No virtualization found in DMI
Aug 23 17:15:52 te1a systemd-networkd[29413]: No virtualization found in CPUID
Aug 23 17:15:52 te1a systemd-networkd[29413]: Virtualization XEN not found, /proc/xen does not exist
Aug 23 17:15:52 te1a systemd-networkd[29413]: This platform does not support /proc/device-tree
Aug 23 17:15:53 te1a systemd-networkd[29413]: UML virtualization not found in /proc/cpuinfo.
Aug 23 17:15:53 te1a systemd-networkd[29413]: This platform does not support /proc/sysinfo
Aug 23 17:15:53 te1a systemd-networkd[29413]: Found VM virtualization none
Aug 23 17:15:53 te1a systemd-networkd[29413]: ext: found matching network '/etc/systemd/network/ext.network'
Aug 23 17:15:53 te1a systemd-networkd[29413]: ext: Setting address genmode for link
Aug 23 17:15:53 te1a systemd-networkd[29413]: ext: Enslaving by 'int'
Aug 23 17:15:53 te1a systemd-networkd[29413]: int: Creating
Aug 23 17:15:53 te1a systemd-networkd[29413]: veth9a70b3d: Link state is up-to-date
Aug 23 17:15:53 te1a systemd-networkd[29413]: veth9a70b3d: found matching network '/etc/systemd/network/veth.network
'
Aug 23 17:15:53 te1a systemd-networkd[29413]: veth9a70b3d: Unmanaged
Aug 23 17:15:53 te1a systemd-networkd[29413]: docker0: Link state is up-to-date
Aug 23 17:15:53 te1a systemd-networkd[29413]: docker0: Unmanaged
Aug 23 17:15:53 te1a systemd-networkd[29413]: eth1: Link state is up-to-date
Aug 23 17:15:53 te1a systemd-networkd[29413]: eth1: found matching network '/etc/systemd/network/eth1.network'
Aug 23 17:15:53 te1a systemd-networkd[29413]: eth1: Setting address genmode for link
Aug 23 17:15:53 te1a systemd-networkd[29413]: eth1: Enslaving by 'ext'
Aug 23 17:15:53 te1a systemd-networkd[29413]: ext: Enslaving link 'eth1'
Aug 23 17:15:53 te1a systemd-networkd[29413]: eth0: Link state is up-to-date
Aug 23 17:15:53 te1a systemd-networkd[29413]: eth0: found matching network '/etc/systemd/network/eth0.network'
Aug 23 17:15:53 te1a systemd-networkd[29413]: eth0: Setting address genmode for link
Aug 23 17:15:53 te1a systemd-networkd[29413]: eth0: Enslaving by 'ext'
Aug 23 17:15:53 te1a systemd-networkd[29413]: ext: Enslaving link 'eth0'
Aug 23 17:15:53 te1a systemd-networkd[29413]: lo: Link state is up-to-date
Aug 23 17:15:53 te1a systemd-networkd[29413]: lo: Unmanaged
Aug 23 17:15:53 te1a systemd-networkd[29413]: int: New device has no master, continuing without
Aug 23 17:15:53 te1a systemd-networkd[29413]: int: Flags change: +MULTICAST +BROADCAST
Aug 23 17:15:53 te1a systemd-networkd[29413]: int: Link 33 added
Aug 23 17:15:53 te1a systemd-networkd[29413]: int: udev initialized link
Aug 23 17:15:53 te1a systemd-networkd[29413]: int: netdev has index 33
Aug 23 17:15:53 te1a systemd-networkd[29413]: int: netdev ready
Aug 23 17:15:53 te1a systemd-networkd[29413]: int: Saved original MTU: 1500
Aug 23 17:15:53 te1a systemd-networkd[29413]: ext: Joined netdev
Aug 23 17:15:53 te1a systemd-networkd[29413]: ext: Bringing link up
Aug 23 17:15:53 te1a systemd-networkd[29413]: eth1: MAC address: 02:f9:36:9d:17:aa
Aug 23 17:15:53 te1a systemd-networkd[29413]: eth1: Flags change: +SLAVE +UP
Aug 23 17:15:53 te1a systemd-networkd[29413]: LLDP: Started LLDP client
Aug 23 17:15:53 te1a systemd-networkd[29413]: eth1: Started LLDP.
Aug 23 17:15:53 te1a systemd-networkd[29413]: eth1: Joined netdev
Aug 23 17:15:53 te1a systemd-networkd[29413]: eth0: MAC address: 02:f9:36:9d:17:aa
Aug 23 17:15:53 te1a systemd-networkd[29413]: eth0: Flags change: +SLAVE +UP
Aug 23 17:15:53 te1a systemd-networkd[29413]: LLDP: Started LLDP client
Aug 23 17:15:53 te1a systemd-networkd[29413]: eth0: Started LLDP.
Aug 23 17:15:53 te1a systemd-networkd[29413]: eth0: Joined netdev
Aug 23 17:15:53 te1a systemd-networkd[29413]: eth1: Flags change: +LOWER_UP +RUNNING
Aug 23 17:15:53 te1a systemd-networkd[29413]: eth1: Gained carrier
Aug 23 17:15:53 te1a systemd-networkd[29413]: int: Link state is up-to-date
Aug 23 17:15:53 te1a systemd-networkd[29413]: int: found matching network '/etc/systemd/network/int.network'
Aug 23 17:15:53 te1a systemd-networkd[29413]: int: Setting address genmode for link
Aug 23 17:15:53 te1a systemd-networkd[29413]: int: Bringing link up
Aug 23 17:15:53 te1a systemd-networkd[29413]: ext: Flags change: +UP
Aug 23 17:15:53 te1a systemd-networkd[29413]: LLDP: Started LLDP client
Aug 23 17:15:53 te1a systemd-networkd[29413]: ext: Started LLDP.
Aug 23 17:15:53 te1a systemd-networkd[29413]: int: Flags change: +UP +LOWER_UP
Aug 23 17:15:53 te1a systemd-networkd[29413]: LLDP: Started LLDP client
Aug 23 17:15:53 te1a systemd-networkd[29413]: int: Started LLDP.
Aug 23 17:15:53 te1a systemd-networkd[29413]: int: Flags change: +RUNNING
Aug 23 17:15:53 te1a systemd-networkd[29413]: int: Gained carrier
Aug 23 17:15:53 te1a systemd-networkd[29413]: int: Setting addresses
Aug 23 17:15:53 te1a systemd-networkd[29413]: ext: Flags change: +LOWER_UP +RUNNING
Aug 23 17:15:53 te1a systemd-networkd[29413]: ext: Gained carrier
Aug 23 17:15:53 te1a systemd-networkd[29413]: ext: Setting addresses
Aug 23 17:15:53 te1a systemd-networkd[29413]: int: Updating address: 10.0.1.210/24 (valid forever)
Aug 23 17:15:53 te1a systemd-networkd[29413]: int: Updating address: 2001:db8:2:100::d2/64 (valid forever)
Aug 23 17:15:53 te1a systemd-networkd[29413]: int: Addresses set
Aug 23 17:15:53 te1a systemd-networkd[29413]: ext: Updating address: 192.0.2.196/27 (valid forever)
Aug 23 17:15:53 te1a systemd-networkd[29413]: ext: Updating address: 2001:db8:0:ff01::c4/64 (valid forever)
Aug 23 17:15:53 te1a systemd-networkd[29413]: ext: Updating address: 192.0.2.217/32 (valid forever)
Aug 23 17:15:53 te1a systemd-networkd[29413]: ext: Updating address: 2001:db8:0:ff01::d9/128 (valid forever)
Aug 23 17:15:53 te1a systemd-networkd[29413]: ext: Addresses set
Aug 23 17:15:54 te1a systemd-networkd[29413]: eth0: Flags change: +LOWER_UP +RUNNING
Aug 23 17:15:54 te1a systemd-networkd[29413]: eth0: Gained carrier
Aug 23 17:15:55 te1a systemd-networkd[29413]: ext: Adding address: fe80::f9:36ff:fe9d:17aa/64 (valid forever)
Aug 23 17:15:55 te1a systemd-networkd[29413]: ext: Gained IPv6LL
Aug 23 17:15:55 te1a systemd-networkd[29413]: int: Adding address: fe80::f9:36ff:fe9d:17aa/64 (valid forever)
Aug 23 17:15:55 te1a systemd-networkd[29413]: int: Gained IPv6LL
Aug 23 17:15:55 te1a systemd-networkd[29413]: ext: Updating address: 2001:db8:0:ff01::d9/128 (valid forever)
Aug 23 17:15:55 te1a systemd-networkd[29413]: int: Updating address: 2001:db8:0:100::d2/64 (valid forever)
Aug 23 17:15:55 te1a systemd-networkd[29413]: int: Configured
Aug 23 17:15:55 te1a systemd-networkd[29413]: ext: Updating address: 2001:db8:0:ff01::c4/64 (valid forever)
Aug 23 17:15:56 te1a systemd-networkd[29413]: LLDP: Invoking callback for 'added' event.
Aug 23 17:15:56 te1a systemd-networkd[29413]: LLDP: Successfully processed LLDP datagram.
(repeats)

E aqui estão os arquivos de configuração:

# eth0.network
[Match]
Name=eth0

[Link]
RequiredForOnline=no

[Network]
Bond=ext
# eth1.network
[Match]
Name=eth1

[Link]
RequiredForOnline=no

[Network]
Bond=ext
# ext.netdev
[NetDev]
Name=ext
Kind=bond

[Bond]
Mode=802.3ad
MIIMonitorSec=0.1
LACPTransmitRate=fast
# ext.network
[Match]
Name=ext

[Link]

[Network]
IPv6AcceptRA=false

[Address]
Address=192.0.2.196/27
[Route]
Gateway=192.0.2.193

[Address]
Address=2001:DB8:0:FF01::C4/64
[Route]
Gateway=2001:DB8:0:FF01::1
Metric=128
# ext.network.d/ext-a1.conf
[Match]
Name=ext

[Address]
Address=192.0.2.217/32
PreferredLifetime=0
# ext.network.d/ext-a2.conf
[Match]
Name=ext

[Address]
Address=2001:DB8:0:FF01::D9/128
PreferredLifetime=0
# ext.network.d/has-vlan-int.conf
[Match]
Name=ext

[Network]
VLAN=int
# int.netdev
[NetDev]
Name=int
Kind=vlan

[VLAN]
Id=13
# int.network
[Match]
Name=int

[Link]

[Network]
IPv6AcceptRA=false

[Address]
Address=10.0.1.210/24

[Address]
Address=2001:DB8:0:100::D2/64
# veth.network
[Match]
Name=veth*

[Link]
Unmanaged=yes
RequiredForOnline=no

O que está acontecendo de errado?

linux systemd systemd-networkd
  • 1 1 respostas
  • 222 Views

1 respostas

  • Voted
  1. Best Answer
    MikeyB
    2021-08-24T14:24:28+08:002021-08-24T14:24:28+08:00

    Acontece que foi isso:

    [Address]
    Address=192.0.2.217/32
    PreferredLifetime=0
    

    A especificação PreferredLifetimede um endereço IPv4 causa networkduma cunha.

    • 1

relate perguntas

  • Protegendo um novo servidor Ubuntu [fechado]

  • (Soft) RAID 6 no Ubuntu 7.10, devo migrar para 8.10?

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Você pode passar usuário/passar para autenticação básica HTTP em parâmetros de URL?

    • 5 respostas
  • Marko Smith

    Ping uma porta específica

    • 18 respostas
  • Marko Smith

    Verifique se a porta está aberta ou fechada em um servidor Linux?

    • 7 respostas
  • Marko Smith

    Como automatizar o login SSH com senha?

    • 10 respostas
  • Marko Smith

    Como posso dizer ao Git para Windows onde encontrar minha chave RSA privada?

    • 30 respostas
  • Marko Smith

    Qual é o nome de usuário/senha de superusuário padrão para postgres após uma nova instalação?

    • 5 respostas
  • Marko Smith

    Qual porta o SFTP usa?

    • 6 respostas
  • Marko Smith

    Linha de comando para listar usuários em um grupo do Windows Active Directory?

    • 9 respostas
  • Marko Smith

    O que é um arquivo Pem e como ele difere de outros formatos de arquivo de chave gerada pelo OpenSSL?

    • 3 respostas
  • Marko Smith

    Como determinar se uma variável bash está vazia?

    • 15 respostas
  • Martin Hope
    Davie Ping uma porta específica 2009-10-09 01:57:50 +0800 CST
  • Martin Hope
    kernel O scp pode copiar diretórios recursivamente? 2011-04-29 20:24:45 +0800 CST
  • Martin Hope
    Robert ssh retorna "Proprietário incorreto ou permissões em ~/.ssh/config" 2011-03-30 10:15:48 +0800 CST
  • Martin Hope
    Eonil Como automatizar o login SSH com senha? 2011-03-02 03:07:12 +0800 CST
  • Martin Hope
    gunwin Como lidar com um servidor comprometido? 2011-01-03 13:31:27 +0800 CST
  • Martin Hope
    Tom Feiner Como posso classificar a saída du -h por tamanho 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich O que é um arquivo Pem e como ele difere de outros formatos de arquivo de chave gerada pelo OpenSSL? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent Como determinar se uma variável bash está vazia? 2009-05-13 09:54:48 +0800 CST

Hot tag

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve