Estou usando o systemd networkd versão 253.1. Tenho 2 portas Ethernet na minha caixa Linux 5.15 e quero configurar um servidor DHCP na segunda porta. Eu fiz isso com sucesso com a seguinte configuração para eth1.
Configuração funcional do servidor DHCP:
[Match]
Name=eth1
Type=ether
[DHCPV4]
DUIDType=link-layer
ClientIdentifier=mac
[Network]
Address=172.1.17.1/24
DHCPServer=yes
#IPMasquerade=ipv4
[DHCPServer]
PoolOffset=1
PoolSize=8
Agora, quero alterar o intervalo para o seguinte:
[Match]
Name=eth1
Type=ether
[DHCPV4]
DUIDType=link-layer
ClientIdentifier=mac
[Network]
#
# 10.1.193.24/29
#
# Network Address: 10.1.193.24
# Usable IP Range: 10.1.193.25 - 10.1.193.30
# Broadcast Address: 10.1.193.31
#
Address= 10.1.193.24/29
DHCPServer=yes
#IPMasquerade=ipv4
[DHCPServer]
PoolOffset=2
PoolSize=5
No entanto, recebo o erro mostrado abaixo:
[root@machine ~]$ networkctl status eth1 -l
* 3: eth1
Link File: n/a
Network File: /etc/systemd/network/eth1.network
State: routable (failed)
Online state: online
Type: ether
Path: platform-30bf0000.ethernet
Hardware Address: 00:01:c0:37:6d:56 (Company, Ltd.)
MTU: 1500 (min: 46, max: 9000)
QDisc: mq
IPv6 Address Generation Mode: eui64
Number of Queues (Tx/Rx): 8/8
Auto negotiation: yes
Speed: 1Gbps
Duplex: full
Port: tp
Address: 10.1.193.24
fe80::201:c0ff:fe37:6d56
Activation Policy: up
Required For Online: yes
DHCP6 Client DUID: DUID-EN/Vendor:0000ab1180dd9f24e9435b570000
Offered DHCP leases: none
Aug 12 14:33:07 machine systemd-networkd[654]: eth1: Received new foreign route (configured): dst: 10.1.193.24/29, src: n/a, gw: n/a, prefsrc: 10.1.193.24, scope: link, table: main(254), proto: kernel, type: unicast, nexthop: 0, priority: 0, flags: n/a
Aug 12 14:33:07 machine systemd-networkd[654]: eth1: Addresses set
Aug 12 14:33:07 machine systemd-networkd[654]: eth1: link_check_ready(): dynamic addresses or routes are not configured.
Aug 12 14:33:07 machine systemd-networkd[654]: eth1: Configuring DHCP Server.
Aug 12 14:33:07 machine systemd-networkd[654]: eth1: Failed to configure address pool for DHCPv4 server instance: Numerical result out of range
Aug 12 14:33:07 machine systemd-networkd[654]: eth1: Failed to configure DHCP server: Numerical result out of range
Aug 12 14:33:07 machine systemd-networkd[654]: eth1: Failed
Aug 12 14:33:07 machine systemd-networkd[654]: eth1: State changed: configuring -> failed
Aug 12 14:33:07 machine systemd-networkd[654]: eth1: LLDP Rx: Stopping LLDP client
Aug 12 14:33:07 machine systemd-networkd[654]: eth1: NDISC: Stopping IPv6 Router Solicitation client
Verifiquei várias calculadoras CIDR e acredito que os parâmetros do meu arquivo de configuração são válidos.
Por que o networkd não aceita meu arquivo de configuração?