Portál AbcLinuxu, 5. května 2025 19:38
cat /etc/systemd/network/30-lan1.network [Match] Name=lan1 [Network] Address=192.168.2.102/24 DHCPServer=true [DHCPServer] DefaultLeaseTimeSec=3600 MaxLeaseTimeSec=86400 #PoolOffset=1 #PoolSize=120 EmitDNS=yes DNS=192.168.2.102 EmitNTP=yes NTP=192.168.2.102 [DHCPServerStaticLease] # nuna MACAddress=00:30:05:e0:ca:be Address=192.168.2.103ale klientovi to přiděluje adresu 62 místo 103. Tu je jeho status:
networkctl status eth0 ● 2: eth0 Link File: /usr/lib/systemd/network/99-default.link Network File: /etc/systemd/network/15-wired.network State: routable (configured) Online state: online Type: ether Path: pci-0000:0b:04.0 Driver: 8139too Vendor: Realtek Semiconductor Co., Ltd. Model: RTL-8100/8101L/8139 PCI Fast Ethernet Adapter Alternative Names: enp11s4 Hardware Address: 00:30:05:e0:ca:be (Fujitsu Siemens Computers) MTU: 1500 (min: 68, max: 1770) QDisc: fq_codel IPv6 Address Generation Mode: eui64 Number of Queues (Tx/Rx): 1/1 Auto negotiation: yes Speed: 100Mbps Duplex: full Port: mii Address: 192.168.2.62 (DHCP4 via 192.168.2.102) fe80::230:5ff:fee0:cabe Gateway: 192.168.2.102 DNS: 192.168.2.102 NTP: 192.168.2.102 Activation Policy: up Required For Online: yes Time Zone: UTC DHCP4 Client ID: IAID:0x5667a25b/DUID DHCP6 Client DUID: DUID-EN/Vendor:0000ab11ed9864afb8ec1c3c0000Co dělám špatně?
Řešení dotazu:
Offered DHCP leases: 192.168.2.62 (to IAID:0x5667a25b/DUID)když na klientovi nabootoju arch. Když nabootoju na klientovi slax, tak server píše:
Offered DHCP leases: 192.168.2.103 (to 00:30:05:e0:ca:be)
[Match] MACAddress=00:30:05:e0:ca:be [Network] DHCP=true [DHCPv4] ClientIdentifier=macBez toho posledního řádku si bude DHCP server ty adresy cucat z prstu.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.