返回列表 發帖

【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: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
  1. cp /etc/network/interfaces /etc/network/interfaces.sav
複製代碼
2a. Edit the file /etc/network/interfaces using
  1. vi /etc/network/interfaces
複製代碼
2b. It gives
  1. auto lo

  2. iface lo inet loopback
  3. iface eth0 inet dhcp

  4. allow-hotplug wlan0
  5. iface wlan0 inet manual
  6. wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
  7. iface default inet dhcp
複製代碼
3. Modify and add lines as shown below
  1. #auto lo

  2. #iface lo inet loopback
  3. #iface eth0 inet dhcp

  4. # The loopback interface
  5. auto lo
  6. iface lo inet loopback
  7. auto eth0
  8. iface eth0 inet static

  9. #your static IP
  10. address 192.168.88.100

  11. #your gateway IP
  12. gateway 192.168.88.1
  13. netmask 255.255.255.0

  14. #your network address "family"
  15. network 192.168.88.0
  16. broadcast 192.168.88.255

  17. allow-hotplug wlan0
  18. iface wlan0 inet manual
  19. wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
  20. iface default inet dhcp
複製代碼
4. Restart the Raspbian box
  1. /etc/init.d/networking restart
複製代碼

TOP

返回列表