?
Solved

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

Posted on 2010-11-11
5
Medium Priority
?
1,992 Views
Last Modified: 2012-05-10
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
Comment
Question by:dkraut
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 1

Assisted Solution

by:Doasli
Doasli earned 200 total points
ID: 34113502
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
 
LVL 7

Expert Comment

by:Hatrix76
ID: 34113761
No, it does not tell you, you have to look in the configs, what is your distribution? redhat, debian, ubuntu?
0
 
LVL 7

Accepted Solution

by:
grantsewell earned 900 total points
ID: 34113776
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
 
LVL 7

Assisted Solution

by:Hatrix76
Hatrix76 earned 900 total points
ID: 34113821
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
 

Author Comment

by:dkraut
ID: 34114417
thanks all, it's RHEL btw.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Uncontrolled local administrators groups within any organization pose a huge security risk. Because these groups are locally managed it becomes difficult to audit and maintain them.
Let's recap what we learned from yesterday's Skyport Systems webinar.
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month14 days, 14 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question