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
Enctype : Specifies the type of encoding the brows...
<br />In the previous article, I introduced ...
The most important thing for idea to package a we...
During system maintenance, you may need to check ...
Two cases: 1. With index 2. Without index Prerequ...
1. Object-oriented class inheritance In the above...
Table of contents Block-level functions Directly ...
1. Installation process MySQL version: 5.7.18 1. ...
Abstract: Whether at work or in an interview, opt...
1. Function : Allows the parent component to inse...
People who use virtual machines usually set up sh...
I'm playing with big data recently. A friend ...
The img tag in XHTML is so-called self-closing, w...
In HTML pages, visual elements such as buttons an...
Let’s learn together 1. Traditional methods Copy ...