Command to add a route: 1.Route add
2.ip ro add
Common parameters:
Let the route still take effect after restarting the server: 1. Add in /etc/rc.local: The command to add a route is: directly copy the command in the command line operation to the file, save and exit. 2. Write in the /etc/sysconfig/static-routes file: If the file does not exist, create it manually and add the following content: Refer to the shell statement in the /etc/init.d/network file:
Then, if you want to add a static route, the command is: Then, add the following format to the /etc/sysconfig/static-routes file: or Comparison of two ways to add static routes: 1.rc.local: Restart the server to take effect; If you restart the network service, the static route will become invalid; rc.local is the last script to be run after the system is started, so if a service such as NFS requires a network connection to be mounted, this method is not suitable. 2.static-routes: Restart the server to take effect; Restart the network service to take effect: Suitable for services that require network requirements; The script method of adding static routing is similar to rc.local: This method is actually to write your own script, put it at the beginning of /etc/rc3.d/ and set it to S. S means start, the numbers are the sequence, and K means stop. Generally, startup is the startup sequence of the daemon process in a certain mode. The smaller the number, the earlier the startup order; /etc/rc3.d is a text multi-user environment, which is generally used in production environments. **If you need to add static routes, try to add the static routes to the /etc/sysconfig/static-routes file. Avoid routing failure due to restarting network services, thereby avoiding failures. ** 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:
|
<<: Mysql database scheduled backup script sharing
>>: React's component collaborative use implementation
This article describes how to use docker to deplo...
Table of contents Overview Button-level permissio...
In actual projects, the up and down scroll bars a...
1. Storage Engine In the last section, we mention...
Preface vsftp is an easy-to-use and secure ftp se...
1. Create a runner container mk@mk-pc:~/Desktop$ ...
In fact, we have been hearing a lot about web des...
One of our web projects has seen an increase in t...
1. Background A sql-killer process is set up on e...
JDK download address: http://www.oracle.com/techn...
Table of contents MySQL case sensitivity is contr...
1. Nginx status monitoring Nginx provides a built...
Table of contents 1. Project construction 2: Dire...
Before talking about CSS priority, we need to und...
The first time I wrote a MySQL FUNCTION, I kept g...