Lab Questions


The first lab is fairly elementary, designed to get you thinking in terms of networks and networking. The last two labs both work with the /etc/inittab configuration file. Before working with that file, make sure to back it up first.

Lab 1

1. 

You have 18 computers on a LAN behind a firewall. Diagram your computers on a sheet of paper. Connect them together in a "star" configuration. Assign a private IP address to each computer. Take one computer and draw a second connection to the Internet.

While this is a fairly simple exercise, Linux is built for networking. To understand what you can do with Red Hat Enterprise Linux, you need to think in terms of the role of your computer on a network.

image from book

Answers

1. 

There are many ways to configure the IP addresses on a LAN. But it is generally best to do it by setting up a network from one of the private IP address ranges. When you configure networking on your LAN, pay particular attention to the computer that also has a connection to the Internet. The IP address of its connection to your network will be the gateway address for every other computer on your LAN. It's also the logical location for any firewall that you may wish to configure.

Lab 2

2. 

In this lab, you'll start your experiments with the /etc/inittab file. So before you begin, back it up to a file such as /etc/inittab.bak or back up a copy to your home directory.

  1. Use the vi editor to open the /etc/inittab file in your computer.

  2. Take a look at your id variable. If it's set to 3, change it to 5; if it's 5 set it to 3.

  3. Reboot your computer and see what happens.

  4. Restore your original /etc/inittab file.

image from book

Answers

2. 

When you troubleshoot a Red Hat Enterprise Linux computer, one of the things you'll be checking are critical configuration files. One key file in the boot process is /etc/inittab. One thing that I can do in this book is to illustrate the behavior of potential problems. The more problems you're familiar with, the easier it will be to troubleshoot or debug a problem during the RHCT and RHCE exams. However, there is often more than one way to solve a problem. I present one method, but you may be able to find others.

To go through this lab, I'd take the following steps:

  1. Log in as the root user. You can do this from either the GUI or the text login interface.

  2. Run the cp /etc/inittab /root/inittab command. This backs up the subject configuration file in the root user's home directory.

  3. Open the subject file with the vi /etc/inittab command.

  4. Scroll down to until you see the following line:

     id:3:initdefault 

  5. The number after the id command identifies your starting runlevel. If it's 3, Linux starts in text mode; if it's 5, Linux starts in the GUI.

  6. Change this number from 3 to 5 (or from 5 to 3).

  7. Save your changes and exit from the vi editor with the :wq command.

  8. Reboot your computer with the reboot command.

  9. Linux should now start in your new runlevel (3 or 5).

  10. Restore your original settings in /etc/inittab. You can do this by opening /etc/inittab with the vi editor. Alternatively, you can copy your backup from the /root directory with the cp /root/inittab /etc/inittab command.

Lab 3

3. 

In this lab, you'll experiment a bit more with the /etc/inittab configuration file.

  1. If you haven't already done so, create a backup for /etc/inittab.

  2. Press CTRL-ALT-F2. You should see a virtual console text login screen.

  3. Return to the original text console by pressing CTRL-ALT-F1 or the GUI console by pressing CTRL-ALT-F7.

  4. In the /etc/inittab file, identify the lines related to the virtual login consoles.

  5. Try experimenting with these lines with the mingetty commands. Add a comment character (#) in front of the second line with the mingetty command.

  6. Run the init q command to make Linux reread this file.

  7. Try pressing CTRL-ALT-F2 again. What happens?

  8. Restore your original /etc/inittab configuration file.

image from book

Answers

3. 

In this lab, experiment with deactivating a specific virtual console. By default, six virtual text login consoles are configured in the /etc/inittab configuration file. You'll deactivate the second of the six consoles.

  1. Log in as the root user. You can do this from either the GUI or the text login interface. If you're in the GUI, open a text console. Right-click the desktop and choose New Terminal in the pop-up menu.

  2. Run the cp /etc/inittab /root/inittab command. This backs up the subject configuration file in the root user's home directory.

  3. Open the subject file with the vi /etc/inittab command.

  4. Scroll down until you see the following line:

     2:2345:respawn:/sbin/mingetty tty2 

  5. Press CTRL-ALT-F2. This should start a text login interface. You should be able to log in at the prompt with your username and password. (If you've started at a text console, you don't need to use the CTRL button.)

  6. If you logged into the GUI, press CTRL-ALT-F7 to return to the GUI. If you logged into the text interface, press CTRL-ALT-F1 to return to your original screen.

  7. Turn the subject command in /etc/inittab into a comment. Add a comment character in front of the line as shown:

     #2:2345:respawn:/sbin/mingetty tty2 

  8. Close and save this change to /etc/inittab using the :wq command.

  9. Make Linux reread /etc/inittab with the init q command.

  10. Press CTRL-ALT-F2. This should start a text login interface. Try logging in again. You'll see that it's not possible. Now you can see how adding a comment character to the right line in /etc/inittab deactivates the second virtual console.

  11. If you logged into the GUI, press CTRL-ALT-F7 to return to the GUI. If you logged into the text interface, press CTRL-ALT-F1 to return to your original screen.

  12. Restore your original settings in the /etc/inittab file.

  1. The key Linux file associated with the CPU is /proc/cpuinfo. However, other files can tell you about how Linux detected the CPU, including /var/log/dmesg. The more you know about such files, the more problems you can diagnose with your hardware.



RHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302)
Linux Patch Management: Keeping Linux Systems Up To Date
ISBN: 0132366754
EAN: 2147483647
Year: 2004
Pages: 227
Authors: Michael Jang

Similar book on Amazon
Linux Quick Fix Notebook
Linux Quick Fix Notebook
Self-Service Linux: Mastering the Art of Problem Determination
Self-Service Linux: Mastering the Art of Problem Determination
RHCSA/RHCE Red Hat Linux Certification Study Guide (Exams EX200 & EX300), 6th Edition (Certification Press)
RHCSA/RHCE Red Hat Linux Certification Study Guide (Exams EX200 & EX300), 6th Edition (Certification Press)
Security Strategies in Linux Platforms and Applications (Information Systems Security & Assurance)
Security Strategies in Linux Platforms and Applications (Information Systems Security & Assurance)

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net