• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2066
  • Last Modified:

ifconfig - how to determine if IP address is static or dhcp?

In Windows an ipconfig /all shows a field that says DHCP Enabled = Yes/No
Is there a comparable linux command to determine if the IP address was assigned via DHCP or Static?  Also, is there a way to have ifconfig display its information one screen at a time?

thanks!  
0
dkraut
Asked:
dkraut
3 Solutions
 
DoasliCommented:
ipconfig /all in Windows does show whether it's enabled or not.
not sure about Linux, however, I think the command to display one screen at a time is ifconfig | more

Hope that works for you.
0
 
Hatrix76Commented:
No, it does not tell you, you have to look in the configs, what is your distribution? redhat, debian, ubuntu?
0
 
grantsewellCommented:
By the command line, the only way to determine if an IP address is static or dynamically assigned is by viewing / editing the networking file (ex. in Ubuntu / Debian, /etc/network/interfaces).

ifconfig | more will limit the display of the information to the size of the current window, and allow you to progressively display the remainder of the data.

Cheers,

Grant
0
 
Hatrix76Commented:
another way to look at it is if a:

ps afux | more


does not reveal a dhcp-client process you are pretty sure that you are not dhcp configured, but the best way is to check the configs

0
 
dkrautAuthor Commented:
thanks all, it's RHEL btw.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now