Network connection configuration centos7

Look at the local IP configuration, remember what ip address, gateway and DNS server address information

 

View the virtual machine configuration, set the virtual machine network bridge mode


The system then proceeds centos
vi / etc / sysconfig / network- scripts / ifcfg-ens33

edit the file ifcfg-eno16777736 (different cards of different files), configure a static IP, instead = BOOTPROTO "static"
BOOTPROTO = "static"

Add and gateways provided static iP (iP, network gateway according to their modifications, DNS DNS configuration for their computers to the Internet) and finally add the IPADDR generally provided on the basis of a native or ip plus two

the IPADDR = 192.168.43.200
NETMAST = 255.255.255.0
GATEWAT = 192.168.43.1
the DNS = 192.168.43.1
ZONE = public
save and exit wq
modified


Execute commands, network next restart
systemctl restart network.service

verify correct IP configuration
ip addr


Verify that you can access the Internet

Unable to access the Internet may be due to incorrectly configured dns, another virtual machine using the bridge mode
configuration tool can be used xshell connection configuration of the IP access to the server centos.

----------------
Disclaimer: This article is the original article CSDN bloggers "xiehdsoo", and follow CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement. .
Original link: https://blog.csdn.net/xiehd313/article/details/80814584

Guess you like

Origin www.cnblogs.com/hi3254014978/p/12668471.html