Centos8 bridge static IP configuration method in VMware virtual machine

Centos8 bridge static IP configuration method in VMware virtual machine

1. Make sure the network connection method is bridged

To select Copy physical network connection status

2. Edit the network card file

vim /etc/sysconfig/network-scripts/ifcfg-ens160

The last ifcfg-ens160 is my network card file. There are a lot of ways to find network card files on the Internet, so I won't go into details.

Network card file content

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static # This was originally dhcp, changed to static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens160
UUID=76b80c19-2841-4df6-aa8d-e7bfef018320
DEVICE=ens160
ONBOOT=yes   
# The following is a new configuration IPADDR=192.168.0.111 # The first three segments of the ip address should be consistent with the host machine, and the fourth segment should be different from the host machine IP GATEWAY=192.168.0.1 # The gateway is the same as the host machine NETMASK=255.255.255.0 # The subnet mask is usually this DNS1=114.114.114.114 # DNS address. Some tutorials on the Internet say that you can leave it blank, but I can't leave it blank, and I don't need to change it. Just write this

3. Restart the network card

  • Save after editing
  • Restart the network card service nmcli c reload
  • Finally, ping Baidu to test whether it is working or not. ping www.baidu.com

4. Possible problems

The virtual machine may be able to ping the external network but cannot ping the host. This may be because Windows has a firewall turned on. Just go to the control panel and turn off the firewall.

Summarize

The above is the bridge static IP configuration method of Centos8 in VMware virtual machine introduced by the editor. I hope it will be helpful to everyone. Thank you very much for your support of the 123WORDPRESS.COM website!

You may also be interested in:
  • Centos8 (minimum installation) tutorial on how to install Python3.8+pip
  • Detailed explanation of setting static ip network card for CentOS 8 VMware virtual machine to access the Internet
  • Install CentOS7 in VMware (set static IP address) and install mySql database through docker container (super detailed tutorial)
  • Install zip and unzip command functions under Linux and CentOS (server)
  • Detailed explanation of how to configure static IP in Centos8
  • Implementation of IP address configuration in Centos7.5
  • How to set static IP in centOS7 bridge mode
  • CentOS IP connection network implementation process diagram

<<:  A simple method to deal with the tabBar at the bottom of WeChat applet blocking content

>>:  Detailed explanation of long transaction examples in MySQL

Recommend

JavaScript implementation of verification code case

This article shares the specific code for JavaScr...

MySql fuzzy query json keyword retrieval solution example

Table of contents Preface Option 1: Option 2: Opt...

Installation and use of mysql on Ubuntu (general version)

Regardless of which version of Ubuntu, installing...

Summarize some general principles of web design and production

<br />Related articles: 9 practical suggesti...

How to run Spring Boot application in Docker

In the past few days, I have studied how to run s...

Detailed explanation of JavaScript stack and copy

Table of contents 1. Definition of stack 2. JS st...

Summary of React's way of creating components

Table of contents 1. Create components using func...

A brief discussion on the magical uses of CSS pseudo-elements and pseudo-classes

CSS plays a very important role in a web page. Wi...

jQuery implements a simple carousel effect

Hello everyone, today I will share with you the i...

In-depth explanation of Mysql deadlock viewing and deadlock removal

Preface I encountered a Mysql deadlock problem so...

JavaScript uses canvas to draw coordinates and lines

This article shares the specific code of using ca...

Why Seconds_Behind_Master is still 0 when MySQL synchronization delay occurs

Table of contents Problem Description Principle A...

Modify the maximum number of mysql connections and configuration files in docker

1. Find the mysql image docker ps 2. Enter the mi...