LINUX(CENTOS6.8固定ip方法)附录win方法



查看默认配置(默认eth0是禁用的)
ifconfig -a 编辑网卡配置文件
vi /etc/sysconfig/network-scripts/ifcfg-eth0
##原来
DEVICE="eth0"
BOOTPROTO="dhcp"
HWADDR="00:0C:29:1E:FF:78"
IPV6INIT="yes"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="5bf70b4a-3602-4f17-a429-51b4f343f6cc"


##现在
DEVICE="eth0"
BOOTPROTO="static"
HWADDR="00:0C:29:1E:FF:78"
IPV6INIT="yes"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="5bf70b4a-3602-4f17-a429-51b4f343f6cc"


IPADDR="192.168.1.105"
NETMASK="255.255.255.0"
GATEWAY="192.168.1.1"
DNS1="118.118.118.7"
DNS2="202.100.199.8"
service network restart

win ipconfig /all 查出DNS
查看默认配置(默认eth0是禁用的)
ifconfig -a 【LINUX(CENTOS6.8固定ip方法)附录win方法】 编辑网卡配置文件
vi /etc/sysconfig/network-scripts/ifcfg-eth0

    推荐阅读