Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Bill McCarty
ISBN: 0-7821-2812-2
The author and publisher have made their best efforts to prepare this book, and the content is based upon final release software
whenever possible. Portions of the manuscript may be based upon pre-release versions supplied by software manufacturer(s).
The author and the publisher make no representation or warranties of any kind with regard to the completeness or accuracy of
the contents herein and accept no liability of any kind including but not limited to performance, merchantability, fitness for any
particular purpose, or any losses or damages of any kind caused or alleged to be caused directly or indirectly from this book.
Copyright ©2000 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved. No part of this publica-
tion may be stored in a retrieval system, transmitted, or reproduced in any way, including but not limited to photocopy, photo-
graph, magnetic or other record, without the prior agreement and written permission of the publisher.
This sample chapter may contain images, text, trademarks, logos, and/or other material owned by third parties. All rights
reserved. Such material may not be copied, distributed, transmitted, or stored without the express, prior, written consent of the
owner.
Basic Knowledge
Linux
The GNU Project
Open Source Software
The Linux Kernel
Red Hat Linux
Important Linux Resources
Critical Information
In the 1960s, AT&T’s Bell Telephone Labs partnered with Massachu-
setts Institute of Technology and General Electric in developing a
multiuser computer operating system known as Multics. Two Bell
Labs researchers—Dennis Ritchie and Ken Thompson—worked on
the project until Bell Labs withdrew from the project.
The FSF promotes free software, but free software is not necessarily
costless software. The FSF intends the word free in the sense of free-
dom. Free software is software that you can
Red Hat Linux is the dominant Linux distribution. It has won Info-
World awards for three consecutive years, an unprecedented achieve-
ment. Red Hat, the company founded by Young and Ewing, is now
a publicly traded corporation, with a capitalized value in the billions.
In addition to Red Hat Linux, the company offers services such as
telephone support, on-site consulting, developer training, certifica-
tion programs, and priority access updates.
Red Hat’s Web site also provides access to a knowledge base that con-
tains solutions to common Red Hat Linux problems. A related Web
site, bugzilla.redhat.com, provides access to an up-to-date data-
base of known and suspected software defects. Red Hat also hosts
many mailing lists on topics related to Linux and Red Hat Linux. You
can access these mailing lists at https://listman.redhat.com/.
Exam Essentials
Be familiar with the history of open source software Although this
topic does not appear in the official list of study points, it’s fair game
for the RHCE exam. Be sure you’re familiar with Richard Stallman,
the Free Software Foundation, the GNU Public License, and the GNU
Project.
Be familiar with the history of Linux Although this topic does not
appear in the official list of study points, it’s fair game for the RHCE
exam. Be sure you’re familiar with the history of Unix, the Linux ker-
nel, and Linux.
Sample Questions
1. Which of the following is the URL for the Red Hat Web site that
provides access to bug reports?
A. bugs.redhat.com
B. bugzilla.redhat.com
C. status.redhat.com
D. www.redhat.com
PC Hardware
Red Hat Linux Support for Platforms
Red Hat Linux Support for PC Hardware
PC Hardware Configuration
Critical Information
The Linux Hardware Compatibility HOWTO, commonly known as the
Hardware-HOWTO, describes Linux support for hardware devices.
Red Hat publishes its own list of supported hardware, the Red Hat
Hardware Compatibility List, which you can find on the Red Hat Linux
distribution media and on the Web at www.redhat.com/support/
hardware. The hardware supported by Red Hat is roughly a subset of
the devices and components listed in the Hardware-HOWTO. When
choosing hardware for a Red Hat Linux system or installing Red Hat
Linux on an existing system, check the Red Hat Hardware Compatibility
List to make sure that the devices you’re installing are supported by Red
Hat Linux.
10 RHCE: Red Hat Certified Engineer Exam Notes
Tier 1 Hardware that Red Hat Linux can detect and reliably use.
Tier 2 Hardware that Red Hat Linux should be able to detect and
use; however, some users experience problems using this hardware.
Tier 3 Hardware that is problematic or for which only experimen-
tal drivers currently exist. Red Hat provides information concerning
Tier 3 hardware but does not support it.
Incompatible Hardware known not to work with Red Hat Linux.
T A B L E 1 : Supported CPUs
Intel Pentium
Intel Pentium II
AMD K6-2
AMD K6-3
Cyrix 6x86
AMD K5
AMD K6
Web Supplement Basic Knowledge 11
Winchip
TIP Linux kernel support for Firewire, MCA, and USB is not yet com-
plete. The Linux 2.4 kernel will include additional support for USB, but
USB device drivers may not be immediately available. Red Hat Linux
support for Firewire, MCA, and USB is planned.
Memory Support
The Linux 2.2 kernel that ships with Red Hat Linux 6.2 generally
auto-detects the amount of installed RAM (random access memory).
However, the standard kernel cannot auto-detect or use more than
1GB of RAM. To enable support for more than 1GB of RAM, you
must modify the include/asm-i386/page.h header file and recom-
pile the kernel. You may also need to pass a mem parameter to LILO,
instructing LILO to ignore the physical memory size reported by a
system BIOS unable to detect and report more than 64MB.
Red Hat Linux supports most external modems at Tier 1, along with
internal PCI modems based on the Lucent Venus chipset. Unfortu-
nately, an entire class of modems—known as WinModems—requires
special software drivers for operation. Manufacturers bundle Win32
software with these modems, but they do not distribute software for
other operating systems. Therefore, Red Hat Linux does not support
such modems. Also listed as incompatible are plug-and-play internal
modems, although these can be configured—even if somewhat incon-
veniently—by using isapnp or setserial.
The Red Hat Linux distribution’s support for sound cards is among the
best of any Linux distribution. However, support for sound cards
remains a Linux weakness. No sound cards are currently supported at
Tier 1.
14 RHCE: Red Hat Certified Engineer Exam Notes
You can generally use the BIOS to configure the IRQ and I/O port
associated with serial ports ttyS0 and ttyS1. To configure additional
ports, you can use the setserial command as follows:
The standard Red Hat Linux kernel includes support for eight paral-
lel ports. However, by default, only the device files /dev/lp0, /dev/
lp1, and /dev/lp2 are created during installation of Red Hat Linux.
You can increase the number of ports by modifying the header file
drivers/char/lp.c and recompiling the kernel. You can generally
use the BIOS to configure the IRQ and I/O port associated with
serial ports lp0 and lp1. It is unusual to configure more than two
parallel ports.
Infrared devices
Joysticks
Multi-port serial devices
Web Supplement Basic Knowledge 15
Printers
Radio cards
Scanners
Various devices that connect via the parallel port, such as Iomega
Zip drives
ide2=0x1e8,0x3ee,11 ide3=0x168,0x36e,10
Red Hat Linux fully supports almost all internal IDE/EIDE drives,
including IDE drives having a capacity greater than 33.8GB, which
are supported by Red Hat Linux kernels 2.2.14-5 and later. Some
drives require that their geometry be specified to the kernel via a boot-
time parameter such as
linux hda=1023,63,255
16 RHCE: Red Hat Certified Engineer Exam Notes
IRQs
An IRQ, or hardware interrupt, is a signal that notifies the CPU of an
important event, such as completion of an input/output (I/O) opera-
tion. Most devices require a dedicated IRQ, which must be assigned
manually or by the system BIOS. A PC has a limited number of IRQs,
most of which have standard assignments, as shown in Table 2.
IRQ Assignment
IRQ Assignment
9 Available
I/O Ports
As explained, most devices require an IRQ so that they can signal the
CPU to notify it that an I/O operation has completed. Most devices
also require a dedicated series of one-byte areas of memory, known as
I/O ports, that are used to move data from the device to system mem-
ory or from system memory to the device. Some devices require more
than one series of I/O ports.
DMAs
Most devices rely on the CPU to move data from memory to the
device. However, some high-speed devices are capable of accessing
memory directly, leaving the CPU free to work on other tasks while
I/O operations are in progress, a technique known as Direct Memory
Access (DMA).
18 RHCE: Red Hat Certified Engineer Exam Notes
DMA Assignment
1 Available (8-bit)
3 Available (8-bit)
5 Available (16-bit)
6 Available (16-bit)
7 Available (16-bit)
Jumpered Cards Older adapter cards often contain jumpers that let
you physically set the configuration.
Jumperless Cards More modern cards let you use a software pro-
gram to set the configuration.
Plug-and-Play Cards Some cards can be configured automatically
by the BIOS or a plug-and-play–compatible operating system.
Although configuring jumpered cards can be inconvenient, it is
straightforward. You simply set the jumpers to specify the resources
Web Supplement Basic Knowledge 19
required by the card, making sure the resource assignments don’t con-
flict with those of other cards. You may also need to specify the device
driver options that identify the resources assigned to the card.
Most modern PCs use the PCI bus, which supports a feature known
as plug-and-play. Plug-and-play is intended to simplify hardware
configuration. All PCI cards support plug-and-play. Some ISA cards
support plug-and-play, but only when inserted into a plug-and-play
system.
Hard Disks
The technique used to access a hard drive may impose restrictions on
the amount of data that the drive can store. Likewise, the way in
which a hard drive is divided into partitions has implications for the
ways in which it can be used.
20 RHCE: Red Hat Certified Engineer Exam Notes
Physical Address The data are addressed by the cylinder, head, and
sector that contain them.
Linear Block Address (LBA) The data are addressed by a relative
sector number.
Each addressing scheme imposes its own restrictions. Many BIOS
drivers can access only the first 1024 cylinders (cylinders 0–1023) of
a hard disk accessed via physical address. The Linux loader, LILO,
uses BIOS to access a hard disk only during booting. But a BIOS that
can’t access cylinder 1024 or beyond cannot boot a kernel stored, for
example, on cylinder 1025. A simple way to avoid this problem is to
ensure, through partitioning, that the Linux kernel is stored below
cylinder 1024.
Partitions
It’s generally best—though not strictly necessary—to divide a hard
disk’s space into several partitions. The main benefit of partitions is
that damage or corruption may often be confined to a single partition,
making it simple to recover data from the remaining partitions.
IDE disk drives have device names such as /dev/hda, /dev/hdb, and
so on. SCSI disk drives have device names such as /dev/sda, /dev/
sdb, and so on. Partitions are designated with a number, beginning
with 1, that is appended to the drive name. Thus, the first partition on
the first IDE drive is named /dev/hda1, and the third partition on the
second SCSI drive is named /dev/sdb3.
A hard disk can have only four ordinary partitions, known as primary
partitions. However, one of the primary partitions can be designated
as an extended partition. An extended partition does not contain a
file system; instead, it contains as many as 12 other partitions, known
Web Supplement Basic Knowledge 21
/dev/hda1
/dev/hda2
/dev/hda3
/dev/hda4
/dev/hda5
/dev/hda6
/dev/hda7
/dev/hda8
/dev/hda
Linux /home
Linux Swap
Linux /boot
Linux /tmp
Linux /var
Linux /
MBR
Extended Partition
Mount Points
Like Unix, Linux mounts file systems of block devices as subdirectories
within a unified file system. The directory that holds the contents of
a file system is called its mount point. Two file systems, known by
their mount points, are particularly important:
The boot file system is a small file system used to circumvent the
1024-cylinder restriction affecting the BIOS of many systems. By
locating the boot file system within the first 1024 cylinders, the Linux
kernel is guaranteed to be available to the BIOS.
Exam Essentials
Be familiar with the Red Hat Hardware Compatibility List You
don’t need to memorize which hardware devices are supported and
which are not. But, you should understand the various levels of support
provided by Red Hat. You should also have a general familiarity with
the types of devices that are well supported and not well supported.
Understand disk partitioning You should understand how Red Hat
Linux defines partitions and how file systems are mounted. You
should know the Linux partition types.
Be familiar with PC architecture and common PC hardware devices
and be able to configure common PC hardware The performance-
based components of the RHCE exam won’t likely ask you to manip-
ulate PC hardware, but the multiple-choice component of the RHCE
Web Supplement Basic Knowledge 23
exam may include questions that test your knowledge and under-
standing of PC hardware.
such that Linux can access them most effectively by using linear block
address rather than cylinder-head-sector address.
Logical partition A logical partition is one contained within an
extended partition.
Mount point A mount point is a directory that is associated with a
mountable file system.
Partition A partition is a region of disk space allocated to hold a file
system.
Partition type The partition type of a partition is a number that
represents the type of file system the partition is intended to hold.
Plug-and-play Plug-and-play is a BIOS and operating system facility
intended to simplify installation of devices.
Primary partition A primary partition is allocated to hold a file
system.
Red Hat Hardware Compatibility List The Red Hat Hardware
Compatibility List identifies hardware that is compatible with Red
Hat Linux and qualitatively describes the degree of compatibility.
Symmetric multiprocessing Symmetric multiprocessing is a scheme
whereby a computer may include several processors, each of which
performs similar functions.
Sample Questions
1. What is the maximum number of primary partitions that can be
defined?
A. 2
B. 4
C. 8
D. 12
Web Supplement Basic Knowledge 25
Unix
Using Unix Commands and Scripts
Using File Ownership and Permissions
Using and Manipulating the Path
Editing and Printing Text Files
Working with File Systems
Critical Information
Although Red Hat Linux provides over 1,000 commands, you don’t
need to know them all. If you know a dozen or so commands, you
know enough to enable you to perform the most common tasks.
Table 4 summarizes the most important Unix commands.
Command Function
cp Copies files
rm Deletes files
ls –l > filelist
Operator Meaning
Metacharacter Matches…
Shell scripts are ordinary text files that contain shell commands. One
of the most important shell commands is the comment. Any shell
script line beginning with a hash mark (#) is considered a comment.
The first line of a shell script should be a special comment that con-
sists of the comment character (#), followed immediately by an excla-
mation mark (!), followed by the path name of the program that Unix
should use to process the commands in the shell script, usually /bin/
bash. The BASH shell is the most commonly used Linux shell.
Form Meaning
cmd1 && cmd2 Execute cmd1; execute cmd2 only if cmd1 succeeds.
x=y
x=${y}
x=bash
echo $xrc
echo ${x}rc
30 RHCE: Red Hat Certified Engineer Exam Notes
x=${y}es
x=$yes
x=’$y’
x=\$y
export x,y,z
or
export x=$y
Form Meaning
if test-command
then
commands
fi
Often the test command is used as the subject command of the if.
For example, the following command
if test –e /etc/hosts
32 RHCE: Red Hat Certified Engineer Exam Notes
Condition Meaning
Condition Meaning
cnd1 –a cnd2 True if condition cnd1 and condition cnd2 are both true.
Necessary Procedures
System administrators must be able to perform a variety of operations
not generally performed by ordinary users. These include backing up
and restoring files, mounting and unmounting file systems, partition-
ing disks, creating file systems, and checking file systems. Some com-
mands in this section are privileged commands that can be performed
only by root. If a command fails to work, check to make sure you’ve
specified it correctly. If so, retry the command as root.
You can change the owner of a file, or a set of files, by issuing the
chown command. For example, the command
makes the user bill the owner of the files filex and filey. The
chown command is a privileged command that can be issued only by
the system administrator (root).
Similarly, you can change the group ownership of a file by issuing the
chgrp command. For example, the command
makes the group bill the new group owner of the files filex and
filey. You don’t have to be the system administrator to use the chgrp
command. You can change the group ownership of files you own to
that of any group of which you’re a member.
The system administrator can change the ownership and group own-
ership of a file by issuing only the chown command. For example, the
command
makes bill the owner and bob the group owner of the file filex.
File permissions determine who can read, write, and execute a file.
Directory permissions also determine who can add and remove files
from a directory, list the names of files in a directory, and access files in
a directory. Each of these operations is associated with a character, as
shown in Table 10.
Owner (rw-) The owner of the file can read and write, but not exe-
cute, the file.
Web Supplement Basic Knowledge 35
Group (r--) Members of the group that owns the file can read, but
not write or execute, the file.
Other (---) Other users cannot access the file.
You can manipulate file or directory permissions by using either of
two forms of the chmod command. The first form represents permis-
sions as numbers, as shown in Table 11.
Permission Number
r 4
w 2
x 1
- 0
User Designation
owner u
group owner g
other o
These designations are used with the letters shown in Table 11 to add
or subtract permissions from a file or directory. For example, to ensure
that group members can read a file, issue a command such as
When you create a file, its access permissions are set according to the
value specified by the umask command, which is inverted and then
ANDed with octal 666 to determine the permissions given to the new
file. For example, if you issue the command
umask 026
the resulting access permission is octal 640, so you will be able to read
and write any files that you create; members of your default group
will be able to read the files, and others won’t be able to access the files
in any way. Of course, after creating a file, you can issue a chmod com-
mand to establish exactly the permissions you want on that specific
file. When a directory is created, the argument of the umask command
is inverted and then ANDed with octal 777 to determine the permis-
sions given to the new directory.
Web Supplement Basic Knowledge 37
echo $PATH
/usr/bin:/bin:/usr/X11R6/bin
In this case, the path consists of three directories: /usr/bin, /bin, and
/usr/X11R6/bin. An entry is separated from an adjacent entry by a
colon (:).
export PATH=/sbin:$PATH
which adds the directory /sbin to the front of the path so that it will
be searched first. To add a directory to the back of the path, issue a
command such as
export PATH=$PATH:/sbin
which ls
Editing Files
To edit a text file, you use a text editor. Two popular Unix editors are
vi and pico. Both of these text editors are relatively compact, which
means they can be used even when your system has access to little or
no hard disk space. The vi editor is the more sophisticated editor, but
mastery of vi requires considerable practice.
The pico editor, used with the popular e-mail client pine, is much
simpler to learn and use. To edit a file by using pico, issue a command
such as
pico filex
Or, to create a new file, simply issue the pico command without
arguments:
pico
Most pico commands require you to press and hold Ctrl and type a
letter indicating the operation you want to perform. The menu at the
bottom of the screen reminds you of the most commonly used com-
mands; the caret (^) denotes the use of Ctrl.
Printing Files
To print a file, issue a command such as
lpr filex
which prints the file filex. To print a file to a specific printer, issue a
command such as
This command backs up the files filex and filey and the directory
dirz, storing the backup in the file tarfile.tar.
You can compress the backup file to reduce the amount of disk space
required to store it. To specify compression when creating a backup,
issue a command such as
This command mounts the ext2 file system residing on the partition
/dev/hdb1 as the directory /mnt/data. File system types other than
ext2 can be specified; for example, to mount an MS-DOS (FAT-16)
file system, specify msdos as the file system type.
40 RHCE: Red Hat Certified Engineer Exam Notes
You can mount a file system for reading only by specifying the ro
option:
When you’re done accessing a file system, you can unmount it by issu-
ing a command such as
umount /dev/hdb1
or
umount /mnt/data
mke2fs /dev/hdb2
mkswap /dev/hdb3
fdisk /dev/hdb
Once fdisk has started, it presents a prompt that lets you know it’s
ready:
Command Action
d Deletes a partition
Usually, your first step after starting fdisk is to issue the p command
to display the partition table. The result should resemble the follow-
ing output:
The Device column indicates the name of the Linux partition that
a particular row of data describes.
The Start and End columns give the starting and ending cylinder
numbers of the partition.
The Blocks column gives the size of the partition, in 1024-byte
blocks.
The Id and System columns specify the type of the partition, the
former giving the numerical code and the latter giving the descrip-
tive name.
You can toggle the display to show sectors instead of cylinder num-
bers, which is appropriate if you’re using LBA addressing rather than
physical addressing, by issuing the u command.
To delete a partition, issue the d command and then specify the num-
ber of the partition you wish to delete.
To create a new partition, issue the n command and specify the type
of partition (primary, extended, or logical) and the start and end
values. Then, issue the t command and specify the numerical type of
the partition. Use type 82 for a swap partition and type 83 for a reg-
ular partition.
When you’ve specified all the partitions, issue the w command to write
the revised partition table and exit the program. Sometimes, changes
to the partition table require you to reboot the system. If instructed to
do so, reboot the system.
44 RHCE: Red Hat Certified Engineer Exam Notes
e2fsck –f /dev/hdb2
e2fsck –f –c –p /dev/hdb2
Exam Essentials
Understand and know how to use Unix commands Although
this topic is not included in the official list of RHCE study points,
you won’t be able to complete the performance-based components
of the exam unless you’re able to use Unix commands. The multiple-
choice exam may also test your knowledge and understanding of
particular Unix commands and Unix commands generally.
Sample Questions
1. Which of the following is the shell’s input redirection operator?
A. >
B. >>
C. <
D. <input
TCP/IP Networking
IP Addressing for Hosts and Networks
The TCP/IP Networking Model
TCP/IP Routing
Common Linux Services
Well-Known TCP/IP Ports Services
Critical Information
At one time, a variety of protocols vied for ascendancy as the preem-
inent protocol. The advent of the Internet, which is based on the TCP/IP
(Transmission Control Protocol/Internet Protocol) protocol family,
has essentially ended the contest. Except for closed, private networks,
most networks today use TCP/IP as their primary protocol.
IP Addresses
TCP/IP networks are systems of interconnected computer systems
called hosts. Each host has one or more IP addresses, usually one
address for each network interface installed on the host. TCP/IP
addresses are 32-bit numbers that are commonly written as a series of
four octets (8-bit values) in dotted quad notation. For example, a
TCP/IP host might have an IP address such as 192.168.1.1, which is
equivalent to the 32-bit integer 3,232,235,777 (192 × 2563 + 168 ×
2562 + 1 × 256 + 1).
Network Classes
Organizations don’t ask the Internet authorities to assign them a single
IP address. Instead, they request a consecutive series of IP addresses
that can be assigned to hosts within their network. The IP addresses are
chosen from one of the following three classes, distinguished by the
value of the first octet:
Subnetting
Suppose you have two small networks, each consisting of about one
dozen hosts. You could request a class C network address for each
network. However, a class C network address provides many more IP
addresses than you need. If you could somehow have a network
address of, say, 26 bits instead of 24, you could host several networks
within the range of IP addresses comprising a single class C network
address. The remaining 6 bits of the IP address would let you assign
as many as 31 hosts to each network.
Subnetting lets you split an IP address into its network and host-
address components anywhere you like, rather than only at an octet
boundary. You designate the part of an IP address that comprises the
network address by specifying a netmask, a 32-bit string that has a 1
bit in each position that’s part of the network address and a 0 bit else-
where. You write a netmask using the same dotted quad notation
used for IP addresses. For example, a standard class C address has a
netmask of 255.255.255.0: The first three octets have all 1 bits and
the final octet has all 0 bits. To specify a 26-bit network address, you
use a netmask of 255.255.255.192, in which the final octet has 1 bits
in its two highest order positions.
Supernetting
As you might expect, supernetting is related to subnetting. Whereas
subnetting lets you split a network into several smaller networks,
supernetting lets you join consecutively numbered networks into a
50 RHCE: Red Hat Certified Engineer Exam Notes
An organization registers its domain name (or names) with the Internet
authority. Then, it assigns host names that include the domain name.
As a simple example, the host name www.redhat.com consists of
a subdomain, redhat
a top-level domain, com
It’s common for hosts within a network to refer to one another by
host name, without reference to their implied common domain name.
The combination of a host name and domain name is called a fully
qualified domain name (FQDN).
TCP/IP Model
It’s common to explain a protocol suite by referring to the Open Sys-
tems Interconnect (OSI) reference model, which groups network
functions into seven layers. However, the TCP/IP family of protocols
does not closely conform to the OSI model. It’s more convenient to
think of TCP/IP as consisting of four protocol layers, as shown in
Figure 2. The following subsections explain each of these layers in
detail.
Application
Protocols
Transport
Protocols
Internet
Protocols
Network Access
Protocols
52 RHCE: Red Hat Certified Engineer Exam Notes
Internet Protocols
The Internet layer of protocols establishes IP addresses as the standard
means of addressing TCP/IP hosts. This layer also handles the routing
of messages that are destined for hosts outside the local network.
A host can send data to another host on the local network by direct-
ing the data to the IP address of the destination host. Alternatively, a
network host can send a broadcast message that reaches every host on
the local network.
The ICMP protocol passes control messages from host to host. These
control messages
Transport Protocols
The transport protocols are used to pass application data from host to
host, using the services provided by protocols of the network access
and Internet layers. The two main transport protocols are User Data-
gram Protocol (UDP) and Transmission Control Protocol (TCP). UDP
enables applications to send finite-length messages from one host to
another. Like IP, UDP is a connectionless, unreliable protocol. Its main
virtue is low overhead, which makes it suitable for short, infrequent
host-to-host interactions and interactions in which dropping a message
now and again is less important than sending data quickly. When error
detection and recovery are needed, TCP is used.
Application Protocols
TCP/IP provides many application protocols, known as services.
Moreover, programmers can easily create new services based on the
UDP or TCP protocols. A service is associated with a port, a 16-bit
number that identifies the service. UDP and TCP ports are distinct; a
service based on UDP can have the same port as one based on TCP,
without confusion.
Daemons
Under Unix, TCP/IP services can be supported in any of three ways:
Daemon Description
Daemon Description
Daemon Description
Daemon Description
ps x
The output of this command includes the process ID (PID) and the
command associated with each daemon.
This command reports the port number or name of the associated ser-
vice and the process number and name of the process currently listen-
ing on the port. If the listening process is inetd, this indicates that the
service will be started by inetd when needed, as in the following out-
put from the netstat command:
Necessary Procedures
Red Hat Linux includes a script for each installed daemon. The script
can generally
Starting a Daemon
To start a daemon, take the following steps:
./xxx start
where xxx is the name of the file associated with the daemon.
3. Check the system log, /var/log/messages, for error messages.
Stopping a Daemon
To stop a daemon, take the following steps:
./xxx stop
where xxx is the name of the file associated with the daemon.
3. Check the system log, /var/log/messages, for error messages.
Restarting a Daemon
To restart a daemon, take the following steps:
./xxx restart
where xxx is the name of the file associated with the daemon.
3. Check the system log, /var/log/messages, for error messages.
./xxx status
where xxx is the name of the file associated with the daemon.
Exam Essentials
Understand TCP/IP networking Although this topic doesn’t
appear in the official list of RHCE study points, it’s fair game for the
RHCE exam. Even if no questions on TCP/IP networking appear on
the multiple-choice exam, you won’t likely be able to complete the
performance-based portions of the RHCE exam without an under-
standing of TCP/IP networking.
Default route The default route is the route along which a packet is
sent if no more specific route to the packet’s destination exists.
Domain name A domain name is a name registered by an organiza-
tion with the Internet authority, shared by hosts belonging to that
organization. An organization can register multiple domain names.
The combination of a host name and domain name makes up a fully
qualified domain name that uniquely identifies a host.
Dynamic IP address A dynamic IP address is an IP address assigned
dynamically—for example, when a host is booted.
Dynamic routing Dynamic routing is a routing technique whereby
the contents of routing tables are automatically updated as network
conditions change.
Fully qualified domain name (FQDN) A fully qualified domain
name is the combination of a host name and a domain name that
uniquely identifies a host.
Gateway A gateway is a router that provides access to a network or
the Internet.
Host address The host address, or IP address, of a system uniquely
identifies the system.
Host name The host name of a system is a name assigned by the sys-
tem administrator. The host name must be unique within a domain.
IP address An IP address is a 32-bit number that uniquely identifies
an Internet host.
Network address The network address is the portion of an IP
address that is the same for all hosts on a given network.
Network class Network class is a designation that describes how a
network address can be derived from an IP address. For example, the
first 24 bits of an IP address from a class C network make up the net-
work address.
Non-privileged port A non-privileged port is one that has a number
from 1024 to 65535. Any process can access an available non-
privileged port.
Web Supplement Basic Knowledge 63
Sample Questions
1. Which of the following protocols is an unreliable protocol?
A. IP
B. ICMP
64 RHCE: Red Hat Certified Engineer Exam Notes
C. TCP
D. UDP