LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-27-2018, 11:12 PM   #1
DennyY
Member
 
Registered: May 2018
Location: San Francisco, CA
Distribution: CentOS 7
Posts: 76

Rep: Reputation: 1
Question DHCP client


Hi All,

I THINK my DHCP sever is finally up and running.

How can I tell if my DHCP client is connected to my server?

My DHCP client is on a different work station.

I am using CentOS 7 on both the server and the client.

Thank you,
Denny

Last edited by DennyY; 05-27-2018 at 11:13 PM. Reason: added additional info
 
Old 05-27-2018, 11:28 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 15,865
Blog Entries: 27

Rep: Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662
If your DHCP client got a valid ip address within the range allowed by the DCHP server, you client is most likely connected to the server.

Try running ip addr on the client to check the ip address.
 
Old 05-28-2018, 10:07 AM   #3
X-LFS-2010
Member
 
Registered: Apr 2016
Posts: 423

Rep: Reputation: Disabled
look in /var/log and or /var/lib/dhcp. you know how to use grep(1) and vi(1) to check status and log files right?

my newbie opinion is ipv4 was "manageable" by home users (ie, to keep china from rooting your system using fake ip commands), but IPV6 is too complicated to be practical. if configuring dhcp means you must configuring and maintain ipv6 - i not only couldn't help you i'd advise you to use software that has it "already done and setup"

Last edited by X-LFS-2010; 05-28-2018 at 10:11 AM.
 
Old 05-28-2018, 11:15 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,513

Rep: Reputation: 3133Reputation: 3133Reputation: 3133Reputation: 3133Reputation: 3133Reputation: 3133Reputation: 3133Reputation: 3133Reputation: 3133Reputation: 3133Reputation: 3133
You will need to allow DHCP traffic through the server's firewall if you have not already done so.

I assume CentOS server will replace the DHCP server on the router so make sure the router's server is disabled. You also need to add DNS option in your dhcp.conf in order for the client to access the internet. Here is an example using Google's name servers which goes in your subnet declaration.

Code:
subnet 192.168.1.1 netmask 255.255.255.0 {
...
  option domain-name-servers      8.8.8.8,4.4.4.4;
}
 
Old 05-28-2018, 10:24 PM   #5
DennyY
Member
 
Registered: May 2018
Location: San Francisco, CA
Distribution: CentOS 7
Posts: 76

Original Poster
Rep: Reputation: 1
DHCP and DNS help

Hi,

First of all, thank you for all of your help.

To answer your questions, and please correct me if I am wrong.

I did do:
# firewall-cmd --add-service=dhcp --permanent
# firewall-cmd --reload

Is this what you were referring to the server's firewall?

I have no clue regarding adding DNS option to the dhcp.conf.
I mean, how do I find DNS?

As of now, the client has internet connection, and the DHCP does not. I am guess it is because the DHCP server is now a server, so can't access to the internet?

Thanks again,
Denny



Quote:
Originally Posted by michaelk View Post
You will need to allow DHCP traffic through the server's firewall if you have not already done so.

I assume CentOS server will replace the DHCP server on the router so make sure the router's server is disabled. You also need to add DNS option in your dhcp.conf in order for the client to access the internet. Here is an example using Google's name servers which goes in your subnet declaration.

Code:
subnet 192.168.1.1 netmask 255.255.255.0 {
...
  option domain-name-servers      8.8.8.8,4.4.4.4;
}
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] what DHCP SERVER do when receive a dhcp release packet from client arnold.king Linux - Networking 2 04-17-2013 12:39 PM
Linux DHCP client unsuccessful on a windows DHCP served network tom1080 Linux - Newbie 1 12-16-2009 12:37 PM
Force DHCP To Refuse Clients A DHCP Lease Depending On Client MAC Address blackfish Linux - Server 3 08-17-2007 01:54 AM
why DHCP client not sending own host name in DHCP request packet? sonika_singhi Linux - Networking 7 05-28-2005 06:18 AM
XP Pro Build 2600/sp1 v.1105 DHCP Client to Redhat 8.0 DHCP Server - Problems atomant Linux - Networking 5 06-28-2003 12:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration