CentOS 7 method to modify the gateway and configure the IP example

CentOS 7 method to modify the gateway and configure the IP example

When installing the centos7 version, choose to connect to the external network, then you can directly access the external network, just need to set a static IP.


Modify the configuration file

vi /etc/sysconfig/network-scripts/ifcfg-eno16777728


Set the solid IP and gateway, just add it yourself, but the gateway needs to be reset if it changes to another location. You can add multiple ones. After the modification is completed: wq save and exit


Restart the network


The network of the virtual machine can be turned on, and win and the virtual machine can ping each other, and the setting is successful

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:
  • How to configure a static IP address for CentOS 7 (2 ways)
  • How to configure IP address whitelist using iptables under centOS7
  • Detailed explanation of three methods to configure IP address in CentOS 6.5 under virtual machine
  • Detailed explanation of how to configure static IP with dual network cards in centos7
  • How to configure ip forward (virtual router) under CentOS7
  • One-click configuration of CentOS iptables firewall Shell script sharing
  • Detailed explanation of configuring IPv6 address for Alibaba Cloud ECS (CentOS7) in Linux
  • Alibaba Cloud CentOS iptables firewall configuration tutorial
  • How to configure IP address for Centos virtual machine Internet access
  • How to configure static IP in Centos7
  • CentOS server iptables configuration simple tutorial

<<:  How to modify the length limit of group_concat in Mysql

>>:  Detailed explanation of key uniqueness of v-for in Vue

Recommend

React example showing file upload progress

Table of contents React upload file display progr...

Quickly get started with VUE 3 teleport components and usage syntax

Table of contents 1. Introduction to teleport 1.1...

MySQL table return causes index invalidation case explanation

Introduction When the MySQL InnoDB engine queries...

React concurrent function experience (front-end concurrent mode)

React is an open-source JavaScript library used b...

MySQL 5.7.21 installation and configuration tutorial

The simple installation configuration of mysql5.7...

Analysis of the advantages and disadvantages of MySQL stored procedures

MySQL version 5.0 began to support stored procedu...

MySQL master-slave replication configuration process

Main library configuration 1. Configure mysql vim...

You may not know these things about Mysql auto-increment id

Introduction: When using MySQL to create a table,...

How to execute Linux shell commands in Docker

To execute a shell command in Docker, you need to...

Javascript basics about built-in objects

Table of contents 1. Introduction to built-in obj...

How to clear the timer elegantly in Vue

Table of contents Preface optimization Derivative...

How to modify the initial password of MySQL on MAC

Problem description: I bought a Mac and installed...

Detailed analysis of the parameter file my.cnf of MySQL in Ubuntu

Preface Based on my understanding of MySQL, I thi...

Mysql: The user specified as a definer ('xxx@'%') does not exist solution

During the project optimization today, MySQL had ...

Summary of the Differences between SQL and NoSQL

Main differences: 1. Type SQL databases are prima...