Press "Enter" to skip to content

树莓派 3B+ 设置静态 IP

修改/etc/dhcpcd.conf文件

sudo vim /etc/dhcpcd.conf

添加如下配置

# 有线配置
interface eth0

# 静态IP地址 24是CIDR值 子网掩码对应255.255.255.0
static ip_address=192.168.0.10/24

# 网关地址
static routers=192.168.0.1

# DNS服务器
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
    发表回复

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