Zhouyao's Blog

Do Something Big With Us

设置树莓派3 B+的静态IP

《设置树莓派3 B+的静态IP》

修改/etc/dhcpcd.conf 文件

sudo vim /etc/dhcpcd.conf

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

上面的配置文件中 , eth0是有线的配置 , wlan0是无线配置

ip_address就是静态IP , 后面要接/24

routers是网关

static domain_name_servers是DNS

 

点赞

发表评论

电子邮件地址不会被公开。 必填项已用*标注

− 3 = 5

This site uses Akismet to reduce spam. Learn how your comment data is processed.