lanwenzhu

配置网卡操作:

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  配置当前主机默认网关

 

重启网卡命令:

systemctl  restart  networking

分类:

技术点:

相关文章: