Raspberry pi4 LAN port communition

less than 1 minute read

I use my laptop WiFi to eth0 connected raspberry Pi4.

We use 4 things to do.

  1. Putty
  2. cmd (window)
  3. dhcpcd5
  4. Window network Centor

◆ Go to network center and double click wifi.

net

◆ Open cmd

-> ipconfig
net2

-> arp -a
net3

I fixed my ip but, you can find 192.168.137.X (not 255).

◆ Go to putty and connect SSH.

net4

sudo vim /etc/dhcpcd.conf or sudo nano /etc/dhcpcd.conf

net5

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.

net6

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

GO TO TOP

Updated:

Leave a comment