In the computer system, static routing and dynamic routing are different. Static routing is the routing information manually configured by the user to protect the network security. How to add a static route to the Linux system? How to add a permanent route? The following small series will introduce you to the method of adding a static router to Linux.
1, add a default route
route add default gw 10.0.0.1 (default takes effect only memory)
boot from the start can be appended to /etc /rc.local file
echo “route add default gw 10.0.0.1” 》》/etc/rc.local
2, add a static route
Route add -net 192.168.2.0/24 gw 192.168.2.254
To do this permanently:
echo “any net 192.168.2.0/24 gw 192.168.2.254” /etc/sysconfig/static-routes
Adding a static route to a host
route add -host 192.168.2.2 gw 192.168.2.254
To be permanent To do this:
echo “any host 192.168.2.2 gw 192.168.2.254 ” 》》/etc/sysconfig/static-routes
Note: Linux does not have this file by default, you have to manually Create a
The above is the introduction of Linux to add static routes, this article describes the addition of a default route, static routing, Yong The method of long static routing is selected according to the requirements.
GRUB is a multi-OS boot program, GRUB 2 adds a lot of new features to GRUB, more practical than GRUB
Linux system is similar to Unix system. When there is still a big difference, users
In the operation of CentOS system, yum is not available when upgrading Python, and yum is a more imp
Linux command, stty command is mainly used to print or modify the terminal settings, plus various pa
Summary of methods for modifying debian wheezy default configuration under Linux
Linux ls command operation example summary
How to solve the Linux account expiration?
Summary of zypper command usage in SUSE Linux system
Linux network management command list
How Linux uses commands to free memory
Linux system apachectl command instructions
How Linux uses Crontab to schedule daily work
Linux view method of memory resource usage
How Win8 changes the read-only or system properties of a folder
How to change the thumbnail size in the XP system
How do printers print test pages under Win10?
Win10 system upgrade prompt error code 0x80070006-0x2000c how to solve
Use pre-installed genuine Win7 to make the risk no longer exist
Let XP system also have the "library" function
e secret krn.exe takes up 100% of the CPU problem
How to set IE browser compatibility for Win8 system?
Let the WinXP system achieve the magic of running automatically