VMWare中CentOS ifcfg-eth0配置方法(亲测直接可用)
这些配置是基于VMware Network Adapter VMnet8,假设我的VMware Network Adapter VMnet8 ip地址是192.168.106.1
具体如下图:
则我的ifcfg-eth0文件配置如下:
DEVICE=eth0 TYPE=Ethernet UUID=f9f0898c-bf2c-4183-857a-eab291cd904d ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=static IPADDR=192.168.106.130 NETMASK=255.255.255.0 BROADCAST=192.168.106.255 GATEWAY=192.168.106.2 DNS1=114.114.114.114 DNS2=8.8.8.8 DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth0" HWADDR=00:0C:29:22:D2:64 PEERDNS=yes PEERROUTES=yes LAST_CONNECT=1456741165
我将我CentOS的ip设置为192.168.106.130 与VMware Network Adapter VMnet8在同一个网段。
注:ifcfg-eth0文件在CentOS中的路径为:/etc/sysconfig/network-scripts/ifcfg-eth0
修改文件后要执行命令#service network restart 或者 #/etc/init.d/network restart 使修改生效
相关推荐
changecan 2020-11-19
ECSHOP专属建设 2020-11-13
88427810 2020-11-02
步知道 2020-10-27
Junzizhiai 2020-10-10
jackalwb 2020-10-05
小网管 2020-09-03
shiwenqiang 2020-09-14
85251846 2020-09-14
summerinsist 2020-08-21
87901735 2020-08-19
PinkBean 2020-08-11
85407718 2020-08-09
MichelinMessi 2020-07-30
suosuo 2020-07-28
CARBON 2020-07-28
lizhengfa 2020-07-27
88427810 2020-07-26