I have herd 3 different ways to store gateway information on redhat system

  1. /etc/sysconfig/network
  2. /etc/sysconfig/static-routes
  3. /etc/sysconfig/network-scripts/route- files

I am not aware of differences between above ways. Help me to know differences and correct way


According to the RHEL documentation the default gateway configuration is done through the /etc/sysconfig/network file.

Configuring the Default Gateway

The default gateway is determined by the network scripts which parse the /etc/sysconfig/network file first and then the network interface ifcfg files for interfaces that are “up”.


GATEWAY=<value>, where <value> is the IP address of the network's gateway.

  • is /etc/sysconfig/network is deprecated ? – Ragini Dahihande Feb 2 at 10:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.