How to set up a router to be DHCP server and client at a time?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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...
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.