Originally Published: Thursday, 2 November 2000 Author: Chris Campbell
Published to: enhance_articles_sysadmin/Sysadmin Page: 1/1 - [Printable]

Linux and Windows NT 4.0: Basic Administration - Part V

Chris Campbell is the hardest workin' man in the TCP/IP business. Hot on the trail of the Introduction to Networking piece, Chris brings the theory of TCP/IP and networking into practice with Part V of the 'Basic Administration' series. Read on, true believer!

   Page 1 of 1  

Part V: Simple TCP/IP Services

In September 1981, RFC 791 was set for the DARPA agency (Defense Advanced Research Project), and TCP/IP became the default protocol for what was then known as the ARPanet. The modern incarnation came into vogue in the nineties as the Internet. The majority of the network was (and still is) supported by UNIX machines. LAN network operating systems, such as Windows NT and Novell have only recently begun to include full support and servers for Internet activity; no doubt to keep with the network's popularity.

Basic IP configuration:

Generally, a Windows NT administrator should be aware of  TCP/IP addressing and functioning. If not, there is a quick review here in this article on basic networking.

Generally, TCP/IP is installed automatically in Linux, and also in Windows NT. If it is not present, it can be added in Windows NT:


Click on the "Protocols" tab. Click "Add". Select TCP/IP from the generated list.

Whenever a new element is added, Windows NT will most likely ask for files from the i386 directory of the Windows NT installation disk. To this end, it is generally a good idea to have the i386 directory copied to the local hard drive (if space allows). This will reduce time and effort during installations.

Windows NT does the installation, it will give you the ability to specify the TCP/IP and subnet information. Reboot when requested.

If TCP/IP is already installed, configuration in Windows NT is relatively easy:


Click on the "Protocols" tab. Click "Properties".

Here, we can specify TCP/IP address, subnet mask, and gateway (first hop router). Clicking advanced allows us to bind additional IP addresses and gateways to the adapter.

In Linux, TCP/IP configuration is also fairly simple - and there are multiple ways to do it.

Most Linux distributions come with configuration tools such as linuxconf. This can be executed by going to a command line and typing:


This should bring up a GUI or ANSI type interface. The IP address may be entered here by clicking "Basic Host Information" and typing an IP address and subnet mask into the appropriately marked fields. It is also crucial to select the adapter, which should be "eth0" if there is only one NIC in the machine.

It is entirely possible that linuxconf is not included with the version of Linux that you may have, so IP addresses may be set manually from command line:

ifconfig eth0 {IPaddress} netmask {subnetmask}

The ifconfig command will set the TCP/IP settings for the time being, but these setting would need to be reset upon reboot. So, on most systems, it is possible to set the configuration at boot-up by editing:


Here the ifconfig commands can be re-issued at boot-up. Note however, that there are many different ways that the boot-time configuration may be handled, and generally it is advised to use linuxconf for this configuration when available. And again, this differs depending on the distribution. In Redhat, for instance edit:




and then go to /etc/rc.d/init.d and run:

network restart

Other distributions have a rc.conf file where this can be indicated. Most likely you will set the IP in linuxconf or another similar distribution dependent administration tool.

DHCP Services

Another very popular way to obtain TCP/IP information is by using a Dynamic Host Configuration Protocol (DHCP). This particular method uses a broadcast request to local area network servers to find a DHCP server. When the DHCP server is found, it transmits back the TCP/IP information to the client. The client holds the TCP/IP information for a period of time known as a lease. Being as the request method is a broadcast, DHCP is non-routable and requires the use of a server on each network segment called a DHCP relay server. This server intercepts local broadcast requests and forwards them to the central DHCP Server.

DHCP may be used for various reasons, including ease of distribution of new machines on a large network, security, or even just for tracking purposes. Commercial DHCP servers are available, such as QIP from Lucent. Each has its own benefits and detractions. Here we will just cover DHCP activity as pertaining to a transitioning.

Windows NT to Linux network.

On Windows NT, to add a DHCP Server:


Click the "SERVICES" tab. Click "Add". Select "Microsoft DHCP Server" from the generated list. After copying files, the installation will continue and reboot.

After the reboot, the DHCP server will need further administration. Go to:


Click "SCOPE" and then under that, "Create".

In the box that comes up, the IP limits of the network may be specified. Fixed IP addresses, such as the ones for the server may be reserved here so that the server does not attempt to delegate those addresses to other machines.

Once the information is added, confirm and the DHCP manager will ask to activate the scope. Click "Yes". After the scope has been added and activated, click in the left column on the local machine and then the scope beneath it. Next, click DHCP options. This will give you the ability to chose global or the default settings for added information to pass to the client, such as DNS, WINS, NIS, NTP, etc.

DHCP in Linux is also fairly easy. Unfortunately there are a few different DHCP servers available. You may have a different server then the one used here, Configuration however, should be the same.

For this article, we will be using the ISC 2.0 DHCP server, which, in my experience, is the most commonly used server. If it does not come with your version of Linux, you can download it from:


Installing packages in Linux is done through either a package manager (such as Red Hat Package Manager, RPM) or from a source "tarball" that you compile. This procedure was followed when we covered Samba download and installation in Part IV.

Quickly though,

1. Download the file

2. Unpack it with TAR:

tar -zxf {filename}

3. Go to the directory and type:


4. This will go on configuring for a little bit. When complete:

make install

After it has been installed, add the broadcast address bound to the Ethernet adapter. Microsoft DHCP clients broadcast to this address. Type:

route add -host dev eth0

DHCP options can be configured in /etc/dhcp.conf:

default-lease-time 1200;
max-lease-time 2400;
option subnet-mask;
option broadcast-address;
option routers;
option domain-name-servers,;
option netbios-name-servers;
subnet netmask {

Next, create a file for the lease information:

touch /etc/dhcpd.leases

This file may exist, but it's better to make sure, or errors will occur.

Set the DHCP server to start automatically by adding to your startup procedures (as indicated above in the TCP/IP addressing section.):


To start the server at this point, type:


There is also a GUI interface very similar to the Windows NT 4.0 DHCP manager, kcmdhcpd, but it is only available with Kde 2.0. It may be a preferred interface for administrators who still prefer the graphical interfaces.

TCP/IP Printing

There are multiple ways to do printing in Windows NT and with that multiple references toward each method. To reduce local broadcast traffic, ease of troubleshooting and for Wide Area Network printing, it is necessary to use TCP/IP printing. For the purposes of this section, the network printer will be assumed to be a pre-configured network printer. We are assuming in this exercise that the printer address has been configured, either by DHCP software such as Jet Admin, or a local share on a machine with TCP/IP loaded as a protocol. Our hypothetical printer here is a HP DeskJet 500 at the IP address

To add TCP/IP printing, first add the service to Windows NT:


Click on the "Services" tab. Click "Add". Select "Microsoft TCP/IP Printing" from the generated list. The installation should commence, again asking for files and requiring a reboot.

Once the machine has rebooted, add the new printer by going to:


Click "Add Printer". Next, Click "My Computer". A list of the available local ports will be presented. Here, click "Add Port" and then select "LPR Port". A window will now open asking for the name or address of the server. Put the TCP/IP Address of the print server here, and if the printer is share off of a workstation, put the share name on the next line where it prompts for the name of printer or queue.

Windows NT will attempt to contact the indicated IP address and printer. It the information is incorrect of the machine is not on the network, a message will appear. Assuming that it is all correct though, we will now see the TCP/IP address listed as a port in the port list. It is checked off. Click next.

We are now prompted to provide the location of the printer drivers. In our example, we are using a HP Deskjet 500. So, we would go down to HP and then select Deskjet 500. If the printer to be installed is not on the list, or there are updated drivers, select have disk and point to the driver location.

Next we select Printer name, typically anticipated to be the make and model of the printer. After that we need to specify if the printer should be shared, and if so what name to call it and which OS' may be clients that require drivers for it.

Finally, we have the option to print a test page, and are asked if the printing worked.

In Linux, we can add the printer via the printer several ways, locally, via a distribution administration tool or control panel, such as drakconf in mandrake, or add to the /etc/printcap file yourself:


Note that the /etc/printcap file is sort of a dangerous place to be tinkering around in. As always, it's suggested that you read the main page on the file. Once the printer has been added to the system, be sure to add it into the samba configuration.

Through SWAT, go to the "Printers" tab. Here, create a printer and fill in the printer path information from above.

Notably, adding a printer through the distribution administration tool, is much, much, much easier. Since Mandrake is the distribution that the series is based on, we will do it in drakconf:

In Drakconf, select "Printer Configuration" and say "Yes" to add a printer. Here, there is an option for printer connection. We can specify remote lpd for straight TCP/IP printing, and then provide the IP address of the printer server, or we can select either NetWare or SMB printing to print to printers shared via Microsoft clients. Specify the client name, address and name of the printer queue, security information if applicable, and that is it.

   Page 1 of 1