Centos virtual machine configuration network

1. Physical machines view their network configuration on the network such as ipconfig find:

 

 The segment is 172.20.10.x

 

2.centos modify the network configuration:

Switching paths: cd / etc / sysconfig / network-scripts

 

 

3. The card configuration editor: vi ifcfg-ens33 need to modify the position in which:

ONBOOT = yes -------------------- whether to start networking services

BOOTPROTO = static ---------------------- whether to automatically obtain ip

Increased static Ip address and gateway, DNS (note gateways and network ip address to a physical machine)

IPADDR = 172.20.10.x --------------------- static ip address

NETMASK = 255.255.255.0 -------------------- subnet mask

GATEWAY = 172.20.10.1 ---------------------- Gateway

DNS1=8.8.8.8                         --------------------DNS

 

4. physical machine address ping Centos

 

Guess you like

Origin www.cnblogs.com/zhangzimo/p/12559014.html