1、配置文件/etc/network/interfaces
2、auto eth0配置,加上该配置,系统自动加载eth0网卡。
3、iface eth0 inet (dhcp/loopback/static)
4、address 192.168.1.100 配置IP地址
5、netmask 255.255.255.0 配置掩码
6、gateway 192.168.1.1 配置网关
最终配置:
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1