So, I am attempting to set a static IP address on my Raspberry Pi 3B+.
OS:
Raspbian 10 Buster Lite
My NodeJS script was working fine with a dynamic IP address. So I went into /etc/dhcpcd.conf and, at the end of the file added:
Code: Select all
interface eth0
static ip_address=192.168.1.55/20
static routers=192.168.1.1
static domain_name_servers=192.168.1.33 192.168.1.36
interface wlan0
static ip_address=192.168.1.55/20
static routers=192.168.1.1
static domain_name_servers=192.168.1.33 192.168.1.36
Then after I rebooted, when I run command sudo ifconfig, I receive:
Code: Select all
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether b8:27:eb:c1:c6:ed txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.55 netmask 255.255.240.0 broadcast 192.168.15.255
inet6 fe80::8850:de90:bf3e:3bad prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:94:93:b8 txqueuelen 1000 (Ethernet)
RX packets 135 bytes 14840 (14.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 24 bytes 3580 (3.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Note, I am only using the WiFi (no Ethernet cable is plugged in). The NodeJS script is set to automatically run at boot.
Then, when I attempt an HTTP request, or attempt to SSH into the Pi (with the new IP address or the old), neither work.
Can anyone help me? I have no clue what is wrong here. The settings I added in at the top are correct. I'm really hoping someone can help me out here.
Thanks