或许对于大神来说这是个很简单的问题了,但是对于菜鸟级别的我来说还算是个问题,百度了无数个文章,一篇一篇的尝试,都会有问题,最后终于成功了。记录下配置的详细内容。


虚拟机配置:

[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 

DEVICE=eth0

HWADDR=00:0C:29:F8:B8:22

TYPE=Ethernet

UUID=e5d9ac4a-b439-4619-84ff-a6daf5b4adcd

ONBOOT=yes

NM_CONTROLLED=no

BOOTPROTO=dhcp


[root@localhost ~]# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:0C:29:F8:B8:22  

          inet addr:192.168.76.128  Bcast:192.168.76.255  Mask:255.255.255.0


[root@localhost ~]# route -n

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

192.168.76.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0

169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eth0

0.0.0.0         192.168.76.2    0.0.0.0         UG    0      0        0 eth0


物理机配置

VMnet8的IP地址为192.168.76.1



VMware配置:

wKioL1b-lnOxIQhHAAJXh5NWBdM123.jpg


wKioL1b-lrGzl7JTAAHqWRODNK8502.jpg