RHEL: How can I set up routes that are persistent?

Updated -
  • One way is to edit /etc/sysconfig/network-scripts/route-ethX (reflecting the ifcfg-ethX naming convention) and add the target network, netmask and gateway address.
ADDRESS0=192.168.1.0
NETMASK0=255.255.255.0
GATEWAY0=192.168.10.5
ADDRESS1=192.168.3.0
NETMASK1=255.255.255.0
GATEWAY1=192.168.10.5
  • Or add the ip route command to /etc/r...

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.