Home  >  Article  >  Operation and Maintenance  >  What are the two ways to configure network parameters under Linux?

What are the two ways to configure network parameters under Linux?

王林
王林forward
2020-07-29 17:45:423838browse

What are the two ways to configure network parameters under Linux?

There are two ways to configure network parameters:

(Recommended tutorial: linux tutorial)

1. Temporary network Configuration

is implemented by modifying network-related parameters in the current kernel through commands. It takes effect immediately after configuration and becomes invalid after restarting.

2. Permanent network configuration

By directly modifying the network To implement the relevant configuration files, you need to restart the service and retain all configurations after restarting

(Recommended video tutorial: linux video tutorial)

Configure the network under Linux, always If you will encounter the concepts of bridging and NAT mode, here is a brief excerpt:

The virtual machine in bridge mode is like an adult who has "passed the household registration" at the router "Civil Affairs Bureau" and has its own separate Although he lives in the same compound as the host, he still has a household registration and can communicate directly with the outside world with great arrogance.

The virtual machine in NAT mode is simply a black account that has never registered a household registration. The "Civil Affairs Bureau" of the router does not know that there is such a person at all, and naturally it will not take the initiative to communicate with it. Even if the virtual machine occasionally sends some letters to the outside world, it must be forwarded to the host in the name of the host. The host also specially hired an old man called NAT to be responsible for sending and receiving letters to these virtual machines.

The virtual machine in host mode is purely a black slave. Not only does it not have a household registration or a router, the "Civil Affairs Bureau" does not know such a person, but it is also locked in a small dark room by the host, and even letters are It is not allowed to be sent out.

The above is the detailed content of What are the two ways to configure network parameters under Linux?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:juejin.im. If there is any infringement, please contact admin@php.cn delete