Lab Questions

 < Day Day Up > 



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.

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.

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 the next two labs, we'll be experimenting 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, and vice versa.

  3. Reboot your computer and see what happens.

  4. Restore your original /etc/inittab file.

when you troubleshoot a red hat enterprise linux computer, one of the things you ll be working through 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 that you re familiar with, the easier it is 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. you may be able to find others. to go through this lab, i d take the following steps: a. log in as the root user. you can do this from either the gui or the text login interface. b. run the cp /etc/inittab /root/inittab command. this backs up the subject configuration file in the root user s home directory. c. open the subject file with the vi /etc/inittab command. d. scroll down until you see the following line: id:3:initdefault e. 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. f. change this number from 3 to 5 (or 5 to 3). g. save your changes and exit from the vi editor with the :wq command. h. reboot your computer with the reboot command. i. linux should now start in your new runlevel (3 or 5). j. 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.

Answers

2. 

When you troubleshoot a Red Hat Enterprise Linux computer, one of the things you'll be working through 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 that you're familiar with, the easier it is 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. 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 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 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, we'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 with CTRL-ALT-F1 or the GUI console with 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.

in this lab, we experiment with deactivating a specific virtual console. by default, six virtual text login consoles are configured in the /etc/inittab configuration file. in this lab, we deactivate the second of the six consoles. a. 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 on the desktop and click new terminal in the pop-up menu. b. run the cp /etc/inittab /root/inittab command. this backs up the subject configuration file in the root user s home directory. c. open the subject file with the vi /etc/inittab command. d. scroll down until you see the following line: 2:2345:respawn:/sbin/mingetty tty2 e. 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. f. 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. g. 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 h. close and save this change to /etc/inittab with the :wq command. i. make linux reread /etc/inittab with the init q command. j. 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. k. 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. l. restore your original settings in the /etc/inittab file.

Answers

3. 

In this lab, we experiment with deactivating a specific virtual console. By default, six virtual text login consoles are configured in the /etc/inittab configuration file. In this lab, we 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 on the desktop and click 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.

  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 with 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.



 < Day Day Up > 



RCHE Red Hat Certified Engineer Linux Study Guide[c] Exam (Rh302)
RCHE Red Hat Certified Engineer Linux Study Guide[c] Exam (Rh302)
ISBN: 71765654
EAN: N/A
Year: 2003
Pages: 194

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