LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Where is gateway info stored? (http://www.linuxquestions.org/questions/linux-networking-3/where-is-gateway-info-stored-815977/)

adeadmarsh 06-23-2010 03:53 PM

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.

nini09 06-23-2010 04:01 PM

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.

GrapefruiTgirl 06-23-2010 04:06 PM

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.

adeadmarsh 07-09-2010 01:28 PM

Thank you so much. I thought that might be the case, but I wanted to double check!


All times are GMT -5. The time now is 10:21 PM.