Macbook in the Centos7 VMWare virtual machine configuration and allows to configure a static IP Internet

First, check the configuration itself Macbook

1. Open [System Preferences] - [Network] - [Wi-Fi] selected items (if you choose this item is WIFI Internet access) - On the right side [Advanced]

  Select [TCP / IP] tab, note the good [subnet mask], [router] address, DNS server address in the DNS tab (if the DNS server address is not configured, can be configured to a 8.8.8.8 or 114.114. 114.114)

  such as:

   Router address: 192.168.0.1

     Subnet Mask: 255.255.255.0

     DNS: 114.114.114.114 (if empty the mac present, may be configured to 8.8.8.8 or 114.114.114.114)

2, open Vmware virtual machine, paper Centos7 example:

  2.1 In Centos7 virtual machine state organs, open the Settings page Centos this Vmware virtual machine, select [Network adapter] that one.

      2.2 network adapter, the left is the current selection of the type of network, you need to switch to the [Wi-Fi] that one, clicking next to the Wi-Fi radio button.

 

3, open Vmware virtual machine, and open Centos7, and log root.

 

4, execute: vi / etc / sysconfig / network-scripts / ifcfg-ens33 delete the original configuration, and modify the following configuration.

TYPE="Ethernet"
BOOTPROTO="static"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
NAME="ens33"
UUID="69ee63ff-e105-4786-935f-3b29e3a04a4e"
DEVICE="ens33"
ONBOOT="yes"
IPADDR="192.168.0.10"
NETMASK="255.255.255.0"
GATEWAY="192.168.0.1"
DNS1="114.114.114.114"
IPV6_PEERDNS="yes"
IPV6_PEEROUTES="yes"
IPV6_PRIVACY="no"

  Note: IP addresses can write a new address, and router addresses to MAC this is your Wifi connection in the same network segment. Gateway configured your Mac then this router address [display], NetMask configure your subnet mask. In addition, to remove the extra configuration, otherwise there may not be on the network.

 

5, restart the network card

systemctl restart network

 

6, check whether the Internet

ping www.baidu.com

 

7, using the SSH connection Macbook virtual machine

 

Guess you like

Origin www.cnblogs.com/songxingzhu/p/10926744.html