LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-22-2004, 11:19 PM   #1
95se
Member
 
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740

Rep: Reputation: 32
Using DNS ips I just go from dhcpcd in dhcpd?


I have dhcpd running. And it works fine. For the dns ips I just used two dns ips given to me by my isp. But I am at university, and when I go home for a week I bring my comp with me, along with my hub. So when I get home I have to change the dns ips to the ones of my parents ISP. My Question: Is there a way to get the dns IPs with dhcpcd (first run to get IP/ish from ISP) and then with the DNS servers I just got, give those to my dhcpd server?
 
Old 01-23-2004, 09:11 AM   #2
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
dhcpcd will pick up the ISP supplied dns servers ok...

But are you using dhcpd as a full dns server for a domain, or just for caching?
There is an easier & more lightweight choice, dnsmasq which uses your resolv.conf & /etc/hosts files.
dhcpcd updates /etc/resolv.conf automatically
 
Old 01-23-2004, 01:41 PM   #3
95se
Member
 
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740

Original Poster
Rep: Reputation: 32
I made a script on my laptop. Haven't checked it out yet on my server, but will soon:
Code:
#!/bin/bash
cat /etc/dhcpd.conf.1st > /etc/dhcpd.conf
echo -n option routers\ \  >> /etc/dhcpd.conf
cat /etc/resolv.conf | cut -f 2 -d ' ' | grep -m 2 . | tr '\n' ',' >> /etc/dhcpd.conf
echo \; >> /etc/dhcpd.conf
cat /etc/dhcpd.conf.2nd >> /etc/dhcpd.conf
dhcpd.conf.1st and ".".2nd have the first and second part of my dhcpd.conf file in them. This is run before I run dhcpd eth1

I'll check out dnsmasq though.

Last edited by 95se; 01-23-2004 at 01:43 PM.
 
  


Reply



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
dhcpcd, dns, and the local hostname celejar Linux - Networking 3 10-23-2005 03:40 PM
How to update dns with dhcpd? rubik-wuerfel Linux - Networking 4 05-09-2004 07:14 AM
dns and dynamic ips, please help! myk3 Linux - Networking 2 11-17-2003 10:32 AM
RedHat 8.0 with DHCPCD: no DNS but can ping dominijannir Linux - Distributions 2 10-25-2002 12:09 PM
how to resolve names to IPs WITHOUT /etc/hosts or DNS iggymac Linux - Networking 11 11-13-2001 10:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:36 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
Open Source Consulting | Domain Registration