Configurando uma interface de ponte com systemd-networkd

1

Estou tentando criar uma interface de ponte em Limpar o Linux com a systemd-network para usá-la no KVM.

Eu tentei criar os seguintes arquivos como parte de este guia :

/etc/systemd/network/br0.netdev

[NetDev]
Name=br0
Kind=bridge

/etc/systemd/network/br0.network

[Match]
Name=br0

[Network]
Address=10.0.0.3/16
Gateway=10.0.0.1
DNS=10.0.0.1

uplink.network

[Match]
Name=eno1

[Network]
Bridge=br0

Após a reinicialização, brctl parece indicar que a interface eno1 não está corretamente conectada a br0 :

bswinnerton@nuc7i3 /etc/systemd/network $ brctl show
bridge name     bridge id               STP enabled     interfaces
br0             8000.429f5774d8b6       no

Aqui está a saída de networkctl :

bswinnerton@nuc7i3 /etc/systemd/network $ sudo networkctl
IDX LINK             TYPE               OPERATIONAL SETUP
  1 lo               loopback           carrier     unmanaged
  2 br0              ether              no-carrier  configuring
  3 eno1             ether              routable    configured

3 links listed.

E o status de systemd-networkd :

bswinnerton@nuc7i3 /etc/systemd/network $ systemctl status systemd-networkd
● systemd-networkd.service - Network Service
   Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2017-12-19 22:45:53 UTC; 8min ago
     Docs: man:systemd-networkd.service(8)
 Main PID: 253 (systemd-network)
   Status: "Processing requests..."
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/systemd-networkd.service
           └─253 /usr/lib/systemd/systemd-networkd

Dec 19 22:45:53 nuc7i3 systemd-networkd[253]: br0: netdev ready
Dec 19 22:45:53 nuc7i3 systemd-networkd[253]: Enumeration completed
Dec 19 22:45:53 nuc7i3 systemd-networkd[253]: br0: IPv6 successfully enabled
Dec 19 22:45:53 nuc7i3 systemd[1]: Started Network Service.
Dec 19 22:45:53 nuc7i3 systemd-networkd[253]: eth0: Renamed to eno1
Dec 19 22:45:53 nuc7i3 systemd-networkd[253]: eno1: IPv6 successfully enabled
Dec 19 22:45:58 nuc7i3 systemd-networkd[253]: eno1: Gained carrier
Dec 19 22:45:59 nuc7i3 systemd-networkd[253]: eno1: DHCPv4 address 10.0.0.3/24 via 10.0.0.1
Dec 19 22:46:01 nuc7i3 systemd-networkd[253]: eno1: Gained IPv6LL
Dec 19 22:46:13 nuc7i3 systemd-networkd[253]: eno1: Configured

Eu configurei mal um arquivo? Por que vale a pena, eu tentei sudo brctl addbr br0 , sudo brctl addif br0 eno1 e, em seguida, sudo systemctl restart systemd-networkd , e tudo funciona como esperado, mas isso não persiste entre as reinicializações.

    
por bswinnerton 20.12.2017 / 01:13

1 resposta

3

Verifique os arquivos de configuração em /lib/systemd/network/ ou /run/systemd/network , parece que algum outro arquivo de configuração está correspondendo à sua interface eno1 e inicia o DHCP nele

    
por 20.12.2017 / 20:15