• 已解决 73482 个问题
  • 已帮助 5993 位优秀工程师

树莓派3B如何设置静态IP和DNS

xoba1937 2017-07-20 浏览量:1439

RT,由于受到网络环境限制,需要设置静态IPDNS

怎么修改,是要配置什么文件吗?

谢谢了!

-1 0 收起

我来回答

上传资料:
选择文件 文件大小不超过15M(格式支持:doc、ppt、xls、pdf、zip、rar、txt)
最佳答案
  • cd /etc/network
    

    sudo nano interfaces

    iface eth0 inet static
    address 192.168.1.xx
    netmask 255.255.255.0
    gateway 192.168.1.1

    • 发布于 2017-07-20
    • 举报
    • 评论 0
    • 0
    • 0

其他答案 数量:4
  • http://blog.csdn.net/liang890319/article/details/8646125
    • 发布于2017-07-20
    • 举报
    • 评论 0
    • 0
    • 0

chen0000009 回复了 chen0000009 :先打开配置文件,方法是 sudo vim /etc/dhcpcd.conf 然后修改如下语句 interface eth0 static ip_address=IP地址/端口号 static routers=路由器IP地址 static domain_name_servers=DNS地址 interface wlan0 static ip_address=IP地址/端口号 static routers=路由器IP地址 static domain_name_servers=DNS地址 回复

  • 更改/etc/network/interfaces
    # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 192.168.1.58 gateway 192.168.1.1 network 192.168.1.0 broadcast 192.168.1.255 dns-nameservers 66.212.63.228 66.212.48.10

    照上面範例置換您的IP即可
    • 发布于2017-07-20
    • 举报
    • 评论 0
    • 0
    • 0

相关问题

问题达人换一批

树莓派3B如何设置静态IP和DNS