Solved

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

Posted on 2010-11-11
5
1,911 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Introduction You may have a need to setup a group of users to allow local administrative access on workstations.  In a domain environment this can easily be achieved with Restricted Groups and Group Policies. This article will demonstrate how to…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
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 from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

839 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