LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 1
unable to save gateway address


Hi
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, 01:25 PM   #2
gknetw
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, 01:47 PM   #3
mddnix
Member
 
Registered: Mar 2013
Distribution: Redhat, Ubuntu
Posts: 525

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

first, remove line GATEWAY=xxx.xxx.xxx.xxx in /etc/sysconfig/network file.

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

GATEWAY=xxx.xxx.xxx.xxx
DEFROUTE=yes

third, restart network service

you are done.
 
1 members found this post helpful.
Old 11-15-2013, 11:40 PM   #4
amartlk
Member
 
Registered: Sep 2010
Location: Nagpur India
Posts: 347

Original Poster
Rep: Reputation: 1
Thanks

Done
 
  


Reply


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 01:40 PM
save the gateway alaios Debian 12 11-23-2004 01:38 PM
save the gateway alaios SUSE / openSUSE 1 11-08-2004 06:49 PM
gateway address amanjsingh Linux - Newbie 3 06-05-2004 05:42 AM
What is Gateway address and what is Network address? abefroman Linux - Networking 1 03-17-2004 08:25 PM


All times are GMT -5. The time now is 09:26 AM.

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