![]() |
Setting Up My First DHCP Server
I'm setting up my home network to teach myself a few things and round out my experience base. I'm fairly green when it comes to networking and I'm itching to learn.
I have a wireless AP / router connected to my DSL Internet connection. Two machines are connected via wireless and two other machines have wired connections. The router provides DHCP functionality. I've decided that I'd like to offload DHCP serving to one of the wired machines. I'd also like to make this machine the default gateway. This way, I'll be set to start using this machine for a number of other central functions (DNS, filtering, proxy, firewall, etc). I'm unsure of how to pull this off. If I turn off DHCP on the router and turn it on in the wired box, will everything still hum along like nothing happened, even after the other machines start requesting leases from the new server? I'm taking a stab in the dark here, but it seems to me like the router is going to appear to be just one of the many machines on my network (which is now a *mesh* network, whereas before it was a *star* network, right?). However, given its physical connection to the internet, the DHCP server is going to have to treat it as a gateway, right? The *default* gateway. I think. And at that point, how do I make sure that wireless router is properly referenced by the DHCP server, seeing as the router will be requesting an IP address from the DHCP server? It seems to be a circular dependancy... unless I can refer to the router by MAC address or something? As you may be able to tell, I've been studying, and now I'm trying to apply my textbook understanding to a real world situation. I think I've got 95% of it... there are just some big question marks hovering over my head. I'd appreciate ANY help in ironing out my understanding of these things! |
You'll be fine turning off DHCP on your router.
|
You will always have a physical star, logical bus in your home network. You're connecting to one single device, and you have a single point of failure (your router) to blow apart your network. It's a physical star because everything connects off of it, but a logical bus (I think. I could be well wrong on that one).
And the best idea is to always make a router a static IP. You CAN set it to DHCP, and in the DHCP server specify your router as a FQDN instead, but the issue is that if your DNS resolution goes *boom*, you're screwed. And you're thinking waaaaaay too complicated about it (understandably). Best practice is to make routers/servers static IPs on your network. That way you know where they are in the scheme of addresses at all times, and if DNS resolution goes *boom*, as I said, you won't have to pull your hair out fixing it. And yes, when you turn off the DHCP server on your router, your DHCP serving box with seemlessly take over and continue on with the same leases. |
Corect me if im wrong but in order to setup a linux fire wall you need to hook it up this way
Modem --> Linux FW --> Router -->to computers your linux box must havea direct connection then the router following... you need 2 nic cards. if there is another setup tell me but im 99% sure this is the only way to go. NOTSURE: but i think its the same with seting up a proxy? YES - or - NO ? again your linux box will take over the DHCP job easly... but,,, I sugest STATIC OVER DHCP TOO! |
Quote:
Note, though, that you have to have a VPN to the firewall out in Abu Dhabi, and deny every other connection from everywhere else, but you can do that if that's your thing. And DHCP is easy. Just, again, don't use it on your servers or gateway. I feel I should just emphasize that point. |
i stand corrected...
Quote:
|
In my case, my only real goal is to learn.
That said, in terms of practicality, I'd like to use the router to route traffic and the server to provide all services. The router has the advantage of having a good number of ethernet ports AND that it's a wireless AP. Its weakness is in the flexability of its software. I can't dink with any little bit that I want to. So the idea is to make the server handle all of these things. Yes, this makes for some zig-zagging across my network (workstation -> router -> server -> router -> internet -> router -> server -> router -> workstation). But given the speed of my LAN versus the speed of my DSL connection, the functionality is way more important than the efficiency. Quote:
Quote:
Quote:
Quote:
- configure the new DHCP server to refer to itself by a static IP - configure the router with its own static IP and give the new DHCP server the same information, both for refering to the gateway by static IP AND after that refering to it as the default gateway (I'll have to dig deeper to see how to configure this...) - make sure the new DHCP server starts successfully - turn off the router's DHCP functionality - start disconnecting / reconnecting machines to watch their assumed leases carry over to the new DHCP server. Will I need to manually set each workstation's default gateway to the new DHCP server, or will they automagically configure this based on what the DHCP server tells them? Thanks so much for the insights!! This is excellent!! I'm really feeling like I get it now! |
Quote:
By the by, check the RFC for more info on how DHCP works. Quick runthough: everything is automagic with it. That's why it's Dynamic Host Configuration Protocol. ;) You supply the DHCP server with info, the DHCP server passes it onto the client. Also, you don't need to disconnect/reconnect the machines. They'll try to contact their old DHCP server first; when it's not there, they'll broadcast out and ask for a new DHCP server. When they find it, they'll relay the needed information back to the DHCP server, then everything will be good to go after that. And as I said: EVERY server should be a static IP. DNS server, DHCP server, Samba server, Domain Controller. If its purpose is to serve something, make it static. And don't make this stuff complicated. You're working with logic (binary), so keep it in the realm of logic. Subnets are easy, networks are easy. Topologies are boring, but easy. Just don't concentrate about it. Ask questions if you don't understand, or THINK you don't understand. Assuming you get it is the worst thing you can do, because most of this stuff builds on top of something else. |
What i recommend is trying to do it and see what happens. then if you have a problem ask questions, or try and figure it out on your own.
you want to know if something will work? Try it find out yourself. thats how you be come a stronger more pronounced linux user am i right? And its definitely not unusual to run into a snag that you cant figure out thats why everyones here to help everyone else. Don't think to much in advanced. Life's all about tryals, failures, and corrections. thats just what it is in the computer world. "There will always be problems". Quote:
Ok, back on subject: Yes, In theary the dhcp server will picup on all the infromaintion needed to do "IT'S JOB". "You tell the dhcp server what to give out and it will give it out". |
| All times are GMT -5. The time now is 05:34 PM. |