標題:
【Raspberry Pi】——Static IP on Raspbian platform
[打印本頁]
作者:
角色
時間:
2013-10-14 17:39
標題:
【Raspberry Pi】——Static IP on Raspbian platform
In general static IP is widely deployed on an Asterisk server.
Reference information:
http://elinux.org/RPi_Setting_up_a_static_IP_in_Debian
作者:
角色
時間:
2013-10-14 17:49
本帖最後由 角色 於 2013-10-14 17:54 編輯
Based on the above link, we could easily modify the IP address of the Raspbian box as follows:
Static IP address = 192.168.88.100
Router IP = 192.168.88.1
Router gateway = 192.168.88.1
Router network = 192.168.88.0/24
1. Make a backup of the "interfaces" file
cp /etc/network/interfaces /etc/network/interfaces.sav
複製代碼
2a. Edit the file /etc/network/interfaces using
vi /etc/network/interfaces
複製代碼
2b. It gives
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
複製代碼
3. Modify and add lines as shown below
#auto lo
#iface lo inet loopback
#iface eth0 inet dhcp
# The loopback interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
#your static IP
address 192.168.88.100
#your gateway IP
gateway 192.168.88.1
netmask 255.255.255.0
#your network address "family"
network 192.168.88.0
broadcast 192.168.88.255
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
複製代碼
4. Restart the Raspbian box
/etc/init.d/networking restart
複製代碼
歡迎光臨 電訊茶室 (http://telecom-cafe.com/forum/)
Powered by Discuz! 7.2