dhcpcdは静的設定ファイルを使用してもIPアドレスを照会しますか?

dhcpcdは静的設定ファイルを使用してもIPアドレスを照会しますか?

状況は次のとおりです。 Raspberry Piを設定しました。/etc/dhcpcd.conf静的IPアドレスを持つ静的構成ファイルを使用するには、ファイルを使用してください。

# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel

# Inform the DHCP server of our hostname for DDNS.
alarm_host

# Use the hardware address of the interface for the Client ID.
#clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
# Some non-RFC compliant DHCP servers do not reply with this set.
# In this case, comment out duid and enable clientid above.
duid

# Persist interface configuration when dhcpcd exits.
persistent

# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit

# A list of options to request from the DHCP server.
option domain_name, domain_search, host_name
option classless_static_routes
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu

# Most distributions have NTP support.
#option ntp_servers

# A ServerID is required by RFC2131.
require dhcp_server_identifier

# Generate SLAAC address using the Hardware Address of the interface
#slaac hwaddr
# OR generate Stable Private IPv6 Addresses based from the DUID
slaac private
noipv4ll

interface eth0
static ip_address=172.16.30.90/16
static routers=172.16.10.254
static domain_name_servers=8.8.8.8 8.8.4.4

ただし、eth0で実際のアクティブパスを確認すると、次の結果が表示されます。

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether dc:a6:32:3a:e8:94 brd ff:ff:ff:ff:ff:ff
    inet 172.16.1.89/16 brd 172.16.255.255 scope global dynamic eth0
       valid_lft 680785sec preferred_lft 680785sec
    inet 172.16.30.90/16 brd 172.16.255.255 scope global secondary noprefixroute eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::6610:ec0c:c173:16c2/64 scope link 
       valid_lft forever preferred_lft forever

私はインターフェイスに静的設定ファイルを設定しましたが、dhcpcdがIPアドレスを要求する理由がわかりません。おそらく何かを逃したようですが、何かを知りません。これをどのように避けることができますか?

私はRaspberry Pi 4でArch Linuxを使用しています。

ベストアンサー1

このような状況に直面した人はこちらをご覧ください。 https://wiki.archlinux.org/title/Dhcpcd#Running

dhcpcd.serviceを無効にし、必要なインターフェイスに対して有効にする必要があります(例:[Eメール保護])。これにより、トリックを実行できます。

sudo systemctl disable --now dhcpcd.service
#sudo systemctl enable --now [email protected]
sudo ip link set eth0 down
sudo ip link set eth0 up

ps:私はArch ARMについて個人的に議論し、armv7とarmv8(aarch64)の間でどのバージョンを実行しているかを知りたいです。 ;)

おすすめ記事