In RedHatEnterpriseLinux, configure Static Routing-Linux Enterprise Application-Linux server application information. For details, see the following. Red Hat Enterprise Linux version 3:
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.
After completing the above work, you need to restart the system or restart the network:
Service network restart
Red Hat Enterprise Linux version 4:
Create the configuration file/etc/sysconfig/network-scripts/route-ethX for each network interface ethX.
The content is similar:
10.0.1.0/24 via 192.168.2.4 dev eth0
10.0.4.0/24 via 192.168.2.2 dev eth0
After that, restart the network:
Service network restart
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.