Advertisment

Dynamic IPs with PCQLinux

author-image
PCQ Bureau
New Update

As an example, we take up the following, with a set of clients expected to get their IP addressess from the PCQLinux server that you are setting up.

Advertisment

IP addresses of clients: 192.168.1.1 to 192.168.1.254



Subnet Mask: 255.255.255.0


Network address: 192.168.1.0 


DNS server: 192.168.1.2/ 202.54.96.1 (local/ ISP)


Gateway: 192.168.1.1


IP address of PCQLinux machine : 192.168.1.3



Substitute the settings as per your case. 



DHCP sever gets installed during PCQLinux installation if you had selected the Departmental server install type or the “Servers>Network Servers” option during package selection. Check for the presence of a file named dhcpd in

/etc/rc.d/init.d.

In case the file is not present, install the RPM named dhcp-3.0pl1-15.i386.rpm from PCQLinux 8.0 CD1. 

Advertisment

Launch Webmin and log into it. Click on Servers>DHCP Server>Add a new subnet. Type in the following details in the respective text boxes:

Network address: 192.168.1.0



Netmask: 255.255.255.0


Address Ranges: 192.168.1.5 — 192.168.1.254

Note that we are specifying a starting address of 192.168.1.5 (instead of 192.168.1.1) for Address Range. This is because we do not want dynamic IPs for our gateway, DNS and DHCP servers. It is always a good idea to leave some static IPs for use by servers on your network. 

Advertisment

Click on Edit Client Options and fill in as follows:

Default routers: 192.168.1.1



DNS servers: 192.168.1.2 202.54.96.1

Click on Save. This will show up the “Edit Subnet” screen. Click on Save again. Finally click on “Start Server”. In case the DHCP server is already running, click on “Apply Changes”. 

Advertisment

NOTE: While starting the DHCP server, if you are shown an error as follows

You must add a ddns-update-style statement to /etc/dhcpd.conf. To get the same behaviour as in 3.0b2pl11 and previous .....



open the file named dhcpd.conf found in /etc directory in a text editor and append the following line.

ddns-update-style ad-hoc; 

Advertisment

Setting up Windows Clients for DHCP



To setup the Windows machines on the network to use the DHCP server, open the TCP/IP properties of the network card through Network Neighbourhood, My Network Places or Control Panel. Subsequently select the option “Obtain an IP address automatically” 

Setting up PCQLinux 8.0 Clients



While installing PCQLinux on the client machines, if you had unchecked the DHCP option in the Network Configuration setup, you can launch Webmin to set up DHCP after installation. Click on Networking>Network Configuration>Network Interfaces. Under the section “Interfaces Activated at Boot Time” click on eth0. 

Select the option “From DHCP”. Clear any pre-filled Netmask and Broadcast addresses. Finally click on “Save and Apply”. 



We can also use a Terminal -based tool called netconfig to do the same. Launch the tool as:

Advertisment

#netconfig

In the “Configure TCP/IP” screen mark the option (using spacebar) “Use Dynamic IP Configuration”.

Shekhar Govindarajan

Advertisment