Skip to navigation

Warning message

log in to add comments or rate this document

How to specify default gateway device if multiple interface has gateway ?

Updated 2014-02-28T04:54:35+00:00

Issue

  • How to specify default gateway device if multiple interface has gateway ?

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6

Resolution

  • In order to set any specific device to be the default gateway device in the system, then use following option in /etc/sysconfig/network file:
GATEWAYDEV=ethX

Root Cause

  • If a system has more than one interface, then the last interface which is being brought up will become the default gateway device. This is a designed behaviour in RHEL initscripts.