配置網卡操作:
vi /etc/network/interfaces
auto eth0
iface eth0 inet static 配置eth0使用默認的靜態地址
address 192.168.1.10 設置eth0的IP地址
netmask 255.255.255.0 配置eth0的子網掩碼
gateway 192.168.1.254 配置當前主機默認網關
配置DNS操作:
vi /etc/resolv.conf
nameserver 202.106.0.20 配置eth0的子網掩碼
nameserver 114.114.114.114 配置當前主機默認網關