Raspi: Speicherort Netzwerkdaten bzw. IP-Adresse
Hallo in die Runde,
mal ne Grundsatzfrage: Wo speichert z.B. ein Raspi seine Netzwerkinformationen (zB. fixe IP, Maske, usw.) ?!
Ich bin davon ausgegangen, dass solche Infos auf der Speicherkarte hinterlegt werden?! Wenn ich die HW jedoch austausche und mit der konfigurierten Speicherkarte bestücke, haben die Geräte schon das zweite Mal Probleme im Netzwerk erkannt zu werden?!
Kann das sein?! Bzw. warum ist das so?!
ERGÄNZUNG: Es handelte sich um Modell 3+ und 4, die ich gegeneinander tauschte.
Ups. Oder ist das am Ende kein Speicher, sondern schlicht ein Treiberproblem?!
mal ne Grundsatzfrage: Wo speichert z.B. ein Raspi seine Netzwerkinformationen (zB. fixe IP, Maske, usw.) ?!
Ich bin davon ausgegangen, dass solche Infos auf der Speicherkarte hinterlegt werden?! Wenn ich die HW jedoch austausche und mit der konfigurierten Speicherkarte bestücke, haben die Geräte schon das zweite Mal Probleme im Netzwerk erkannt zu werden?!
Kann das sein?! Bzw. warum ist das so?!
ERGÄNZUNG: Es handelte sich um Modell 3+ und 4, die ich gegeneinander tauschte.
Ups. Oder ist das am Ende kein Speicher, sondern schlicht ein Treiberproblem?!
Bitte markiere auch die Kommentare, die zur Lösung des Beitrags beigetragen haben
Content-ID: 560014
Url: https://administrator.de/forum/raspi-speicherort-netzwerkdaten-bzw-ip-adresse-560014.html
Ausgedruckt am: 02.04.2025 um 02:04 Uhr
10 Kommentare
Neuester Kommentar
Wo speichert z.B. ein Raspi seine Netzwerkinformationen (zB. fixe IP, Maske, usw.) ?!
Wird alles in der /etc/dhcpcd.conf geregelt !Man achte auf das "d" !
Es handelte sich um Modell 3+ und 4, die ich gegeneinander tauschte.
Ist irrelevant. Entscheident ist die Raspian Version. In Stretch und Buster ist das aber identisch !Fixe IP, das ist ja das Problem
Warum ? Trage die Mac Adresse des RasPis im DHCP Server deines Routers ein und weise ihm immer eine feste IP zu ! Fertisch.Ansonsten immer über die gut dokumentierte /etc/dhcpcd.conf
Über das Static Backup Profil dort in der dhcpcd.conf kannst du ihm auch eine statische IP zuweisen die er verwendet wenn er DHCP Client ist aber wenn er keinen DHCP Server im Netz findet !
Dafür müsste ich aber doch auf die ssh-Oberfläche?!
Nicht unbedingt ?Tastatur und Monitor geht natürlich auch !
Aber bei einem headless RasPi hat ja nun jeder Dummie immer den SSH Server aktiv um remote per SSH und PuTTY oder TeraTerm auf ihn zuzugreifen.
Klicki Bunti Knechte installieren den xrdp um mit Winblows RDP aufs GUI zuzugreifen.
Oder Browser mit Shellinabox.
Machst du das denn nur mit Hand auflegen ???
Guckst du hier:
Netzwerk Management Server mit Raspberry Pi
Das ist ja das komische, ssh findet keinen Route to Horst
Ist der RasPi denn in einem anderen IP Segment oder hängt er im lokalen LAN der FritzBüx ?Im lokalen LAN sollte die FB in jedem Falle den RasPi "sehen".
Solltest du allein schon im FB DHCP Server anhand der Mac Adresse sehen. ifconfig zeigt dir die LAN (eth0) Mac Adresse des RasPis an.
So sähe eine dhcpcd Konfig mit dynmaischer DHCP IP aus:
# 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.
hostname
# 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_servers, 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
# Example static IP configuration:
#interface eth0
#static ip_address=192.168.0.10/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
#static routers=192.168.0.1
#static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1
# It is possible to fall back to a static IP if DHCP fails:
# define static profile
#profile static_eth0
#static ip_address=192.168.1.23/24
#static routers=192.168.1.1
#static domain_name_servers=192.168.1.1
# fallback to static profile on eth0
#interface eth0
#fallback static_eth0 ##
So mit einer statischen:
# 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.
hostname
# 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_servers, 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
# Example static IP configuration:
interface eth0
static ip_address=192.168.178.10/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
static routers=192.168.178.1
static domain_name_servers=192.168.178.1
# It is possible to fall back to a static IP if DHCP fails:
# define static profile
#profile static_eth0
#static ip_address=192.168.1.23/24
#static routers=192.168.1.1
#static domain_name_servers=192.168.1.1
# fallback to static profile on eth0
#interface eth0
#fallback static_eth0 ##
Und so eine mit einem statischen Fallback auf die IP 192.168.1.222/24 (DNS weiter FritzBox IP) wenn kein DHCP Server im Netz gefunden wird wie z.B. an deinem MacBook Port:
# 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.
hostname
# 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_servers, 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
# Example static IP configuration:
#interface eth0
#static ip_address=192.168.0.10/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
#static routers=192.168.0.1
#static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1
# It is possible to fall back to a static IP if DHCP fails:
define static profile
profile static_eth0
static ip_address=192.168.1.222/24
static routers=192.168.1.1
static domain_name_servers=192.168.178.1
# fallback to static profile on eth0
interface eth0
fallback static_eth0 ##