Lab Questions

 < Day Day Up > 



Lab 1

1. 

Your internal network is growing, and you're having trouble keeping up with the different workstations that are being added to your network on a regular basis. You use the good.example.com subdomain for your internal network, and you've named your computers for your departments, such as engr1 through engr10.good.example.com.

Your mail server is named postal, your Web server is named www, your FTP server is named ftp. You want to configure a DNS server on the computer named names. What do you need to do?

While you may not have enough information in this lab to create a complete and working file, you should be able to figure the outline of what you need to do, with the possible exception of specific IP addresses.

while you could subcontract out the task to an isp, it s easy to create a dns server for your internal network. the basic files are already available on rhel 3. all you need to do is modify these files and add appropriate zone files to your /var/named directory. as there are problems with the red hat dns server configuration tool, i ll describe the basics on how you can set up a dns server by directly editing the appropriate configuration files. assume that you re using the 10.11.12.0/255.255.255.0 network addresses for your lan. first, you ll need to modify the default /etc/named.conf configuration file. it s best to start by backing up this file. you ll need to add stanzas that refer to a zone and a reverse zone file. the stanzas are straightforward: zone `good.example.com` in { type master; file `good.example.com.zone`; };zone `12.11.10.in-addr.apra` in {type master;file `good.example.com.rr.zone`;allow-update { none; } }; next, you can create the good.example.com.zone and good.example.com.rr.zone files in the /var/named directory. these files will contain a database of local and reverse local computer names and ip addresses for your lan. in the good.example.com.zone file, you ll want to create the forward database for your dns server. it ll contain the records for your domain as well as the administrator e-mail address. there s not enough information in the problem to set up a full file, but the following principles apply. you need to start the zone file with a general time to live (ttl) variable; for example, the following command sets a standard ttl (4 days) for data on this dns server: $ttl 4d you ll need a start of authority (soa) record with the name of the dns server and your administrative e-mail address. the format of the e-mail address is a little strange; the following line sets an e-mail address of admin@good.example.com . it also sets a serial number based on the date, a refresh (16 hours) and a retry frequency (4 hours), an expatriation period (2 weeks), as well as a ttl (4 days). do note the dot at the end of each name: @ in soa names.good.example.com. admin.good.example.com. (20040212116h4h2w4d now you can specify the computers associated with the dns and mail servers: in nsnames.good.example.com. in mx10 postal.good.example.com. finally, you can specify the different computers on your network. while no specific ip addresses are given, you know that you have computers with the following names that you ll have in the good.example.com.zone file. i ve added arbitrary ip addresses on the given ipv4 network. you ll have to find the proper ip addresses for yourself with ifconfig commands on each computer: engr1in a10.11.12.1 engr2in a10.11.12.2 engr3in a10.11.12.3 engr4in a10.11.12.4 engr5in a10.11.12.5 engr6in a10.11.12.6 engr7in a10.11.12.7 engr8in a10.11.12.8 engr9in a10.11.12.9 engr10 in a10.11.12.10 ftpin a10.11.12.11 wwwin a10.11.12.12 postal in a10.11.12.13 finally, to make sure that the dns server works the next time you boot this linux computer, you ll want to set it to run at the appropriate runlevels with a command such as the following: # chkconfig --level 35 named on

Answers

1. 

While you could subcontract out the task to an ISP, it's easy to create a DNS server for your internal network. The basic files are already available on RHEL 3. All you need to do is modify these files and add appropriate zone files to your /var/named directory. As there are problems with the Red Hat DNS Server Configuration tool, I'll describe the basics on how you can set up a DNS server by directly editing the appropriate configuration files. Assume that you're using the 10.11.12.0/255.255.255.0 network addresses for your LAN.

First, you'll need to modify the default /etc/named.conf configuration file. It's best to start by backing up this file. You'll need to add stanzas that refer to a zone and a reverse zone file. The stanzas are straightforward:

zone "good.example.com" IN {       type master;       file "good.example.com.zone"; }; zone "12.11.10.in-addr.apra" IN {      type master;      file "good.example.com.rr.zone";      allow-update { none; } };

Next, you can create the good.example.com.zone and good.example.com.rr.zone files in the /var/named directory. These files will contain a database of local and reverse local computer names and IP addresses for your LAN.

In the good.example.com.zone file, you'll want to create the forward database for your DNS server. It'll contain the records for your domain as well as the administrator e-mail address. There's not enough information in the problem to set up a full file, but the following principles apply.

You need to start the zone file with a general Time To Live (TTL) variable; for example, the following command sets a standard TTL (4 days) for data on this DNS server:

$TTL 4D

You'll need a Start Of Authority (SOA) record with the name of the DNS server and your administrative e-mail address. The format of the e-mail address is a little strange; the following line sets an e-mail address of admin@good.example.com. It also sets a serial number based on the date, a refresh (16 hours) and a retry frequency (4 hours), an expatriation period (2 weeks), as well as a TTL (4 days). Do note the dot at the end of each name:

@   IN   SOA     names.good.example.com. admin.good.example.com. (                  200402121                  16H                  4H                  2W                  4D

Now you can specify the computers associated with the DNS and mail servers:

    IN   NS      names.good.example.com.     IN   MX      10 postal.good.example.com.

Finally, you can specify the different computers on your network. While no specific IP addresses are given, you know that you have computers with the following names that you'll have in the good.example.com.zone file. I've added arbitrary IP addresses on the given IPv4 network. You'll have to find the proper IP addresses for yourself with ifconfig commands on each computer:

engr1    IN   A    10.11.12.1 engr2    IN   A    10.11.12.2 engr3    IN   A    10.11.12.3 engr4    IN   A    10.11.12.4 engr5    IN   A    10.11.12.5 engr6    IN   A    10.11.12.6 engr7    IN   A    10.11.12.7 engr8    IN   A    10.11.12.8 engr9    IN   A    10.11.12.9 engr10   IN   A    10.11.12.10 ftp      IN   A    10.11.12.11 www      IN   A    10.11.12.12 postal   IN   A    10.11.12.13

Finally, to make sure that the DNS server works the next time you boot this Linux computer, you'll want to set it to run at the appropriate runlevels with a command such as the following:

# chkconfig --level 35 named on 

Lab 2

2. 

You'll need two Linux computers for this lab: one as an NFS server, a second as an NFS client. Let's call these computers nfssvr.example.com and nfsclient.example.com. On the server, you'll want to share the /home directories, and provide write permissions to the client computer. On the client, you'll want to set up the /home directory from the NFS server to be mounted the next time you boot that client computer.

this lab is the first step towards creating a single /home directory for your network. once you get it working on a single client/server combination, you can set it up on all clients and servers. you can then use the nis server described in chapter 10 for a single linux/unix database of usernames and passwords for your network. on the nfs server, you ll want to take the following steps: a. set up some users and special files that you ll remember in some of the user s home directories on the server. the details are not important-just make a note of what you ve done. b. share the /home directory in /etc/exports. you ll want to share it with the nfsclient.example.com client. you can do this in this file with the following command: /home nfsclient(rw,sync) c. export this directory with the following command: # exportfs -a d. restart the nfs service: # service nfs stop # service nfs start e. make sure that the exported /home directory shows in the export list. on the local server, you can do this with the following command: # showmount -e f. if you have problems with any step in this process, make sure you don t have extra spaces in /etc/exports and that the nfs service is actually running with the service nfs status command. you may also want to check your firewall and make sure the appropriate services described in this chapter are running with the rpcinfo -p command. g. remember to make sure that the nfs server starts automatically the next time you boot that computer. one way to do so is with the following command: # chkconfig --level 35 nfs on now on the nfs client, you ll want to take the following steps to connect to the shared /home directory: a. first, you ll want to make sure that you can see the shared /home directory. if your dns server is not working in any of these commands, you can substitute the ip address of the appropriate computer: # showmount -e nfssvr.example.com b. now you ll want to mount the share that is offered on the local /home directory: # mount -t nfs nfssvr.example.com:/home /home c. check to see that the mounting has worked. if it did, you ll see the nfs mount in the output to the mount command. d. now look through the mounted /home directory for the special files that you created in step 1. if you find them from the nfs client, you ve succeeded in creating and connecting to the /home directory share. e. to make the mount permanent, you ll want to add it to your /etc/fstab file. once you ve added a command such as the following to that file, the linux client automatically mounts the shared /home directory from the nfs server. nfssvr.example.com:/home/homenfs soft,timeout=10000

Answers

2. 

This lab is the first step towards creating a single /home directory for your network. Once you get it working on a single client/server combination, you can set it up on all clients and servers. You can then use the NIS server described in Chapter 10 for a single Linux/Unix database of usernames and passwords for your network. On the NFS server, you'll want to take the following steps:

  1. Set up some users and special files that you'll remember in some of the user's home directories on the server. The details are not important-just make a note of what you've done.

  2. Share the /home directory in /etc/exports. You'll want to share it with the nfsclient.example.com client. You can do this in this file with the following command:

    /home nfsclient(rw,sync)
  3. Export this directory with the following command:

    # exportfs -a
  4. Restart the NFS service:

    # service NFS stop # service NFS start
  5. Make sure that the exported /home directory shows in the export list. On the local server, you can do this with the following command:

    # showmount -e
  6. If you have problems with any step in this process, make sure you don't have extra spaces in /etc/exports and that the NFS service is actually running with the service nfs status command. You may also want to check your firewall and make sure the appropriate services described in this chapter are running with the rpcinfo -p command.

  7. Remember to make sure that the NFS server starts automatically the next time you boot that computer. One way to do so is with the following command:

    # chkconfig --level 35 nfs on

Now on the NFS client, you'll want to take the following steps to connect to the shared /home directory:

  1. First, you'll want to make sure that you can see the shared /home directory. If your DNS server is not working in any of these commands, you can substitute the IP address of the appropriate computer:

    # showmount -e nfssvr.example.com
  2. Now you'll want to mount the share that is offered on the local /home directory:

    # mount -t nfs nfssvr.example.com:/home /home
  3. Check to see that the mounting has worked. If it did, you'll see the NFS mount in the output to the mount command.

  4. Now look through the mounted /home directory for the special files that you created in step 1. If you find them from the NFS client, you've succeeded in creating and connecting to the /home directory share.

  5. To make the mount permanent, you'll want to add it to your /etc/fstab file. Once you've added a command such as the following to that file, the Linux client automatically mounts the shared /home directory from the NFS server.

    nfssvr.example.com:/home    /home    nfs   soft,timeout=100  0  0 

Lab 3

3. 

You'll also need two Linux computers for this lab: one as a DHCP server, a second as a DHCP client. Using the DHCP server created earlier in this chapter, set up a static IP address for the computer of your choice. You'll want to assign a specific name for that server, precious.example.com, and a special IP address on the 10.11.12.0 network, 10.11.12.13. Assume that you've already set up the example.com network as well as an appropriately configured DNS server.

assuming you ve read the chapter, you ve seen the template in the dhcpd.conf.sample configuration file for a static ip address: host ns {next-server marvin.redhat.comhardware ethernet 12:34:56:78:ab:cd; fixed-address 207.175.42.254; } as described in the chapter, the next-server command is associated with the boot server for this computer; since there is no boot server mentioned, you won t need this command. to set up the dhcp server, take the following steps: a. on the dhcp server computer, open the /etc/dhcpd.conf file. if this file doesn t exist, you haven t yet created a dhcp server on this computer. b. set up a new host in the dhcp configuration file: host precious { c. on the dhcp client, run the ifconfig command to find the hardware address associated with that computer s ethernet network card. for the purpose of this exercise, assume it s ab:cd:ef:12:34:56; the host command line continues as follows: hardware ethernet ab:cd:ef:12:34:56 d. finally, you can complete this line by setting up the static ip address that you want to assign to the dhcp client computer: fixed-address 10.11.12.13} e. save your changes to the /etc/dhcpd.conf configuration file. restart the dhcp server daemon with the following command: # service dhcpd restart f. now proceed to the dhcp client, the precious.example.com computer. you can release any current dhcp client with the following command: # dhclient -r g. finally, you can see if the dhcp client actually takes the static ip address from the dhcp server with the following commands: # dhclient # ipconfig

Answers

3. 

Assuming you've read the chapter, you've seen the template in the dhcpd.conf.sample configuration file for a static IP address:

host ns {      next-server marvin.redhat.com      hardware ethernet 12:34:56:78:AB:CD;       fixed-address 207.175.42.254;   } 

As described in the chapter, the next-server command is associated with the boot server for this computer; since there is no boot server mentioned, you won't need this command. To set up the DHCP server, take the following steps:

  1. On the DHCP server computer, open the /etc/dhcpd.conf file. If this file doesn't exist, you haven't yet created a DHCP server on this computer.

  2. Set up a new host in the DHCP configuration file:

    host precious {
  3. On the DHCP client, run the ifconfig command to find the hardware address associated with that computer's Ethernet network card. For the purpose of this exercise, assume it's AB:CD:EF:12:34:56; the host command line continues as follows:

         hardware ethernet AB:CD:EF:12:34:56
  4. Finally, you can complete this line by setting up the static IP address that you want to assign to the DHCP client computer:

         fixed-address 10.11.12.13    }
  5. Save your changes to the /etc/dhcpd.conf configuration file. Restart the DHCP server daemon with the following command:

    # service dhcpd restart
  6. Now proceed to the DHCP client, the precious.example.com computer. You can release any current DHCP client with the following command:

    # dhclient -r
  7. Finally, you can see if the DHCP client actually takes the static IP address from the DHCP server with the following commands:

    # dhclient # ipconfig 

Lab 4

4. 

Your network has more than 500 hosts with users in three major groups wanting to share their files within their groups. There are also 30 Windows XP clients in the publishing department that cannot use the Linux OS for their proprietary software needs. Everything is time-critical, as the outputs are related to stock quotes and therefore need to be synchronized to the same clock. What should you do?

you need to configure a few services on your central host. nis can be used to manage all the users so that all hosts use the same user ids. then configure a central server with samba and nfs and sufficient disk space for the four groups, restricting each service to members of each group only. use ntp to synchronize the nfs server to an internet time server, if available, and then have all the other hosts synchronize their time to the nfs server host on an hourly basis. as nis is covered in the next chapter , i don t go into additional detail here.

Answers

4. 

You need to configure a few services on your central host. NIS can be used to manage all the users so that all hosts use the same user IDs. Then configure a central server with Samba and NFS and sufficient disk space for the four groups, restricting each service to members of each group only. Use NTP to synchronize the NFS server to an Internet time server, if available, and then have all the other hosts synchronize their time to the NFS server host on an hourly basis. As NIS is covered in the next chapter, I don't go into additional detail here.



 < 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