Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-14-2013, 11:21 PM   #1
Registered: Sep 2010
Location: Nagpur India
Posts: 347

Rep: Reputation: 1
unable to save gateway address

i have 2 network card in server having centos 5.3 naming etho and eth1 eth1 is connected to isp connection , i assign static ip to eth0 which is connected to my local lan , i want to change the default gateway of etho to another ip of lan , i fired command
route add default gw eth0 172.x.x.x . when i fired command route -n it is showing me the default gateway which i addded but after some time i.e few second this default gateway is vanished it is not shown by route -n command i.e it is not shown means it save for ome time then it get vanishes
Old 11-15-2013, 02:25 PM   #2
LQ Newbie
Registered: Mar 2012
Posts: 6

Rep: Reputation: Disabled
Can you post your ifconfig route -n output before and after assigning default gateway ?
Old 11-15-2013, 02:47 PM   #3
Registered: Mar 2013
Distribution: Redhat, Ubuntu
Posts: 525

Rep: Reputation: 141Reputation: 141
If you have two network cards, then

first, remove line in /etc/sysconfig/network file.

second, to whichever interface you want to set default gateway, add following lines in ifcfg-ethX file.

third, restart network service

you are done.
1 members found this post helpful.
Old 11-16-2013, 12:40 AM   #4
Registered: Sep 2010
Location: Nagpur India
Posts: 347

Original Poster
Rep: Reputation: 1



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Router gateway address being picked up as primary DNS address under SuSe Hubmasterflex Linux - Networking 13 10-18-2008 02:40 PM
save the gateway alaios Debian 12 11-23-2004 02:38 PM
save the gateway alaios SUSE / openSUSE 1 11-08-2004 07:49 PM
gateway address amanjsingh Linux - Newbie 3 06-05-2004 06:42 AM
What is Gateway address and what is Network address? abefroman Linux - Networking 1 03-17-2004 09:25 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:29 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration