Solved

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

Posted on 2010-11-11
5
1,877 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
5 Comments
 
LVL 1

Assisted Solution

by:Doasli
Doasli earned 50 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 225 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 225 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

My last post dealt with using group policy preferences to set file associations, a very handy usage for a GPP. Today I am going to share another cool GPP trick, this may be a specific scenario but I run into these situations frequently in my activit…
[b]Ok so now I will show you how to add a user name to the description at login. [/b] First connect to your DC (Domain Controller / Active Directory Server) SET PERMISSIONS FOR SCRIPT TO UPDATE COMPUTER DESCRIPTION TO USERNAME 1. Open Active …
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
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 …

757 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now