Centos 7.5 under VMware Host network with static IP access extranet
Setting the network connection mode
Modify IP:
|
cd/etc/sysconfig/network-scripts/ |
|
Type=ethernet
#BOOTPROTO =DHCP
Bootproto=static
ipaddr=10.10.1.120
netmask=255.255.255.0
Nm_comtrolled=no
Defroute=yes
Peerdns=yes
Peerroutes=yes
Ipv4_failure_fatal=no
Ipv6init=yes
Ipv6_autoconf=yes
Ipv6_defroute=yes
Ipv6_peerdns=yes
Ipv6_peerroutes=yes
Ipv6_failure_fatal=no
Ipv6_addr_gen_mode=stable-privacy
Name=ens33
Uuid=6db400da-e125-4f24-a660-46460a7b07c8
Device=ens33
Onboot=yes
dns1=10.10.1.1
gateway=10.10.1.1
|
|
[Email protected] network-scripts]# service network restart
Restarting network (via Systemctl): [ OK ] |
shared network
Open Network connection, click Properties
Switch to sharing and allow VMware network sharing
Agree
To switch to a virtual machine:
|
[[email protected] ~]# Ping www.baidu.com
PING www.a.shifen.com (14.215.177.37) bytes of data.
Bytes from 14.215.177.37 (14.215.177.37): icmp_seq=1 ttl=55 time=10.0 ms
Bytes from 14.215.177.37 (14.215.177.37): icmp_seq=2 ttl=55 time=10.1 ms
Bytes from 14.215.177.37 (14.215.177.37): icmp_seq=3 ttl=55 time=11.1 ms |
Centos 7.5 under VMware Host network with static IP access extranet