0

I have a raspberry pi 4 with latest version of raspian and i want 2 things:

1 - static IP for eth0 port, so that I can guarantee access via ssh without any monitor. 2 - configure a wifi network via SSH to my raspberry connect automatically.

for a static ip eth0 it's simple, first in /etc/network/interfaces.d folder, i created a file named eth0:

allow-hotplug eth0
iface eth0 inet static
address 192.168.0.10
network 192.168.0.0
netmask 255.255.255.0
gateway 192.168.0.1

and in /etc/dhcpcf/conf:

interface eth0
static ip_adresss=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1

to connect my rpi in wifi, i try in /etc/wpa_supplicant/wpa_supplicant.conf

network={
        ssid="HYBRAZIL-CGH-SIMONESIA-EST"
        psk="HYbrazil2009"
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP
        group=CCMP
        auth_alg=OPEN
}

My router was WPA2-PSK key, and i reboot many times, but the rpi doesn't connect to wifi. What can i do?

Thanks a lot!

3
  • What OS? Don't know this raspian. You have listed 2 incompatible networking protocols NEITHER of which is the default for the latest Raspberry Pi OS which uses NetworkManager.
    – Milliways
    Feb 16 at 22:09
  • I installed Raspian using raspian imager, i.e downloaded the lasters version available. About incompatible networking protocols, i'm doing any wrong? What i have to do? Feb 16 at 22:39
  • Why are people so reluctant to say exactly what OS they have installed? You can't have installed Raspian (sic) with the imager (unless you supplied your own image).
    – Milliways
    Feb 16 at 22:47

1 Answer 1

0

Assuming you have installed Raspberry Pi OS Bookworm DELETE the files you added and see https://raspberrypi.stackexchange.com/a/145594/8697.

I strongly suggest you DON'T attempt to use static IP addresses unless you have a very specific reason. Let your router do its job.

1
  • Thanks! I need use static IP due to a question of standardization. Feb 19 at 13:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.