LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   How to tell whether IP is set as static or DHCP? (https://www.linuxquestions.org/questions/fedora-35/how-to-tell-whether-ip-is-set-as-static-or-dhcp-496926/)

loadedmind 10-30-2006 10:10 AM

How to tell whether IP is set as static or DHCP?
 
Hello gents/ladies,

System we're running over here is a stock kernel RedHat ES 4 server. The question was brought up as, "How would someone be able to determine whether the machine is configured to grab an IP from DHCP or is it set statically and what file or files determines this toggle?"

Any/all input is greatly appreciated!


Regards,
LoadedMind

Wells 10-30-2006 10:14 AM

You could look at /etc/sysconfig/network-scripts/ifcfg-eth0 to see whether or not it is set to use DHCP. Substitute "eth0" for whatever network device you are concerned with.

loadedmind 10-30-2006 03:58 PM

Thanks! Are there any other scripts that are involved when netconfig is finished with the network settings that you know of?

anserq 10-30-2006 06:09 PM

What other types are there? If not eth0 ? :twocents:

Wells 10-31-2006 08:11 AM

Quote:

Originally Posted by anserq
What other types are there? If not eth0 ? :twocents:

Well, you could have multiple ethernet devices attached to your systems, so you would have eth0, eth1, etc.

Also, I work in a high-performance computing center, and we have infiniband connected equipment that uses IP over IB. Those interfaces are labeled as ib0, ib1, etc.

Wells 10-31-2006 08:12 AM

Quote:

Originally Posted by loadedmind
Thanks! Are there any other scripts that are involved when netconfig is finished with the network settings that you know of?

I ams ure there may be something. The best thing you can do is to read through the /etc/init.d/network script and see just what it touches.

loadedmind 11-09-2006 11:08 PM

Appreciate all of your feedback! Thanks!


All times are GMT -5. The time now is 12:27 PM.