Troubleshooters.Com and T.C Linux Library Present

Renumbering and Configuring the Server

Copyright (C) 1998 by Steve Litt, All rights reserved. Material provided as-is, use at your own risk. 

The purpose of this document is to make it easy to renumber and configure your server to accommodate a customer's existing Win network.


Does the Client Have Existing Network(s)?

If it appears that there's no networking yet enabled, your job is simple. On each Windows machine, automatically obtain the ip address, enable Wins resolution through dhcp, add the default Linux server's IP ( to the DNS list, and you're done. (Except for enabling users and directories, etc.). You can skip down to the Configuring Users section.

Winmachine Information Sheet

For each Windows machine, fill out the following:
Machine Description IP
(or note auto)
(or note auto)
Wins/dhcp? Identification tab:
computer name
Identification tab:
DNS tab:
Host, domain, list

This is, which seems to allow editing all files requiring change in order to renumber. Renumbering will take 10-20 minutes. Do it carefully. Troubleshooting can take up to an hour.
#!/usr/bin/perl -w
my($ip) = "";
my($netmask) = "";
my($oldip) = "";

print "\n\n\n\nSETSERV\n";

system("hostname linuxhost");
system("ifconfig eth0 $ip netmask $netmask");
system("route del -net $ip");
system("route del -net $oldip");
system("route add -net $ip");
system("joe /etc/sysconfig/network");
system("joe /etc/sysconfig/network-scripts/ifcfg-eth0");
system("joe /etc/sysconfig/network-scripts/ifcfg-eth0:0");
system("rm /etc/sysconfig/network-scripts/ifcfg-eth0:0~");
system("joe /etc/resolv.conf");
system("joe /etc/hosts");
system("joe /etc/dhcpd.conf");
system("joe /etc/dhcpd.leases");
system("joe /etc/debug");
system("joe /etc/named.boot");
system("joe /etc/smb.conf");
system("joe /var/named/named.forward");
system("joe /var/named/named.reverse");
system("joe /etc/httpd/conf/httpd.conf");


sub checkit
 system("find /var/named -type f | xargs grep -l $oldip > junk.named");
 system("find /etc -type f | xargs grep -l $oldip >> junk.etc");
 system("cat junk.named junk.etc | less");

sub restartt
 system("kill `cat /var/run/`");
 system("/etc/rc.d/init.d/httpd start");

 system("/etc/rc.d/init.d/named stop");
 system("/etc/rc.d/init.d/named start");

 system("/etc/rc.d/init.d/network stop");
 system("/etc/rc.d/init.d/network start");

 system("/etc/rc.d/init.d/sendmail stop");
 system("/etc/rc.d/init.d/sendmail start");


Symptoms and Solutions:

Amd, sendmail, telnet and/or nslookup hangs or is (are) very slow

This is usually a reverse DNS problem. Occasionally the hang is during boot, and is so complete the system can't be accessed. How to bust into a locked up system is presented later in this section. Here are the usual suspects in a reverse DNS problem:

How to Bust Into A Locked Up System

Boot to a Linux boot disk, and on the LILO: command type in "rescue". It will chug for a little while and then ask for the "root disk". Put in the rescue diskette and hit enter. Now do the following:
mount /dev/hda6 /mnt
cd /mnt/etc/rc.d/rc3.d
mv S72amd _S72amd
mv S80sendmail _S80sendmail
cd /
umount /mnt
Note the following about the above sequence:


Click here for a predefined diagnostic.

Back to Troubleshooters.Com * Back to Linux Library