Subscribe Subscribe | Subscribe Comments RSS
Subscribe in Bloglines

Add to netvibes
Add to Google Reader or Homepage

The Default Gateway is the IP Address of a router or a routing device to which all the packet to a destination for which the server doesn't have a route will be forwarded to. Most of the servers in any network leave the routing job to the routers meaning there will be a default gateway added to the system and very little (if any) static routes added to it. This makes management much easier.

This procedure should work on Redhat Enterprise Linux, Fedora, Centos.

The default gateway in Redhat Enterprise Linux is set in the /etc/network file.

Edit the file and the Default Gateway IP Address as follows:

rhel5# vi /etc/network

Add the following lines

NETWORKING=yes
HOSTNAME=hostname.domain.com
GATEWAY=192.168.1.1

where HOSTNAME – sets the Hostname of the server or system

GATEWAY – sets the IP Address of the Default Gateway

This should add the default gateway to the server. For the changes to take effect, restart the network services as follows

rhel5# service network restart

or to just reread the interface config files

rhel5# service network reload
 

This should help. For information on adding or modifying IP Address click here. To add static routes in Redhat, click here

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

2 Comments so far »

  1. by amy, on May 30 2009 @ 6:23 am

     

    ** /etc/sysconfig/network **

  2. by Abdulla, on January 21 2010 @ 1:27 am

     

    What if you had ipv6 configured and you wanted to setup a gateway for ipv6?

Comment RSS · TrackBack URI

Leave a comment

Name: (Required)

eMail: (Required)

Website:

Comment: