0

Here is the situation: I configured my Raspberry Pi /etc/dhcpcd.conf file in order to use a static profile with a static ip address.

# 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

But if I check my actual active routes on eth0, I get this output:

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

I don't know why dhcpcd asks for an IP address, even though I set a static profile for that interface. I'm probably missing something, but I don't know what. How do I possibly avoid this?

I use Arch Linux on a Raspberry Pi 4.

1 Answer 1

0

for people in this case please have a look here: https://wiki.archlinux.org/title/Dhcpcd#Running

You have to disable dhcpcd.service and enable it for interfaces you need (ex: [email protected]). This should do the trick:

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: i'll be happy to discuss about Arch ARM in private, knowing which version you run between armv7 and armv8 (aarch64). ;)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .