Raspberry pi4 LAN port communition
I use my laptop WiFi to eth0 connected raspberry Pi4.
We use 4 things to do.
- Putty
- cmd (window)
- dhcpcd5
- Window network Centor
◆ Go to network center and double click wifi.
◆ Open cmd
-> ipconfig
-> arp -a
I fixed my ip but, you can find 192.168.137.X (not 255).
◆ Go to putty and connect SSH.
sudo vim /etc/dhcpcd.conf or sudo nano /etc/dhcpcd.conf
interface eth0
statc ip_address=192.168.137.(number what you want not 0 or 1)/24
static routers=192.168.137.1
static netmask=255.255.255.0
After this, reboot raspberry pi.
And, reconnect ethernet wire.
Then, open the network center.
◆ Connect your fixed ip.
nano save -> ctrl + s nano quit -> ctrl + x vim insert -> i or a vim quit and save -> ESC, :(shift+;)wq
if you don’t have vim editor -> sudo apt-get install vim
if your dhcpcd.conf file is empty -> sudo apt-get install dhcpcd5
◆ tip command
-> route
-> ip route
-> ifconfig
Leave a comment