树莓派设置固定ip

树莓派设置固定ip


本文博客链接:http://blog.csdn.net/jdh99,作者:jdh,转载请注明.


修改文件/etc/network/interfaces


原文件:

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp


修改为:

auto lo

iface lo inet loopback
iface eth0 inet static

address 192.168.1.110
netmask 255.255.255.0
gateway 192.168.1.1

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

重启即可

你可能感兴趣的:(树莓派设置固定ip)