LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 08-12-2008, 02:34 PM   #1
meikitsu
LQ Newbie
 
Registered: Nov 2006
Distribution: Slackware 15.0
Posts: 17

Rep: Reputation: 0
How to set up a router to be DHCP server and client at a time?


I have set up a Slackware 12.1 box to get its (dynamic) IP address, DNS servers, etc. by DHCP, on device eth0. So far so good. Now I'd like it to act as a DHCP server as well for my "internal network" on device eth1.

Is it possible to have my DHCP server relay information it received by being a DHCP client? I do have confidence everything will be OK when I tell my home network to use my newborn router as a default gateway, but I imagine the home network wants to know about DNS servers as well. And those are assigned to me by DHCP...

Any clues on where to start looking and how to do this?

Thanks!
 
Old 08-12-2008, 02:38 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Would it be acceptable to have the machine act as a DHCP relay? In other words, the machine would simply forward DHCP requests from the clients onto the main DHCP server.
 
Old 08-13-2008, 01:31 AM   #3
meikitsu
LQ Newbie
 
Registered: Nov 2006
Distribution: Slackware 15.0
Posts: 17

Original Poster
Rep: Reputation: 0
I'm afraid not; my ISP only provides me with 1 IP address, so I'd like my Linux router to do the rest...
 
Old 08-13-2008, 02:07 AM   #4
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
If your ISP gives you only one Ip address, then there is no way you can have live ip addresses to other systems in your local network. If you want this for purpose of internet sharing then you can put another network card in slack box and make it act as transparent proxy.
 
Old 08-13-2008, 11:19 AM   #5
meikitsu
LQ Newbie
 
Registered: Nov 2006
Distribution: Slackware 15.0
Posts: 17

Original Poster
Rep: Reputation: 0
I have the second network card installed, it's rather that my DNS servers are also assigned by DHCP and I figured (wrongly, perhaps) that it would be necessary to relay them to the internal network, if possible, so that I don't have to manually change all configurations if my ISP decides to change something...
 
Old 08-13-2008, 12:36 PM   #6
grepmasterd
Member
 
Registered: Aug 2003
Location: Seattle
Distribution: ubuntu, lately
Posts: 182
Blog Entries: 1

Rep: Reputation: 35
you may be trying to solve something that is not a problem, but if your ISP does tend to change its name servers regularly then you may have to roll your own solution, pulling the entries in /etc/resolv.conf and updating /etc/dhcp3/dhcpd.conf, then reloading dhcpd

or you could use the dns names of the the nameservers, since they're less likely to change server names than IP addresses.
option domain-name-servers ns1.internal.example.org;
 
  


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
DHCP server and DHCP client in same box Eicos Linux - Networking 3 03-03-2007 01:28 PM
DHCP hostname not set with a linux client tnine9 Linux - Networking 0 08-09-2005 08:48 AM
dhcp client requests a new address every time EdoardoC Linux - Networking 6 02-02-2005 05:02 PM
how do i set up my ethernet card w/o dhcp if i have a router jooper317 Linux - Hardware 3 01-07-2004 11:51 PM
XP Pro Build 2600/sp1 v.1105 DHCP Client to Redhat 8.0 DHCP Server - Problems atomant Linux - Networking 5 06-28-2003 11:24 AM

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

All times are GMT -5. The time now is 09:28 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