Red Hat Linux 7.2 Bible, Unlimited ed phần 10 pot

92 295 0
Red Hat Linux 7.2 Bible, Unlimited ed phần 10 pot

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Troubleshooting a Wireless LAN If you set up your two (or more) wireless LAN cards for Red Hat Linux systems to communicate together and they are not communicating, you can troubleshoot the problem in several different ways. Check wireless settings You can use the iwlist and iwconfig commands to check your wireless settings. The iwconfig command can give you a quick overview of your wireless settings, while the iwlist command shows you information about specific parameters you are interested in. Use the iwconfig command, along with the name of the wireless LAN interface, to see information about that interface. For example, if the wireless interface were eth0, you could type the following: # iwconfig eth0 eth0 IEEE 802.11−DS ESSID:"Homelan" Nickname:"pine" Mode:Ad−Hoc Frequency:2.412GHz Cell: 02:02:2D:2D:3B:30 Bit Rate=11Mb/s Tx−Power=15 dBm Sensitivity:1/3 RTS thr:off Fragment thr:off Encryption key:7365−6375−31 Power Management:off Link Quality:0/92 Signal level:−102 dBm Noise level:−102 dBm Rx invalid nwid:0 invalid crypt:0 invalid misc:0 With iwconfig, you can see details about the wireless aspects of the Ethernet interface. In this example, the network name (ESSID) is Homelan and the station name (Nickname) is pine. The interface is operating in Ad−Hoc mode on channel 1 (frequency of 2.412GHz). Transmission rates are at the maximum speed of 11 Mbps. The encryption key that must be used by every node the card connects with is 7365−6375−31. Other settings describe the link and signal quality. The iwlist command lets you request specific information about the wireless LAN interface. The syntax is to follow the iwlist command with the interface name and the information you are interested in. For example: # iwlist eth0 freq eth 0 14 channels in total; available frequencies : Channel 01 : 2.412 GHz Channel 02 : 2.417 GHz Channel 03 : 2.422 GHz Channel 04 : 2.427 GHz Channel 05 : 2.432 GHz Channel 06 : 2.437 GHz Channel 07 : 2.442 GHz Channel 08 : 2.447 GHz Channel 09 : 2.452 GHz Channel 10 : 2.457 GHz Channel 11 : 2.462 GHz The freq parameter displays the available frequencies (and channels) available for communication. Note that all the available frequencies are in the 2.4 GHz range. # iwlist eth0 rate eth0 4 available bit−rates : 1 Mb/s 2 Mb/s 5.5 Mb/s 11 Mb/s The rate parameter shown above lets you display the transmission rates available for the wireless interface. As shown above, the 1, 2, 5.5, and 11 Mbps rates are all available for the current interface. # iwlist eth0 keys eth0 2 key sizes : 40, 104bits 4 keys available : [1] 7365−6375−31 (40 bits) [2] off [3] off [4] off Current Transmit Key: [1] The keys parameter lets you see the encryption keys that are available with the interface. It also shows the current key sizes that are available. Because the card reflected in the example above supports 64− and 128−bit encryption, the key sizes available are 40 and 104 bits. (The encryption algorithm automatically generates the last 24 bits of each key.) If you are troubleshooting your wireless LAN connection, some settings are more likely than others to be causing problems. It is important to set the following wireless LAN settings properly — if you don’t, they may keep your network from working: • Network ID (ESSID) — You may not be able to communicate among peer computers if the Network ID (ESSID) doesn't match on each of them. Case is important — for example, Mylan will not match MyLAN. • Encryption key — Having encryption keys that don't match is like trying to log in to Linux without a password. Check that all nodes are using the same key. • Mode — If you are communicating through an access point, your mode should be set to Managed and you must provide the MAC address for that access point. In most single cell networks, you should set all nodes to Ad hoc. The Ad hoc mode allows all nodes to communicate directly to each other as peers. • Channel or Frequency — The channel and frequency options are just two different ways of setting the same value. For example, setting the channel to 1 is the same as setting the frequency to2.412G (GHz). Make sure that the nodes on your network are able to communicate on the same frequency. Check TCP/IP To check that your wireless LAN is communicating with its peers, use the ping command (as described earlier in this chapter). If you believe that your cards are working properly, but the ping command continues to give you a "Network Unreachable" message, there may be a problem with your TCP/IP configuration. Here are some items you can check from the Network Configuration window: • IP address — Check that you know the correct IP address of the peer you are trying to reach. • Host name — If you are pinging the peer computer by name, make sure that your computer can properly resolve that name into the correct IP address or have the peer's host name and IP address properly listed in the /etc/hosts file locally. The former probably requires that you have one or more DNS servers identified to resolve the name. If you are able to reach another wireless computer on the wireless LAN, but are not able to reach computers outside of that LAN (such as an Internet address), check that you have properly identified the location of your gateway. If the gateway address is correct, and you can reach that gateway, the problem may be that the gateway itself is not configured to allow packet forwarding. If you find that any of the above information above was wrong and you corrected it, you should restart the wireless LAN interface. One way to do that is to restart the PCMCIA interface as follows: # /etc/init.d/pcmcia restart Adapt to poor reception Your wireless LAN might be working fine while your two wireless computers are sitting on the same desk. However, if performance degrades when you separate the computers, you may need to determine if there are obstacles in the way and, if so, how to get around them. For desktop systems, a small indoor antenna can bring the signal out from under a desk or out of a closet. For adjacent buildings, a roof antenna might be the answer. In cities or other congested areas, many people and pieces of equipment can be competing for the 2.4 GHz range. You may want to move a microwave oven or certain high−end remote phones that are interfering with your wireless LAN. Here are a few ways you can adapt to poor reception: • Reduce transmission rate — Instead of using 11 Mbps, you can explicitly ramp down to 5.5, 2, or 1 Mbps. Slower rates of speed can operate more efficiently in noisy environments. • Smaller frame sizes — Though there is more total overhead to transmitting smaller frames, small frames can often provide better overall performance. Failures during transmissions of large frames cause smaller hits than when small frames fail. • Different frequencies — You can specifically request that certain frequencies (or channels) be used for transmission. You can try to use this technique to avoid congested channels. Use debugging tools Because Orinoco cards and most other wireless LAN cards were created for Windows systems, some of the better debugging tools are available only on those systems. If your computer is a dual−boot system (Windows and Linux), you can try booting in Windows to test the quality of your wireless network. For Orinoco cards in particular, you should run the Client Manager to view information about the quality of your wireless links. In Red Hat Linux, you can use many of the tools you use for wired Ethernet networks and other TCP/IP network interfaces. Here are a couple of examples: • Ethereal — The Ethereal window (type ethereal as root user from a Terminal window) lets you watch Ethernet frames as they are sent and received by your wireless LAN interface. For example, the output of Ethereal can tell you whether a failed connection reflects a lack of reception or rejected requests. • /var/log/messages — When the wireless LAN interface starts up, messages related to that start−up are sent to the /var/log/messages file. In some cases, these messages will reflect improper options being set for the wireless LAN module. Summary A wireless LAN can offer an effective way of extending your network to areas that are difficult or expensive to reach with wired connections. Using low−cost wireless LAN cards, you can create peer−to−peer or point−to−point networks. Add Red Hat Linux systems as one or more of your wireless nodes and you can use powerful security, routing, and monitoring tools to further expand and secure your network. You can control your wireless LAN card in Red Hat Linux by passing options to the card's module at start−up time. Once the interface is running, you can use the iwconfig command to change wireless settings, either from the command line or by adding iwconfig options to a configuration file so they are loaded automatically. Chapter 26: Getting Red Hat Linux “up2date” Fixes and improvements continue to arise well after a distribution, such as Red Hat Linux 7.2, is released. You can incorporate those fixes and features into your version of Red Hat Linux by using a connection to the Internet and one of several tools for grabbing updated Red Hat software. The tool that Red Hat prefers for keeping its software up to date is called up2date. This chapter helps you to determine what updates are available for your Red Hat Linux system, and it describes how you can register to use the Red Hat Network and use the up2date tool to gather those updates. Checking for Updates How do you know when you need to upgrade the kernel or software packages that make up Red Hat Linux? One way to keep abreast of changes is to visit the Red Hat Errata page. (Red Hat errata information is also available from the Red Hat Network, which is described later in this chapter.) You can also check for updates to individual projects whose software is included in Red Hat Linux. Red Hat Errata page Red Hat gathers together information you need to upgrade your system on the Red Hat Errata page (http://www.redhat.com/errata). As the page proclaims, this is your way of finding “Security Alerts, Bug Fixes, and Enhancements” for Red Hat Linux. Select the link to the current release (Red Hat Linux 7.2). The list of advisories that appears contains the package name, a synopsis of the problem addressed by the corrected package, and the date the update was released. Many of the advisories are aimed at plugging potential security holes. In particular, these advisories often include package fixes that address vulnerabilities in network services or mishandled permissions. Click on a package name in the list to get a detailed description of the package update, as well as links to where you can download the updated package. Going directly to the Red Hat Errata page is probably the best way to check on vulnerabilities and bugs relating to your version of Red Hat Linux. You can either download and install each new package individually or use the up2date application (described later in this chapter) to install multiple updates at once. Project Web sites Most open−source projects have Web sites that are used to track software development, post news, and answer questions about a project. In some cases, critical bugs or security issues may be posted at a project’s Web site before Red Hat hears of it. If you’re operating a public server on the Internet, you might be particularly interested in keeping up on potential problems relating to the network services you are running. For example, if you are using wu−ftpd as your FTP server software, you can refer to the WU−FTPD Development Group site (http://www.wu−ftpd.org). Recent news items are posted on that site — news regarding security issues might be particularly useful to you. You can also subscribe to wu−ftpd mailing lists from this site. If you don’t want to be flooded with email, you might simply want to subscribe to the wuftpd−announce list to get occasional announcements about security problems. The following are other project sites that you might want to check for problems and issues that arise: • Apache Software Foundation (http://www.apache.org) ( Get updates about Apache Web server issues. • Samba.org (http://www.samba.org) ( Find information relating to Windows file− and print−sharing issues (SMB). • Netfilter (Iptables) Firewall (http://www.netfilter.org) ( Find out the latest issues relating to iptables and related firewall tools. However, be forewarned that taking the source code and trying to build and install it directly from the project site will probably result in files going to the wrong places and RPMs getting out of sync. In most cases, you will want to get any updates for Red Hat Linux right from Red Hat, as it does a good job of getting critical fixes out in a timely manner. The following sections describe how to get your updates directly from Red Hat. Getting Updates from Red Hat Network Red Hat has created a system that automatically notifies you of available updates and lets you easily download and install them on your Red Hat Linux system. The service is called Red Hat Network. Registering with the Red Hat Network allows you to run the up2date program from your Red Hat Linux computer whenever you are ready to do the updates. Red Hat Network provides a mechanism that can: • Alert you to the latest fixes and enhancements available for Red Hat Linux • Install the packages that include those changes to your system There is a lot of information available about the Red Hat Network from its Web page (http://rhn.redhat.com). This section provides an overview of how that service works and guides you through the registration process. If you don’t mind giving out your e−mail address, street address, and phone number, there are some pretty good reasons for creating a Red Hat Network account for yourself. With a free Red Hat Network account, you can register your Red Hat Linux system and create system profiles. Registering your first machine also entitles you to receive all updates for that machine. To get more services (or entitle more machines), you can purchase a subscription to the Red Hat Network. Note Because the Red Hat Network is fairly new and constantly evolving, it is possible that many of the features and entitlements described in this section will change. Check the Red Hat Network site (http://rhn.redhat.com/) for information on new features if the procedures in this section seem to have changed. Running rhn_register To register your system with Red Hat Network, you can use the rhn_register command. Using rhn_register requires a connection to the Internet and root access to your computer. The latter is because the registration program needs to access your computer’s RPM database. Though only the first computer you register can receive free automatic updates, you can register as many computers as you want with this tool (for additional fees). Here is how it works. 1. Open a Terminal window as root user. 2. Type rhn_register. A Network Settings window appears, allowing you to add a proxy server setting in case you need to go through a proxy server to reach the Internet. 3. Enter the proxy information (only if required) and click OK. The “Red Hat Registration” window appears. (If no GUI is present, the procedure runs in text mode instead.) 4. Read the explanation of the registration procedure and click Next. The Red Hat Privacy Statement appears. This statement includes how your personal information is used and how Red Hat uses cookies to track activities. 5. Read the Privacy Statement and, if it is acceptable, click Next to continue. The Register or Update “User Account” window appears. 6. Add information to create a user account. This includes: ♦ User name —Type in a name that you choose. ♦ Password —Type a password (then type it again in the next box to verify it). ♦ E−mail address — Type the address at which you would like Red Hat to contact you. ♦ Organization ID —If you are registering as part of an existing organization, type the organization ID. ♦ Organization password — If you entered an Organization ID, type the password associated with that ID. ♦ Click Next to continue. The “Register a User Account” window appears. 7. Add whatever optional information you feel comfortable sharing [including name, address, phone number, fax number, and information about how you would like to be contacted (e−mail, regular mail, phone, fax, or e−newsletter)] and click Next to continue. A “Register a System Profile – Hardware” window appears. This includes information about your Red Hat Linux version, hostname, IP address, CPU mode, CPU speed, and memory. 8. Select a profile name (the hostname is used by default) or Service ID number (which can be the computer’s serial number) and click Next to continue. The registration process begins building a list of packages installed on your computer. These are gathered so they can become part of your system profile. These packages are then displayed in the “Register a System Profile — Packages” window. 9. Check that the packages that appear in the window are all OK to include in your system profile (and deselect the ones you don’t want to included) and click Next to continue. The “Send Profile Information to Red Hat Network” window appears. 10. Click Next to have the system profile information registered with the Red Hat Network. (You can also choose to not send the information by clicking Cancel.) Your information is sent and the Registration Finished window appears. 11. Click on Finish to end the session. After you have finished registering with the Red Hat Network, you can go to the Red Hat Network site and log in to use the service. You are also ready now to run the up2date command to update your software packages. Running up2date After you have registered your computer with the Red Hat Network, you can use the up2date command to find and install updates. As with rhn_register, you need root access to your computer to run up2date. This is because up2date needs permission to change configuration files and install packages. The up2date configuration file (/etc/sysconfig/rhn/up2date) determines the behavior of up2date. In order to help you understand what up2date will do when you launch it, here are a few of the key settings in the up2date configuration file: • Debugging is disabled by default. Change debug=0 to debug=1 to turn on debugging if you are having trouble with up2date. • Downloaded packages are stored in the /var/spool/up2date directory. Once they are installed, the packages are deleted. • The up2date log file is /var/log/up2date. You can open the file in any text editor to see descriptions of everything up2date did. • Any packages that begin with the word “kernel” are skipped. Add other package names you want skipped to the pkgSkipList=kernel* entry, separating package names with commas. You can use shell wildcard characters, such as the asterisk shown in the example, to match all kernel packages. There are other settings in the up2date configuration file you can use to further refine your up2date session. For example, you can identify an HTTP proxy server, change the number of failed network connection attempts before exiting, or set to retrieve source packages along with the binary packages. If you would rather change the configuration file from the desktop GUI, run the up2date−config command (you need root permission). In most cases, the default up2date settings will work well. The following is an example of an up2date session. Note You need version 2.5.4 or higher of up2date in order to upgrade kernel packages using up2date. If you are using Red Hat Linux 7.2, you should already have a version above 2.5.4. If you decide you want to upgrade kernel packages, remember to comment out the removeSkipList=kernel* line so that kernel packages can be upgraded. After it’s installed, the new kernel will be booted by default. If the kernel upgrade doesn’t work, your GRUB or LILO prompt will allow you to select the old kernel to boot from. 1. Open a Terminal window as root user. 2. Type up2date. If your system does not yet have the Red Hat public key, you will be asked if you want to have up2date install the key. (The key is needed to verify that the packages you are receiving are signed by Red Hat. You may need to restart up2date after you add the key.) 3. Click Yes to install the key. The “Channels” window appears. 4. Select the version of Red Hat Linux that is currently installed, to indicate the update channel to use, and click Next. The “Red Hat Update Agent” window appears. 5. Click Next to continue. The update agent begins checking your available packages. The “Packages Flagged to be Skipped” window appears. By default, kernel packages are always set to be skipped. This is because updating the kernel requires some special action and has some risks. To override any of these packages, you need to click on the checkbox next to the package you want to update. To find out more about advisories associated with recommended updates on any of these packages, click on the package and click View Advisory. Each advisory related to the package is displayed in a separate window. 6. If the skipped package list is acceptable to you, click Next to continue. The “Available Package Updates” window appears, displaying packages that are installed on your system for which updates are available. Figure 26−1 shows an example of the “Available Package Updates” window. Figure 26−1: Select packages you want Red Hat Network to update. 7. Click each package you want to update or click Select All Packages to have all available packages updated. As with the skipped packages, you can click on a package, then click on View Advisory to see which advisories are addressed by updates for the package. 8. Click Next to continue. The update agent begins testing packages to check for dependencies among the packages you are updating. If any dependencies arise from the packages you selected, the “Packages Required to Solve Dependencies” window appears. 9. Click Next to have the packages that are shown included in the updates (or click Back to change your package list). The “Retrieving Packages” window appears and notes the progress as the packages are downloaded from the Red Hat Network. 10. Click Next to begin downloading the packages to your computer. (This may take a while, depending on the speed of your Internet connection and the number of packages you are downloading.) 11. When all packages are downloaded, click Next to continue. (If you are not prompted to install packages at this point, you may need to run up2date−config to change the default settings.) The “Installing Packages” window appears. 12. Click Next to begin installing the packages you have downloaded. 13. When all the packages are installed, click Next to continue. The “All Finished” window appears, displaying the package names and versions for each package that was installed. 14. Click Finish to end the session. If you are interested in seeing how the upgrades went, you can do the following: • Check the log file (/var/log/up2date). • See if any packages were left behind in the spool directory (/var/spool/up2date). Though you don’t necessarily have to reboot Linux at this point, if there are new daemon processes installed with any of the updated packages you might want to restart them. For example, to restart your Web server (httpd daemon), you could type the following as root user: # /etc/init.d/httpd restart [...]... change the behavior of Red Hat Linux Changing this source code requires some knowledge of programming and software compilation tools Appendix B: Red Hat Linux RPMs More than 1,200 Red Hat Package Manager (RPM) software packages are delivered with Red Hat Linux 7.2 Many of these packages are added to your computer automatically when you first install Red Hat Linux Others can be added later, using one... applications that are backward compatible with Red Hat 5.2 • compat−egcs−objc: Contains an Objective C compiler that can create backward compatible Red Hat 5.2 programs • compat−glibc: Contains a version of the GNU C library that can compile binaries to run in Red Hat 5.2 • compat−libs: Contains run−time libraries that allow you to do development for earlier Red Hat Linux systems (such as Red Hat Linux 6.2)... that were once included with the Red Hat Linux PowerTools CD Red Hat, Inc., no longer maintains PowerTools Note All CD−ROM files are read−only The CD−ROM is intended primarily for users to install the binary Red Hat Linux software However, a CD−ROM containing source code for the Red Hat Linux distribution is also available by using a mail−in coupon that’s on the CDs Advanced users can modify this source... Hat Linux 7.2 Installation CDs and one Documentation CD To install Red Hat Linux 7.2: • Follow the instructions contained in Chapter 2 and on the CD−ROM Installation page in the back of this book • Refer to Appendix B for a complete list of the Red Hat software packages If for some reason you don't have your CDs handy, you can download any of these packages from a Red Hat Linux mirror site (see www.redhat.com/download/mirror.html)...Using the Red Hat Network Once you have an account with Red Hat Network, you can log in to the Red Hat Network site and take advantage of the services it offers As noted earlier, each registered user is “entitled” to register one computer to receive automatic updates Other services that you receive by simply registering with the Red Hat Network Web site include: • Viewing... glibc: Contains standard libraries that are used by many programs in Red Hat Linux • glibc−common: Contains common binary programs used with C language development in Red Hat Linux • glibc−devel: Contains the standard header and object files needed to develop most C language programs • glibc−profile: Contains the libraries that are needed to create programs being profiled with gprof • glms: Contains tools... listing and descriptions of the Red Hat Linux 7.2 software packages The descriptions in this appendix will help you determine the contents of those packages Note Red Hat Linux software packages are contained on the first two CDs packaged with this book (CD−1 and CD−2) The third CD contains FAQs, HOW−TOs, and Red Hat specific manuals (Installation, Configuration, Getting Started, and Reference guides) Package... entitlement listed to let you do automatic updates Summary The chore of keeping your Red Hat Linux system upgraded with the latest bug fixes, security patches, and enhancements has been simplified greatly with Red Hat s up2date tool Using up2date, you can automatically check for updates, download updated packages to your computer, and install them By registering your system with the Red Hat Network, you... www.redhat.com/download/mirror.html) The RPMfind.net is an excellent resource for finding additional software packages for Red Hat Linux I also recommend that you consider installing software packages that are available from the Red Hat Linux ContribNet site (http://rhcontrib.bero.org/) RPMfind.net and ContribNet locations can help you find extra, useful software packages that were once included with... each Red Hat Linux version, which takes the guess work out of compatibility issues • E−mail alerts of errata and notification of new packages available to fix problems • An entitlement manager that lets you see which systems you are entitled to manage through Red Hat Network and add more systems • A feature for scheduling actions, such as automatically updating packages at a specified time Go to the Red . 2. 4 27 GHz Channel 05 : 2. 4 32 GHz Channel 06 : 2. 4 37 GHz Channel 07 : 2. 4 42 GHz Channel 08 : 2. 4 47 GHz Channel 09 : 2. 4 52 GHz Channel 10 : 2. 4 57 GHz Channel 11 : 2. 4 62 GHz The freq parameter. the Red Hat Network, which is described later in this chapter.) You can also check for updates to individual projects whose software is included in Red Hat Linux. Red Hat Errata page Red Hat. service is called Red Hat Network. Registering with the Red Hat Network allows you to run the up2date program from your Red Hat Linux computer whenever you are ready to do the updates. Red Hat Network

Ngày đăng: 14/08/2014, 06:22

Từ khóa liên quan

Mục lục

  • Chapter 25: Building a Wireless Linux LAN

    • Troubleshooting a Wireless LAN

      • Check wireless settings

      • Check TCP/IP

      • Adapt to poor reception

      • Use debugging tools

      • Summary

      • Chapter 26: Getting Red Hat Linux fiup2datefl

        • Checking for Updates

          • Red Hat Errata page

          • Project Web sites

          • Getting Updates from Red Hat Network

            • Running rhn_register

            • Running up2date

            • Using the Red Hat Network

            • Summary

            • Appendix A: What™s on the CD-ROMs?

            • Appendix B: Red Hat Linux RPMs

              • Package Categories

              • The Packages

              • Appendix C: Running Network Services

                • Checklist to Running Networking Services

                • Networking Service Daemons

                  • The xinetd super-server

                  • The init.d start-up scripts

                  • Referencing Network Services

                    • Web server

                    • File servers

                    • Login servers

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan