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

Tutorial on Migrating Projects from MYSQL to MARIADB

Prepare the database (MySQL). If you already have...

Tutorial on deploying nginx+uwsgi in Django project under Centos8

1. Virtual environment virtualenv installation 1....

Install Docker on Linux (very simple installation method)

I have been quite free recently. I have been doin...

CSS float (float, clear) popular explanation and experience sharing

I came into contact with CSS a long time ago, but...

How to use the VS2022 remote debugging tool

Sometimes you need to debug remotely in a server ...

Mysql implementation of full-text search and keyword scoring method example

1. Introduction Today a colleague asked me how to...

Implementation of MySQL joint index (composite index)

Joint Index The definition of the joint index in ...

Detailed tutorial on configuring local yum source in CentOS8

The centos8 distribution is released through the ...

Optimal web page width and its compatible implementation method

1. When designing a web page, determining the widt...

Analysis of MySQL joint index function and usage examples

This article uses examples to illustrate the func...

The Complete List of MIME Types

What is MIME TYPE? 1. First, we need to understan...

How to implement batch deletion of large amounts of data in MySQL large tables

The question is referenced from: https://www.zhih...