How do I set a static IP address on the raspberry pi?
I do not want to set it via DHCP.
The OS is up to date.
An internet search shows a number of ways to set up static IP, but none seem to work for me. The interface is not configured at boot time.
interfaces.d is configured
dhclient.conf is configured
NetworkManager is configured
I do not want to set it via DHCP.
The OS is up to date.
Code:
0 thirsty /root # uname -aLinux thirsty 6.12.33-v8+ #1888 SMP PREEMPT Wed Jun 18 12:34:33 BST 2025 aarch64 GNU/Linuxinterfaces.d is configured
Code:
0 thirsty /root # cat /etc/network/interfaces.d/eth0 auto eth0iface eth0 inet staticaddress 10.0.0.241/24gateway 10.0.0.1dns-nameservers 10.0.0.241 10.0.0.240Code:
0 thirsty /root # cat /etc/dhcp/dhclient.conf option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;send host-name = gethostname();request subnet-mask, broadcast-address, time-offset, routers,domain-name, domain-name-servers, domain-search, host-name,dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers,netbios-name-servers, netbios-scope, interface-mtu,rfc3442-classless-static-routes, ntp-servers;lease { interface "eth0"; fixed-address 10.0.0.241; option subnet-mask 255.255.255.0; option domain-name-servers 10.0.0.241 10.0.0.240; option routers 10.0.0.1;}Code:
0 thirsty /root # nmcli c show "Ethernet connection 1"connection.id: Ethernet connection 1connection.uuid: ec193de6-ff43-4482-9a71-f184938886ddconnection.stable-id: --connection.type: 802-3-ethernetconnection.interface-name: eth0connection.autoconnect: yesconnection.autoconnect-priority: 0connection.autoconnect-retries: -1 (default)connection.multi-connect: 0 (default)connection.auth-retries: -1connection.timestamp: 0connection.read-only: noconnection.permissions: --connection.zone: --connection.master: --connection.slave-type: --connection.autoconnect-slaves: -1 (default)connection.secondaries: --connection.gateway-ping-timeout: 0connection.metered: unknownconnection.lldp: defaultconnection.mdns: -1 (default)connection.llmnr: -1 (default)connection.dns-over-tls: -1 (default)connection.mptcp-flags: 0x0 (default)connection.wait-device-timeout: -1connection.wait-activation-delay: -1802-3-ethernet.port: --802-3-ethernet.speed: 0802-3-ethernet.duplex: --802-3-ethernet.auto-negotiate: no802-3-ethernet.mac-address: --802-3-ethernet.cloned-mac-address: --802-3-ethernet.generate-mac-address-mask:--802-3-ethernet.mac-address-blacklist: --802-3-ethernet.mtu: auto802-3-ethernet.s390-subchannels: --802-3-ethernet.s390-nettype: --802-3-ethernet.s390-options: --802-3-ethernet.wake-on-lan: default802-3-ethernet.wake-on-lan-password: --802-3-ethernet.accept-all-mac-addresses:-1 (default)ipv4.method: manualipv4.dns: 10.0.0.241,10.0.0.240ipv4.dns-search: internal,deanandadie.netipv4.dns-options: --ipv4.dns-priority: 0ipv4.addresses: 10.0.0.241/24ipv4.gateway: 10.0.0.1ipv4.routes: --ipv4.route-metric: -1ipv4.route-table: 0 (unspec)ipv4.routing-rules: --ipv4.replace-local-rule: -1 (default)ipv4.ignore-auto-routes: noipv4.ignore-auto-dns: noipv4.dhcp-client-id: --ipv4.dhcp-iaid: --ipv4.dhcp-timeout: 0 (default)ipv4.dhcp-send-hostname: yesipv4.dhcp-hostname: --ipv4.dhcp-fqdn: --ipv4.dhcp-hostname-flags: 0x0 (none)ipv4.never-default: noipv4.may-fail: yesipv4.required-timeout: -1 (default)ipv4.dad-timeout: -1 (default)ipv4.dhcp-vendor-class-identifier: --ipv4.link-local: 0 (default)ipv4.dhcp-reject-servers: --ipv4.auto-route-ext-gw: -1 (default)ipv6.method: disabledipv6.dns: --ipv6.dns-search: --ipv6.dns-options: --ipv6.dns-priority: 0ipv6.addresses: --ipv6.gateway: --ipv6.routes: --ipv6.route-metric: -1ipv6.route-table: 0 (unspec)ipv6.routing-rules: --ipv6.replace-local-rule: -1 (default)ipv6.ignore-auto-routes: noipv6.ignore-auto-dns: noipv6.never-default: noipv6.may-fail: yesipv6.required-timeout: -1 (default)ipv6.ip6-privacy: -1 (unknown)ipv6.addr-gen-mode: defaultipv6.ra-timeout: 0 (default)ipv6.mtu: autoipv6.dhcp-duid: --ipv6.dhcp-iaid: --ipv6.dhcp-timeout: 0 (default)ipv6.dhcp-send-hostname: yesipv6.dhcp-hostname: --ipv6.dhcp-hostname-flags: 0x0 (none)ipv6.auto-route-ext-gw: -1 (default)ipv6.token: --proxy.method: noneproxy.browser-only: noproxy.pac-url: --proxy.pac-script: --Statistics: Posted by OccamBlazer — Wed Jun 18, 2025 8:48 pm