Linux的网卡配置

一、ubuntu配置:

auto ens3
iface ens3 inet static
address 10.11.133.66
netmask 255.255.254.0
gateway 10.11.133.254
dns-nameservers 10.23.1.18 8.8.8.8

二、centos配置

三、dns配置

临时的dns配置vi /etc/resolv.conf

永久的dns配置需要在网卡文件里配置

原文地址:https://www.cnblogs.com/erdanyang/p/10899423.html