Architect learn the next day, VMware VMnet8 mode shared hosting static IP network configuration and DNS

I. Introduction
NAT network mode:

1. The host can be seen as a router, the virtual machine to access the Internet through a network of host;

2. You can install multiple virtual machines, make up a small LAN, such as: building hadoop cluster, distributed services.

Second, the configuration
1. VMnet8 set a static IP

 

 

 

 

2. Centos network adapter set NAT mode

 

 

 

 

3. VMware virtual network settings

 

 

 

 

4. Start the virtual machine

5. modify the network settings

First check the card name

# ip addr

 

 

Enter the network-scripts directory to find the file ifcfg-ens33

# cd /etc/sysconfig/network-scripts/
# ls

 

 

Edit ifcfg-ens33 file, modify the configuration

# vi ifcfg-ens33


Modify
BOOTPROTO = static # use a static IP
add
IPADDR = 192.168.5.100 # Set IP
NETMASK # Subnet Mask = 255.255.255.0
GATEWAY = 192.168.5.2 # Gateway
DNS1 = 192.168.5.2 # the DNS
NM_CONTROLLED = NO # Network mamager parameters with immediate effect, without rebooting ONBOOT = yes

 

 

6. Restart network

# Systemctl restart network
or
# the restart-Service Network
7. The verification results, see the following results, i.e., shared hosting network setup is successful

# ping www.baidu.com

 

Precautions:

 

 Reproduce generate about mac address

 

Guess you like

Origin www.cnblogs.com/tyfday/p/12624741.html