Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4754

Networking and servers • Re: How to setup static IP address on Raspberry Pi OS 64bit bookworm

$
0
0
There are at least two solutions:
  • nmcli in Bookworm supports the --offline switch, enabling you to do configuration prior to first boot
  • Configure it up online as static and with everything else you want, then save away the .nmconnection file. Only two things to fix: 1) The static IP address, and 2) the UUID, but there appears to be no issue in using the same .nmconnection file across multiple systems. So, only one thing to fix :lol:
Sorry, its still not clear.

Code:

--offline   Work without a daemon. Makes connection add and connection modify commands accept and    produce connection data via standard input/output. Ordinarily, nmcli would communicate    with the NetworkManager service.
Learning what this means in practice seems complicated compared to simply copying "eth0" into /etc/network/interfaces.d while the SD card is mounted on the local computer - which takes seconds and works every time.

For example, I have just written Raspberry Pi OS to an SD card (say) on another computer (enabling ssh by creating the file "ssh" in /boot).
I then want to place the SD card in a Pi, and for that Pi to boot and be immediately accessible using existing entries in the local /etc/hosts file.
I do not want to spend ages messing with nmap trying to find the address DHCP has given it.
The local machine, by the way, might be running any reasonable OS.

Statistics: Posted by jahboater — Wed May 29, 2024 1:05 am



Viewing all articles
Browse latest Browse all 4754

Trending Articles