Configure static routes in RedHatEnterpriseLinuxversion3

Source: Internet
Author: User
In RedHatEnterpriseLinuxversion3, configure Static Routing-Linux Enterprise Application-Linux server application information. For more information, see the following. If this is the first configuration in Red Hat Enterprise Linux, you need to create a new file to add a static route. The file name is/etc/sysconfig/network-scripts/route-ethX. X indicates the interface number of the NIC to which you want to add a static route. This file requires three domains: GATEWAY, NETMASK, and ADDRESS. Each domain must be followed by a number indicating that this domain is related to that route. The following example shows that two static routes are configured for the network interface eth0.

/Etc/sysconfig/network-scripts/route-eth0
GATEWAY0 = 10.10.0.1
NETMASK0 = 255.0.0.0
ADDRESS0 = 10.0.0.0

GATEWAY1 = 10.2.0.1
NETMASK1 = 255.255.0.0
ADDRESS1 = 192.168.0.0

After completing the above work, you need to restart the system or restart the network:

Service network restart

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.