Minimal Linux Installation - DHCP, DNS, Kickstart
Aims:
- To perform additional tasks required during networked
installation
- To build on the minimal Unix system from last week
- To add Network Infrastructure services - DHCP and DNS
- To investigate automated installation and
configuration using Kickstart
References:
LDP
document on preparing
to install
Linux
(Section 2)
Linux installation Datasheet (or
your modifiied copy from last week's Tutorial exercise)
NetLab LabNotes
Linux
Network Administrator's Guide (2nd Edition)
2.6
Resolving host Names
3.3
Configuring the Network Cards
4.
Configuring TCP/IP networking
6.
Name Service and Resolver configuration
LDP
DHCPD Mini HOWTO
RedHat
Linux 8.0 Customization Guide
Installing
and Configuring
a Minimal Fedora Server
Exercises:
The following exercise are to be conducted in each Tutorial group and
is built on the Minimal Linux disk created in a previous
tutorial. In order
to complete this exercise during the tutorial your group will need to
be
well prepared and not waste too much time. Your group will need:
- The same removable disk (from the TWO-series) that
was allocated to your group
in previous tutorials
- three or more neighbouring desktop PCs (one to be
used as a server)
- a desktop hub and power pack
- a set of UTP network cables
- Fedora DVD
It is very important that each member of the group take detailed notes
of the steps followed during this tutorial, as this will help to
prevent
errors and make it easier to repeat the correct procedure should you
need
to do so in future tutes. For example, it is entirely possible that you
will need to reformat the hard disk and start again if there is some
catastrophic
error. Being able to refer back to detailed notes will make this a lot
easier (:-).
Install DHCP service on your server
Refer back to your Linux Installation Datasheet and tutorial notes from
last week.
This stage takes about 30-40 minutes and is described in Chapter
17 of the RedHat Linux Customization Guide.
In summary, you will need to:
- Using a local desktop hub, connect your nominated
server and one or more other
desktop machines into a local network using the second network
interface (the one in the PC extension slot; not on the mainboard).
Make sure that this network is
isolated
from the Lab network by unplugging all unnecessary UTP cables.
- Make sure the PC is SWITCHED OFF and plug in your
group's allocated disk drive. After locking the drive in place and
turning on the power, verify that
the drive is recognised by the BIOS.
- Press the DEL key on the keyboard shortly after the
first Beep during boot.
This will open the BIOS configuration window. Confirm that the boot
sequence is "A, CDROM, C" or some other combination where CDROM comes
before C:
- Boot the Minimal Linux system from your hard disk and
login as
the root user (see last week's tutorial).
- Verify that the second network interface is
configured and operational using the command
/sbin/ifconfig eth1.
If the interface is not available, then use the commands system-config-network
to set up interface eth1,
and service network restart to activate it. Since this
machine is to be used as a server, the second network card should be
confirured with a fixed network number, rather than using DHCP
itself... it make no sense to configure the DHCP server using DHCP :-)
- Insert Fedora DVD in the CDROM drive and at the shell
prompt enter the
following commands:
mount /media/cdrom
cd /media/cdrom/Fedora/RPMS
rpm -ivh dhcp-3<TAB>-
Create the DHCP configuration file in /etc/dhcpd.conf as
described
in Chapter
17. A sample file has been installed with the DHCP documentation
and
may be found at /usr/share/doc/dhcp-3.0pl1-9/dhcpd.conf.sample.
A good suggestion is to replicate the IP assignments from the local
network
in the Lab, so that the benchtop machines may be used as clients in
your
private network without modification. A copy of the local lab DHCP
configuration
file is available here as a ZIP file.
- Create the DHCP lease database using the command: touch
/var/lib/dhcp/dhcpd.leases
- Start the DHCP server using the command: /sbin/service
dhcpd start.
Watch carefully for any run-time or startup errors. These will also be
recorded in the system logfile (/var/log/messages).
- To setup the system so that DHCP is started
automatically at boot time
use the command: ntsysv
as described in Chapter
13. It may also be wise to configure the DHCP server so that it
will
only respond to requests arriving from the local network (ie at eth1).
This prevents the server from answering DHCP requests from other
networks and can be achieved by adding the line DHCPDARGS=eth1
to the service parameters in the file /etc/sysconfig/dhcpd.
- Test your server by booting a desktop computer
connected to the same desktop network hub and configured as a DHCP
client.
Brief details of the DHCP request will be found afterwards in the
servers
system log file (/var/log/messages). Alternatively,
setup
a third machine with packet analyser software (EtherPeek,
Ethereal
or tcpdump) and watch for the DHCP request, offer and lease
messages in the analyser packet trace.
- Things that may go wrong:
- faulty cables - discard any damaged cables, or
cahles with broken RJ45 connectors
- cables not plugged in completely
- unconfigured network interfaces: verify
configuration using
/sbin/ifconfig
- NICs with static probed MAC addresses from another machine. This usually
occurs in Fedora Core 4 or later, when the disk was formatted and
System installed on another machine. The MAC address of the
installation machine is registered in the driver software and will
continue to be used even afer the disk is booted on a different PC
(with a different MAC address!): Correct this fault by using the
system-config-network utility and "probe" the MAC address to update it.
- DHCP configuration file with network details that
differ from the local network configuration: If you downloaded a dhcpd.conf file, you must
remember to correct the network addresses in the subnet and range options so that they
correspond to the local network configuration
- not restarting the network services after editing
and saving the configurations. Changes only com into effect after the
services are restarted.
- enabling the Firewall or Security Enhanced Linux
features. Firewalls or SE Linux may interfer with some network
protocols and configurations. Verify firewall settings using
/sbin/iptables
-L to list the firewall rulesets. Edit the rule sets using the
command /sbin/system-config-securitylevel.
Install DNS service on your server
- The Redhat Bind configuration tool is described in Chapter
20, and while this is a very convenient method for managing the DNS
name lookup tables, it requires X-Windows, which may not be installed
at
this stage.
- See How
DNS works for a description of the functions performed
- See Running
named for a description of the configuration files required
- Installing BIND in your minimal Linux environment can
be achieved
by placing FedoraCore2 CD#1 in the CD drive and using the commands:
mount /mnt/cdrom
cd /mnt/cdrom/Fedora/RPMS
rpm -ivh bind-*-
Then create the zone files. You may use any text editor to create the /etc/named.conf
file or see Chapter
20 for details of the method using the redhat-config-bind
command in X-Windows.
- Your Tutor may ask to see the working system and
services and any notes
take during the exercise.
Investigate the use of RedHat Kickstart to
automatically install Linux
and configure services
- RedHat Kickstart is described in Chapter
6 of the Customization Guide. There is also a useful article on Kickstart
by James O'Kane in the SysAdmin Magazine.
- Consider what is required to setup a kickstart
configuration to achieve
all that you have done in the last two weeks. Your project may require
the configuration of many Lunix systems, and the kickstart method may
be
a convenient way to achieve this automatically. Discuss.
Completing the Tutorial Exercise
Make sure that you clean up and reset the machinery before leaving the
tutorial.
You should:
- logout and shutdown your machines correctly
- remove the B-series drive and return it to your Tutor
for safe storage
- replace any desktop hubs and reconnect any cables
that you used so that
the desktop network setup is returned to its standard configuration.
Remember
that other students will be using the Lab after you, and have a care
for
the sort of environment they will find after you leave!!
- reinstall the ONE-series drive and make sure that the
machine boots correctly,
then shut it down correctly.
- Check with your tutor before leaving.
|