Author Topic: DHCP configurations  (Read 3824 times)

klovell

  • Guru
  • ****
  • Posts: 205
    • View Profile
DHCP configurations
« on: April 28, 2010, 06:48:01 pm »
Hi all,

I'm making good progress with my setup and I can't wait to share the end results to those who care.  I'm using a few pieces of equipment that's not in the Wiki as "supported" but it works just fine, some are plug and play.  I figured it would be helpful to expand the hardware list. 

Unfortunately I'm forced to change gears for a moment.  Does anyone know where the dhcp configuration file is located?  I'm assuming the DHCP server just reads from a file when assigning dhcp information.  I would like to modify this file so different dns servers are used.  Before I modify the file; I get why I would want lmce to handle dhcp, is there a reason I would want lmce to handle dns?

Alternatively - I noticed on my pcs only one dns server is assigned and it happens to be the core.  When the Core cannot resolve a name, such as Google.com... or linuxmce.org what public server is the request forwarded to?  If I can't modify the dhcp config file I'd like to change the forwarder server to my server.  I figured with this setup names that can not be resolved by the core will be forwarded to my server, from there the name is either resolved or sent to my dns servers forwarders.  Also with this setup if the cores DNS server is doing something special it can still do it while allowing me to do what i want to do. 

Any and all help would be appreciated.  Ideally I only need to know where the dhcp config file is as i would like to use my DNS servers unless lmce's is needed for some reason. 

pw44

  • Addicted
  • *
  • Posts: 666
    • View Profile
Re: DHCP configurations
« Reply #1 on: April 29, 2010, 05:13:21 am »
/etc/dhcp3/dhcpd.conf
 

klovell

  • Guru
  • ****
  • Posts: 205
    • View Profile
Re: DHCP configurations
« Reply #2 on: April 29, 2010, 06:52:52 pm »
Thanks, That worked for me.  I don't know how this will affect lmce, that i'll find out with time.  To reduce the chances of error I listed my core's ip as a forwarder.  If my dns server can't resolve the name the core will try and if the core can't it'll send the request off to where ever the core sends recursions.  In theaory if the core's dns server is doing something special, it should be able to continue doing it. 

I needed this because my wife has an excel file with links to other files on the network.  She used full dns names to create the links so the file started failing ever since i put the core in place.  If any one runs into a similar problem all i did was:

ssh to the core
login and type, nano /etc/dhcp3/dhcpd.conf
I replaced the ip address on this line with the ip of my server: option domain-name-servers 192.168.200.1;
save the file, restart the core.  I couldn't get the only command i know to restart dhcp in linux to work so i restarted the core. 

Thanks pw44! She wont beat me now that her file works  ;D

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: DHCP configurations
« Reply #3 on: April 29, 2010, 08:21:47 pm »
You should have used the web admin to modify those settings.

Advanced > Network > Network Settings

-Thom

klovell

  • Guru
  • ****
  • Posts: 205
    • View Profile
Re: DHCP configurations
« Reply #4 on: April 29, 2010, 09:08:46 pm »
I checked web admin, in that very same spot.  I don't have a choice to modify these setting there.  was this changed in an update or something?  I can see the dns servers that my router assigned to the core but it doesn't show what's being assigned to my devices behind the core nor does it give me the option to make my own selection. 

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: DHCP configurations
« Reply #5 on: April 29, 2010, 09:12:18 pm »
change to static, and you can.

-Thom

klovell

  • Guru
  • ****
  • Posts: 205
    • View Profile
Re: DHCP configurations
« Reply #6 on: April 29, 2010, 10:46:23 pm »
okay... I thought that was for the core only, the external interface.  The core passes those configurations on to the internal interface?  That's how i expected it to work but i guess i have to use static to achieve that.  I'm trying it now.  unfortunately i just accidentally gave the core the same ip address as it's gateway so I'm locked out.  I'll check it out in an hour when i get home. 

Thanks Thom!!

pw44

  • Addicted
  • *
  • Posts: 666
    • View Profile
Re: DHCP configurations
« Reply #7 on: April 30, 2010, 04:55:37 am »
to restart from the kde shell, do:
Code: [Select]
sudo /etc/init.d/dhcp3-server restart
so you will not need to reboot the core.

klovell

  • Guru
  • ****
  • Posts: 205
    • View Profile
Re: DHCP configurations
« Reply #8 on: April 30, 2010, 02:49:18 pm »
Okay so i changed my core to a static IP but that undid the change i made through shh.  It defaulted back to assigning the core as the dns server.  I even configured the core to use my dns server when i went static.  It looks like the core itself tries to resolve names when the request is coming from an internal computer but the core itself uses my dns server when it needs a name resolved for it's own use.  I used putty to ssh to the core to get these results. 

So I left the core static since i was going to do that anyway, re-modified the dhcpd.conf file and the command to restart dhcp worked with out a glitch.   I didn't test my wife's files but I got a new computer last night and i was able to join it to the domain this morning.  That wouldn't happen with bad/incorrect name servers. 

Thanks guys!! Now I'm back to lmce and getting my TV tuner to work.