Thursday, January 15, 2009

Installing & Configuring Fedora Linux DHCP Server Lab.3

1. To install and configure Fedora Linux DHCP server, First of all install DHCP package : open up your Add or Remove Packages application bygoing to Applications - Add/Remove Software. On the left, click on Servers and, on the right, click on Network Servers.


Notice that next to the Optional Packages button, it tells you that 3 of the possible 21 packages under Network Servers have already been installed. We are going to install another one. Click on Optional Packages for that package.

2. When the list of extra packages to be installed appears, check the checkbox next to DHCP. Do not install the DHCPv6 server.

Click Close.

3. Back on the Add or Remove Packages window, click Apply.


4. You will be asked to review the packages that will be installed. Sometimes there are more packages being installed that you may think you selected because one package to you may include more than one package to Linux.


5. The package will be downloaded and installed from the Internet and you should get this message:


Click OK and the Package Manager application will close automatically. The DHCP Server (called dhcpd, or DHCP Daemon) is now successfully installed.

Configuring Linux DHCP server
Configuring dhcpd can be a little tricky since there is no graphical administrative console included. For later reference, there are some free administrative consoles that work with dhcpd available, such as www.webmin.com. However, in this lab, we will manually edit and create a dhcpd configuration file. Don’t worry, this isn’t as difficult as it may sound because you will be provided with exactly what you need to type into the file.

1. To get started, open a Linux terminal window (command prompt) by going to Applications - Accessories - Terminal.


2. You should see the following window appear. In this window, type dhcpd and press
Enter.


3. This will attempt to start the DHCP server but the attempt will fail because there is no configuration file. DHCPd requires a text configuration file in the directory /etc called dhcpd.conf. Let’s create that file. To do this, start your text editor by going to Applications - Accessories - Text Editor.


4. This text editor is called gedit. In the text editor window, type in the following:

ddns-update-style interim;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.200 192.168.1.240;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
option domain-name-servers 192.168.1.100;
option domain-name "bigskyfishingsupply.com";
}

Be careful that the syntax is correct! Watch out for the squiggly-brackets “{}” before the range and after the options. The first line about DDNS is required. The remaining part of the configuration creates the DHCP scope and specifies the options that will be handed out to the clients when they request a DHCP address. For more information on how to configure the DHCPD server and this configuration file, see this website:

http://www.siliconvalleyccie.com/linux-hn/dchp.htm and their official website is at:
http://www.isc.org/index.pl?/sw/dhcp/

Now click on the big Save button on the toolbar. It will ask for a name. Type in dhcpd.conf. Click Browse for other Folders. By clicking on FileSystem then on /etc, your window should look like this. Next, click Save.


5. When you are asked if you want to replace the existing file, click Replace.


6. When done, your gedit text editor window should look like this:


Notice the filename and folder across the title bar of the window. Click on the X on the top right of the window to close out the text editor.

7. Now you will be back at your terminal window (command prompt). On this window, press the up arrow key to show your last command. That command should be dhcpd. If it is, press Enter. If not, delete it and type dhcpd, then press Enter. You should see something like this:


The DHCP server is now configured and running. It is time to test the server out with our Windows client, Client1.

Please note that the DHCPD server can be started by going to the services manager, found at System - Administration - Server Settings - Services. This is also where you would configure the server to start automatically when the Linux sever boots. Currently, we did not configure the DHCP server to start when the Linux server boots. Thus, if you reboot this Linux server, when it comes back up, clients won’t receive IP addresses anymore.

Test Linux DHCP server with Windows Client
1. To test our new Linux DHCP server, go to your Windows client, Client1. To do this, on the Windows client, go to Start - Settings - Network Connections and click on your local network connection. This could be a wireless adaptor or a wired Ethernetadaptor. Once the status window for your connection appears, click on Properties.


2. Once the properties appear, scroll down the list of items used and double click on
TCP/IP.


3. Once on the TCP/IP Properties section, select both the radio buttons that say Obtain IP Address Automatically and Obtain DNS Server Address Automatically. When done, it should look like this:


Click OK on the TCP/IP Properties box, then OK on the network connection
properties so the changes will take effect.

4. When you click that last OK button, your Windows client will immediately change from your static IP address to a dynamic address. It will immediately try to obtain that dynamic IP address (and associated information) using DHCP. The first DHCP server that responds with an address will be used. In our case, it should be Server1, the new Linux DHCP server. To see if you successfully obtained an address from that server, open a Windows command prompt by going to Start - Run. Type in cmd for the program to run and click OK. Once inside the Windows command prompt, type in IPCONFIG /ALL and press Enter.

What you are looking for is that the adaptor you configured to use DHCP:
• has an address
• obtained that address from Server1.
What you should find looks something like this:



Notice in this window that this adaptor has an IP address and, more importantly, it obtained it from DHCP Server 192.168.1.100. That IP address is the address of Server1. Because of this, we know that our test was a success.

5. You can also open up the status screen on your network adaptor by clicking on the Support tab, then on the Details button. You should see something like this:


The testing of the Linux DHCP server from the Windows client is complete and so is Lab 3.

NOTE :
Lab Scenario
A core Windows infrastructure feature that the new Big Sky Fishing Supply Linux server is replacing is DHCP. As you know, DHCP provides a dynamically assigned IP address, subnet mask, default gateway and DNS information for devices on a LAN. In this lab, we will configure the new Linux server, Server1, as a DHCP server for the Windows client, Client1. Keep in mind that you cannot easily configure a DHCP server to hand out an IP address for just one client so this Linux server will hand out IP addresses for any client that connects. Because of this, you don’t want to do this exercise on a production network. If you have another DHCP server already on the non-production network upon which you are performing this lab (such as one on a home network router), then you will need to disable those DHCP server before starting this lab.

Download PDF Format : Installing & Configuring Fedora Linux DHCP Server Lab.3
Related Article : installing & configuring DNS Server on Fedora



No comments: