step1、
root@bt:~# vi /etc/network/interfaces 編輯IP 地址
auto eth0
#iface eth0 inet dhcp 用dhcp分配就只需要這一句就可以了。
iface eth0 inet static
address 192.168.11.200 設置IP地址
netmask 255.255.255.0 子網掩碼
network 192.168.11.0 網絡地址
broadcast 192.168.11.255 廣播地址
gateway 192.168.11.6 網關地址
step2、
vi /etc/resolv.conf
nameserver 202.202.32.33 #首選DNS服務器
nameserver 61.128.128.68 #備用DNS服務器
如果家主機是路由上網,建議直接橋接吧。DNS直接寫你路由裏面的DNS,網關也可以。
step3、root@bt:~# /etc/init.d/networking restart 重啓網絡