Banana Pi 測試 – Gentoo Linux 網路設定

Banana Pi 上預設 Gentoo Linux 是採用 DHCP 自動取得 IP
# cat /etc/conf.d/net
#For DHCP
config_eth0=”dhcp”
dns_domain_lo=”lemaker”
nis_domain_lo=”lemaker”

固定 IP 的設定方式
[@more@]參考網頁:
Gentoo Forums :: 觀看文章 – Switching to a static IP (within your network)

1. 先備份原檔
# cp /etc/conf.d/net /etc/conf.d/net.$(date +%F)

2. 修改設定檔 /etc/conf.d/net
# vim /etc/conf.d/net
#For Static IP
config_eth0=( “192.168.1.44 netmask 255.255.255.0” )
routes_eth0=( “default gw 192.168.1.254” )
dns_servers_eth0=( “168.95.1.1 140.111.66.1” )

3. 重新開機或啟動網路
# /etc/init.d/net.eth0 restart