Static Routes in CentOS 5.2

In: Linux| Network

4 Nov 2008

To add a static route in CentOS 5.2 create a file specific to the interface in /etc/sysconfig/network-scripts.

For example, if you are adding routes where the route’s gateway will be on the network in use on eth0, you will create the following file: route-eth0

In the file add the following parameters:

GATEWAY0=192.168.195.2
NETMASK0=255.255.255.0
ADDRESS0=10.0.0.0

For each subsequent route statement increment the number that is appended to each parameter.

Share and Enjoy:

  • Print this article!
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Live
  • MySpace
  • Netvibes
  • Reddit
  • Slashdot
  • SphereIt
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Technorati
  • Twitter
  • Yahoo! Bookmarks

Related Posts:


Comment Form

Recent Posts