how to setup a dhcp server - Printable Version +- Linux-Noob Forums (https://www.linux-noob.com/forums) +-- Forum: Linux Server Administration (https://www.linux-noob.com/forums/forum-8.html) +--- Forum: DNS and DHCP (https://www.linux-noob.com/forums/forum-84.html) +--- Thread: how to setup a dhcp server (/thread-3370.html) |
how to setup a dhcp server - anyweb - 2004-05-21 first things first, make sure you have your dhcp software installed to check it quickly do this Code: rpm -qa dhcp* If it doesnt display anything you can download the RPMs and install them manually, or click on the redhat/system settings/add remove applications/Servers/Network Servers and put a check mark beside DHCP server. ok once it is installed now you have to configure it, this is done by manually editing a file called /etc/dhcpd.conf if the file does not yet exist don't worry, there is a sample stored on your distro, to find it do this Code: updatedb && locate dhcpd.conf it will probably be somewhere like this /usr/share/doc/dhcp-3.0.1rc12/dhcpd.conf.sample Copy this file to /etc as follows Code: cp /usr/share/doc/dhcp-3.0.1rc12/dhcpd.conf.sample Now edit the file and change the ip subnet/netmask settings to your liking and save the file. To start the dhcp server you'll need a leases file created otherwise it will fail to start (first time start). Do as follows to create the file Code: touch /var/lib/dhcp/dhcpd.leases Now we want it to start at boottime, so lets tell chkconfig to start it at boot by doing Code: chkconfig --level 35 dhcpd on That's it, now we want to start the server, to do so try this Code: /etc/init.d/dhcpd start ok, connect a client to the server with dhcp enabled and see do they get an ip ! If you want to share the internet via this DHCP server then try the following Code: iptables -t nat -F POSTROUTING The first line CLEARS your current IPTABLEs rules so don't do it unless you really intend to do it. The second line shares out 10.0.0.1-10.0.0.255 as long as the client points their gateway to 10.0.0.1. here is a sample dhcpd.conf file Code: ddns-update-style interim; cheers anyweb how to setup a dhcp server - alan - 2004-06-03 Do you need to install this in order to run a webhosting service? how to setup a dhcp server - TormentoR - 2004-06-09 use: Quote:service dhcpd startinstead of: Quote:/etc/init.d/dhcpd start does the same, but using 'service' is nicer :P how to setup a dhcp server - masterblaster - 2011-08-25 i want to setup dhcpv6 server on linux box(RHEL6), which can provide ipv6 addresses when connect to a router. Can somebody let me know how can a setup this? how to setup a dhcp server - hybrid - 2011-08-28 Hi masterblaster, You need to install the dhcp package: Code: # yum install dhcp You now need to edit /etc/dhcp/dhcp6.conf and set up your DHCPv6 scope for the subnet you want to offer IPv6 addresses to (take a look at /usr/share/doc/dhcp*/dhcpd6.conf.sample). Finally, once you have finished editing the config file for the DHCPv6 server, launch it: Code: # service dhcpd6 start and perhaps also set it to run at start up: Code: # chkconfig dhcpd6 on how to setup a dhcp server - Dungeon-Dave - 2011-08-29 Just to thread-hijack.... do you know anything about dynamic DNS? I can set up DNS and DHCP individually, but there's something new in DHCPd that seems to prod a host+IP dynamically into the DNS zone (without it inserting a new entry into the DNS file and reloading the configuration), the idea being that you just let DHCP allocate an address and DNS picks it up - handy for static leases or address reservations. I've seen settings displayed in Webmin, but the webmin guides are very scant on details, and I haven't found a HowTo that properly explains how it all works. I've tried setting up a few from Webmin then looking at the zone files it creates, but I'm still none the wiser. I'd like to properly get this working if possible. how to setup a dhcp server - hybrid - 2011-08-30 In short, no. :( I've played with this The Microsoft Way, with Active Directory, MS's DNS Server and MS's DHCP Server, where it is all automatic, but not with BIND and dhcpd. To be honest, I haven't yet had a huge need to, and as you've discovered, it doesn't seem that anyone has sat down and produced a decent guide. Have you seen this guide? Again, I'm afraid I haven't looked into this in detail, so I don't know how good that is. how to setup a dhcp server - Dungeon-Dave - 2011-08-31 Quote:Have you seen this guide? Again, I'm afraid I haven't looked into this in detail, so I don't know how good that is.mmm.. actually, that guide isn't too bad. Other guides I've seen have been outdated (and talk about perl scripts to modify zone files) but that one could be the ticket, ta. Most of it seems like the standard DNS/DHCP stuff I know, but it's the additional directives that are useful. Ta, lad - that could save me bacon! |