Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 06-23-2010, 02:53 PM   #1
LQ Newbie
Registered: Jun 2010
Posts: 2

Rep: Reputation: 0
Where is gateway info stored?

I have my box set up with dhcp. The dhcp server gives me my gateway. Is this info placed in any files? I can see my gateway by typing in netstat -rn, but I don't know where this info is stored. I have looked in /etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-etho. I've tried to grep in quite a few directories/files for GATEWAY but haven't found my answer. Running RH54.

Thank you.
Old 06-23-2010, 03:01 PM   #2
Senior Member
Registered: Apr 2009
Posts: 1,593

Rep: Reputation: 138Reputation: 138
Dynamic IP information, such as gateway which get on DHCP server, save in memory only. It isn't static and shouldn't save to disk.
Old 06-23-2010, 03:06 PM   #3
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
OP may also like the `route` command, to see the current routing table of the machine in question. The -n option is commonly used, to show numeric addresses, and will show you the gateway also.

There's a good chance you could locate the network information in /proc somewhere, but right off, I cannot suggest where; as implied above, the gateway and such info is not saved in any particular "regular" file that I'm aware either.
Old 07-09-2010, 12:28 PM   #4
LQ Newbie
Registered: Jun 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Thank you so much. I thought that might be the case, but I wanted to double check!


dhcp, gateway

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
Is there any partition info stored in /etc ? raqua Linux - Desktop 8 01-24-2010 08:07 AM
Where can I get info on common Linux directories and what's normally stored there? hunterhunter Linux - Newbie 6 04-06-2006 03:40 PM
Where is IP info stored-RH8 kubicon Linux - Networking 2 08-26-2004 05:24 PM
Web Browsers Forgetting stored info BrettPower Linux - Software 0 03-06-2004 12:36 PM
Info displayed to screen at boot stored somewhere? jfi Linux - Newbie 3 12-03-2003 05:19 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:22 AM.

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