CentOS7 network configuration under VMware virtual machine (host wireless Internet access)

CentOS7 network configuration under VMware virtual machine (host wireless Internet access)

This is the first time I used the CentOS7 system and I encountered many problems when doing network configuration. I wrote this blog to record the solution to the problem. I welcome your comments.

1. Virtual Machine Settings

At the top of the VMware interface, select Virtual Machine -> Settings: Change the network connection to bridge mode, as shown below:


2. Check the host DNS address

Win+R, enter cmd, start the command line interface, enter ipconfig/all, and check the host DNS server address, as shown in the following figure:


Note that since this machine is connected to the Internet wirelessly, this is the DNS server address of the wireless LAN. Write down this address as it will be useful later.

3. Modify the CentOS7 network configuration file

1. Open the terminal in CentOS7 and enter cd /etc/sysconfig/network-scripts/

2. Enter vi ifcfg-ens33 to open the network configuration file ifcfg-ens33, as shown in the following figure:


The content of the configuration file is as follows:

TYPE=Ethernet # Network card type: Ethernet PROXY_METHOD=none # Proxy mode: Disabled BROWSER_ONLY=no # Only browser: No BOOTPROTO=dhcp # Boot protocol of network card: DHCP
DEFROUTE=yes # Default route: yesIPV4_FAILURE_FATAL=no # Disable IPV4 fatal error detection: noIPV6INIT=yes # Whether IPV6 is automatically initialized: yesIPV6_AUTOCONF=yes # Whether IPV6 is automatically configured: yesIPV6_DEFROUTE=yes # Can IPV6 be the default route: yesIPV6_FAILURE_FATAL=no # Disable IPV6 fatal error detection: noIPV6_ADDR_GEN_MODE=stable-privacy # IPV6 address generation model: stable-privacy 
NAME=ens33 # Network card physical device name UUID=42773503-99ed-443f-a957-66dbc1258347 # Universal unique identifier DEVICE=ens33 # Network card device name ONBOOT=no # Whether to start the computer. You can use systemctl restart network to restart the network.

3. Modify ONBOOT=yes and add DNS1=192.168.31.1. Set this DNS address to the local DNS address (the address you wrote down earlier)

Enter Esc :wq! to exit, as shown in the following figure:


Note: If the user does not have sufficient permissions, an error message will be displayed when saving. It is recommended to log in to the root account.

4. Enter systemctl restart network to restart the network. If no information is prompted, it means that the network restart is successful, as shown in the following figure:


At this point, all settings are completed and you can surf the Internet by opening the browser.


The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Install Linux using VMware virtual machine (CentOS7 image)
  • Detailed steps to install CentOS7 system on VMWare virtual machine
  • Windows uses VMware to create a Linux virtual machine and install the CentOS7.2 operating system
  • Tutorial diagram of installing centos7.3 on vmware virtual machine
  • VMWare virtual machine Centos7 installation of Oracle database tutorial diagram
  • CentOS7 installation graphic tutorial in Vmware virtual machine
  • 2022 latest version VMware virtual machine installation CentOS7 installation graphic tutorial

<<:  Mysql master-slave synchronization configuration scheme under Centos7 system

>>:  How to choose the right index in MySQL

Recommend

Basic operations on invisible columns in MySQL 8.0

Table of contents 01 Create invisible columns 02 ...

Detailed tutorial on installation and configuration of nginx under Centos7

Note: The basic directory path for software insta...

element-ui Mark the coordinate points after uploading the picture

What is element-ui element-ui is a desktop compon...

In-depth explanation of special permissions SUID, SGID and SBIT in Linux

Preface For the permissions of files or directori...

Vue implements form validation function

This article mainly describes how to implement fo...

js to realize the mouse following game

This article shares the specific code of js to im...

JavaScript history object explained

Table of contents 1. Route navigation 2. History ...

Implementing custom scroll bar with native js

This article example shares the specific code of ...

Box-shadow and drop-shadow to achieve irregular projection example code

When we want to add a shadow to a rectangle or ot...

Detailed steps to install MySQL 5.7 via YUM on CentOS7

1. Go to the location where you want to store the...

The basic use of html includes links, style sheets, span and div, etc.

1. Links Hypertext links are very important in HTM...

How to handle super large form examples with Vue+ElementUI

Recently, due to business adjustments in the comp...

Sequence implementation method based on MySQL

The team replaced the new frame. All new business...

MySQL optimization strategy (recommended)

In summary: 1. Consider performance when designin...