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

Example of automatic import method of vue3.0 common components

1. Prerequisites We use the require.context metho...

Perfect Solution for No rc.local File in Linux

Newer Linux distributions no longer have the rc.l...

Professional and non-professional web design

First of all, the formation of web page style main...

How to remove the dividing line of a web page table

<br />How to remove the dividing lines of a ...

JavaScript function syntax explained

Table of contents 1. Ordinary functions 2. Arrow ...

Graphic tutorial for installing MySQL 5.6.35 on Windows 10 64-bit

1. Download MySQL Community Server 5.6.35 Downloa...

The difference and usage of Ctrl+z, Ctrl+c and Ctrl+d in Linux commands

What does Ctrl+c, Ctrl+d, Ctrl+z mean in Linux? C...

Example code for implementing page floating box based on JS

When the scroll bar is pulled down, the floating ...

How does Vue track data changes?

Table of contents background example Misconceptio...

Vue defines private filters and basic usage

The methods and concepts of private filters and g...

JavaScript imitates Xiaomi carousel effect

This article is a self-written imitation of the X...

js realizes two-way data binding (accessor monitoring)

This article example shares the specific code of ...

Bootstrap FileInput implements image upload function

This article example shares the specific code of ...

JS uses the reduce() method to process tree structure data

Table of contents definition grammar Examples 1. ...

How to completely delete the MySQL 8.0 service under Linux

Before reading this article, it is best to have a...