nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

Static Route in Linux, permanent

This is a discussion on Static Route in Linux, permanent within the Linux software forums, part of the Linux Getting Started category; Dear All. I am using RHEL4. I have configured two NIC of my machine, the problem is that is taking ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 04-13-2006, 06:13 PM
Member
User
 
Join Date: Mar 2006
Posts: 63
Rep Power: 0
puppen
Default Static Route in Linux, permanent

Dear All.

I am using RHEL4. I have configured two NIC of my machine, the problem is that is taking eth1 as default route, I want to make it eth0 as default route.
One more thing I want to add another route using route add command but after rebooting m/c the route has deleted, how to make it permanent.
Where I have to put permanent route, which file it uses and what is the syntex?
Is it that file /etc/sysconfig/route-
Pls help me

regards.

Puppen
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-13-2006, 07:13 PM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 581
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

LOL puppen, this morning I wrote a blog entry about static routes under Debian and RHEL. Just look at
http://www.cyberciti.biz/nixcraft/vi...-debian-or.php

If you have more questions then reply back here
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote
  #3 (permalink)  
Old 04-13-2006, 08:59 PM
Member
User
 
Join Date: Mar 2006
Posts: 63
Rep Power: 0
puppen
Default Re: Static Route in Linux, permanent

Dear Rocky.
Thanks.
Ok tell me how I change my default route and make it permanent. I mean that right now my default route is eth1 and I want to make it eth0 and it should be permanent.

Pls reply.

Regards.
Puppen







Quote:
Originally Posted by puppen
Dear All.

I am using RHEL4. I have configured two NIC of my machine, the problem is that is taking eth1 as default route, I want to make it eth0 as default route.
One more thing I want to add another route using route add command but after rebooting m/c the route has deleted, how to make it permanent.
Where I have to put permanent route, which file it uses and what is the syntex?
Is it that file /etc/sysconfig/route-
Pls help me

regards.

Puppen
Reply With Quote
  #4 (permalink)  
Old 04-13-2006, 10:06 PM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 581
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

I don't think so you need static route for your config. Default route defined in /etc/sysconfig/network file. For example my GATEWAY:
Code:
GATEWAY=65.55.10.55
Do you have defined it in /etc/sysconfig/network file? Also do you have route defined in /etc/sysconfig/network-scripts/ifcfg-eth0 and /etc/sysconfig/network-scripts/ifcfg-eth1 if so remove it and then restart service (reboot system):
Code:
service network restart
Also please don't use quote button use post reply button it will save some disk space on forum

If this does not help then we can force it to eth0. ... let me know...
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
No route to host csvinayak Linux hardware 8 04-07-2008 06:44 PM
Permanent Route entry in RHEL 5 santoshdhumal Networking, Firewalls and Security 1 03-17-2008 11:12 PM
How to make bash prompt permanent? vaibhav.kanchan Getting started tutorials 1 07-19-2007 12:46 AM
Static Route oddity DACTech Networking, Firewalls and Security 10 05-26-2007 11:59 PM
Static ip address in Ubuntu Linux howto raj Networking, Firewalls and Security 0 01-18-2007 04:18 AM


All times are GMT +5.5. The time now is 12:23 AM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36