Dhcp in use or not for Linux machine


 
Thread Tools Search this Thread
Operating Systems Linux Dhcp in use or not for Linux machine
# 1  
Old 03-26-2014
Dhcp in use or not for Linux machine

Hi All.

Can anyone let me know the smartest and fullprrof method of checkking whther any given linux machine is using DHCP or not?

Code:
 
# ps -ef | grep dhcp

gives output like below :
Code:
root      3251  3128  0 11:02 pts/0    00:00:00 grep dhcp

so i dont think its full proof method , please suggest
# 2  
Old 03-28-2014
I'm assuming you want to know if the server is using dhcp address or not? If so, you can grep for dhclient or even you can check /etc/sysconfig/network-scripts/ifconfig-interfacename for BOOTPROTO=dhcp on Redhat.
# 3  
Old 03-28-2014
There isn't a foolproof method. The question "is my network device set dhcp" doesn't make sense, because a network device doesn't have a "DHCP" setting. So the question is: "Was eth0 set to 192.168.0.107 by static settings, or did dhcp do it?"

So you have to know where a distribution gets its settings to answer that question.
# 4  
Old 03-28-2014
This is a continuation of the thread:

Dhcp in use or not on Solaris machine | Unix Linux Forums | Solaris

(or moreover the thread that morphed into what this thread might have been!) As such, I'll close this one.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Dhcp in use or not on Solaris machine

Hi All, Could you please let me know how can we check whether any given solaris machien is using DHCP or not. is ps -ef | grep dhcp is full proof method or is their any other way. (10 Replies)
Discussion started by: omkar.jadhav
10 Replies

2. Solaris

DHCP is getting different class of IP than host machine on Solaris 10

i have a laptop with windows 7 installed . this laptop is dhcp enabled and it's details are as follows : IPv4 Address. . . . . . . . . . . : 10.1.5.54 Subnet Mask . . . . . . . . . . . : 255.255.255.192 Default Gateway . . . . . . . . . : 10.1.5.1 i installed solaris 10 on vmware on... (5 Replies)
Discussion started by: rehantayyab82
5 Replies

3. Shell Programming and Scripting

shell script to copy files frm a linux machine to a windows machine using SCP

I need a shell script to copy files frm a linux machine to a windows machine using SCP. The files keeps changing day-to-day. I have to copy the latest file to the windows machine frm the linux machine. for example :In Linux, On July 20, the file name will be 20.txt and it should be copied to... (3 Replies)
Discussion started by: nithin6034
3 Replies

4. Shell Programming and Scripting

SSH into a linux machine from a windows machine

I basically want to login into different linux machines( on the same network) from a windows machine. I know i can use ssh <machine name>. But i want to automate this process. I dont want to enter the username and password. Is there any way to do it. Can i make some sort of a batch script for it. (4 Replies)
Discussion started by: lassimanji
4 Replies

5. UNIX for Dummies Questions & Answers

Solaris Machine IP Configuration via DHCP

I have a new solaris machine and I am trying to bring the same on network. The IP assignemnt is via DHCP. I want to know as which files need to be modified to include DHCP server IP in order that the machine gets its IP via DHCP server. Thanks in Advance. :) (1 Reply)
Discussion started by: Ashvin Gaur
1 Replies

6. Linux

How to configure Dhcp in linux?

Please let me know step by step, I am new to this configuration.... (2 Replies)
Discussion started by: dhineshcs
2 Replies

7. Linux

Porting DHCP from Linux to VxWorks

Hello All, I have a code of DHCP which is implemented on Linux. During porting this code from Linux to VxWorks, I come up with following errors:- jects\freedom\ap\udhcp\socket.c C:\projects\freedom\ap\udhcp\socket.c: In function `read_interface': C:\projects\freedom\ap\udhcp\socket.c:79:... (1 Reply)
Discussion started by: Sunny Shivam
1 Replies

8. IP Networking

DHCP and unix/linux

I have 5 unix and 1 linux machines and due to requirements I must have static IPs, its necessary for documentation and such. We are looking at going to DHCP but how can I "fool" these computers into thinking they have static Ips? Our lan admin said something about putting a second IP tied to the... (6 Replies)
Discussion started by: kymberm
6 Replies

9. IP Networking

DHCP Linux and cable modem

I can do all this in windows, but Im trying to run the SuSe 8.0 professional as a gateway. I have the local (private) LAN setup with no problems, but Im having troubles getting it to use DHCP to go out on the external card to the service provider, which only uses Dynamic IP's. WHere, what and how... (3 Replies)
Discussion started by: ftn96
3 Replies

10. UNIX for Dummies Questions & Answers

How do I set up DHCP on Linux

I have linux box setup and connected to a cable modem via a hub which is shared with other win98 pcs. I need to set up the linux box with dhcp. I have two issues: First: For some reason, every time I activate the eth0 interface, it seems to deactivate itself after some time all by itself.... (1 Reply)
Discussion started by: alam
1 Replies
Login or Register to Ask a Question