I am having issues with the latest Bullseye lite distro (May 4, 2023) on a 3B. I have an earlier bullseye desktop version on a 4B that is working well, but I can't get the lite version to set a static IP on eth0. I compared the dhcpcd.conf files between the two systems, and the only thing that was different was the request for the IP address. On the desktop system, I found that the IP request was "inform", whereas I initially used "static ip_address=" on the 3B "lite" system, but also tried "inform". Both attempts were made using just the IP address, as well as address/24 to include the mask bits (i.e. 192.168.151.50 and 192.168.151.50/24).
I am used to just modifying the "dhcpcd.conf" to get a fixed IP. Is there something I have missed? A couple threads mentioned "connman", but I found it is not installed on the "lite" version.
Thanks,
Tom
P.S. Having never had an issue setting a fixed IP, I don't really have the background to troubleshoot this. Below is a copy of the "ip a", "ip r", and "journalctl" from the SSH connection:
I have replaced MAC address with "xx:xx:xx:xx:xx:xx" to keep
those who might want to duplicate mine, and use them for
inappropriate things.
tom@______:/etc $ ip r
default via 192.168.151.1 dev eth0
default via 192.168.151.1 dev eth0 proto dhcp metric 100
192.168.151.0/24 dev eth0 proto kernel scope link src 192.168.151.241 metric 100
tom@______:/etc $ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
inet 192.168.151.241/24 brd 192.168.151.255 scope global dynamic noprefixroute eth0
valid_lft 57559sec preferred_lft 57559sec
inet6 fe80::4a41:b2df:88a4:dd70/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff permaddr xx:xx:xx:xx:xx:xx
tom@_____:/etc $ journalctl -b 0 /usr/sbin/dhcpcd
-- Journal begins at Tue 2023-05-02 17:25:51 PDT, ends at Thu 2023-05-11 17:52:17 PDT. --
-- No entries --
For those who feel it necessary, here is the added portion of the dhcpcd.conf file:
# Static Ethernet IP Configuration:
interface eth0
static ip_address=192.168.151.50
static routers=192.168.151.1
static domain_name_servers=8.8.8.8 8.8.4.4
noipv6
# Static WiFi IP Configuration:
interface wlan0
static ip_address=192.168.151.51/24
static routers=192.168.151.1
static domain_name_servers=8.8.8.8 8.8.4.4
noipv6
I am not new to Pi's. I have been working with them since the old pi-1A, and Linux since 1996. Although I don't keep current "hosts" file on my systems, I maintain a "hosts" file on my primary system. I do this because the 253 addresses are becoming cluttered with the many devices connected via LAN or WiFi. DHCP is only used for initial boots, and working on systems for my parents (both gone now), and my Sister, and her family. For WiFi security I use a MAC filter to keep out unwanted users.
For a "Lite" install, I start with a monitor & keyboard, as it is the easiest for me. I add the static IP configuration, set up the raspi-config, adjust the .bashrc, then reboot, expecting my edits to take hold.
journalctl
as it gives a reasonable log of what happens during the dhcp exchange between your RPi & your DHCP server; something like this to start perhaps:journalctl -b 0 /usr/sbin/dhcpcd
. There are lots of guides for usingjournalctl
available online.