Several methods of adding permanent route to Linux system

Source: Internet
Author: User

Add the following routing entry in the system
Route add-net 192.168.10.0/24 GW 172.16.15.254
Route add-net 192.168.177.0/24 GW 172.16.15.254

Add a permanent static route (method one):
[Email protected] ~]# vi/etc/sysconfig/static-routes
Any net 192.168.10.0/24 GW 172.16.15.254
Any net 192.168.177.0/24 GW 172.16.15.254

Add a permanent static route (method two):
VI Route-ens33 (ENS33 is the interface form of the CENTOS7)
192.168.177.0/24 via 172.16.15.254 Dev ens33
192.168.10.0/24 via 172.16.15.254 Dev ens33

This article is from the "zhanguo1110" blog, make sure to keep this source http://zhanguo1110.blog.51cto.com/5750817/1626641

Several methods of adding permanent route to Linux system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.