Set static IP
Modify the /etc/dhcpcd.conf file
In the command line, enter:
sudo vim /etc/dhcpcd.conf
Add the following content after the file
interface eth0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
interface wlan0
static ip_address=192.168.0.200/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
In the above configuration file, eth0 is the wired configuration, wlan0 is the wireless configuration
ip_address (static IP address), and "/24"
is added at the end routers is the gateway of the IP address
domain_name_servers is DNS
Finally restart the system:
sudo reboot
Daily Notes 190324 Raspberry Pi 3B+ |
---|