Beginning Fedora 2

Often, you may have a single machine that you would use for different purposes when connected to different networks. You might use the machine to browse the Internet while connected to an ISP, or use it to connect to work and even perhaps take it to work to use on an intranet. Even though it is the same machine, it tends to have different connectivity requirements at different times because different service providers and possibly different devices are involved.

Connection Profiles

Connection profiles help you manage not just multiple ISPs, but also devices that need to behave differently at different times. For physical devices that require different settings at different times, it is possible to associate multiple logical devices with a single physical device. The logical devices can have a variety of settings, the only restriction being that only one logical device associated with a physical device can be used at a time. A connection profile is a collection of logical devices and their configurations representing certain connection characteristics. Typical connection profiles could be Work, Home, On the road, and so on.

We touched on connection profiles when looking at the Internet Configuration Wizard at the start of this chapter. Open the Network Configuration Tool again, and, at the bottom of the screen, on the Devices tab you ll see Active Profile followed by details on the profile that s currently active. By default, you are provided with a Common profile, which works well for machines that have fixed connection characteristics.

Before getting started with profiles, you need to configure all the physical network device types on the machine. Available network device types are Ethernet, ISDN, Modem, x DSL, Token Ring, CIPE, and Wireless.

The following steps take you through the process of creating and managing profiles. The Try It Out example that follows should clarify the process even further.

  1. Create a new profile by clicking New. A profile is typically associated with a location. Locations have their distinct network configuration requirements. Logical devices describe these network configuration settings. A logical device is just a manifestation of a physical device in a particular profile. For example, if your laptop has a network card, there could be two logical devices based off that network card, perhaps a home network card and a work network card. A profile simply consists of multiple logical devices. However, it is also important to note that a logical device can belong to only one profile at a time.

  2. After the profile is created, you create all the logical devices necessary for the profile. The general rule is that if a particular physical device will be used in the context of the new profile, it needs a logical device for that profile.

  3. After the logical devices for the new profile are created, you need to associate the logical devices with the profile.

  4. You may choose to create more profiles by following Steps 1 through 3, again.

Try It Out Creating Multiple Profiles and Logical Devices

Let s configure connection profiles for a hypothetical Fedora 2 laptop that you use at work to write articles, at home to browse the Web, and while on the road to read e-mail. At work, the laptop is connected to the company s intranet via an Ethernet card. While on the road, you use the laptop s internal modem to dial an ISP and check your e-mail. At home, you use a wireless Ethernet card so you can browse the Web from the living room couch. On occasions when pets monopolize the couch, you re forced to browse over a cable modem connection from the study, thereby using the same Ethernet card you used at work. To manage all these connections, you ll create four profiles: Work, Home, Road, and Couch .

Before you begin, let s get your machine s hardware profile fresh in you mind. It looks like that shown in Figure 3-18 (with what you ve learned so far, you should be able to create this with fictional information if you want to follow along ”you can always delete it when you re done):

Figure 3-18

Create the required profiles using the following steps:

  1. Choose Profile from the drop-down menu, and select New.

  2. Enter Work in the pop-up box that appears (see Figure 3-19).

    Figure 3-19

  3. Now that you have your profile created (look at the bottom of the Network Configuration Tool, and you ll see that it s changed from Common to Work), you need to create a logical device for it based on the physical device eth0 ”the Ethernet card.

  4. Highlight the physical device eth0 and click Copy.

    Caution

    You might be tempted to click the Add button to create a logical device, but this is incorrect. You should use the Copy button after highlighting the physical device in question.

  5. Select the copy, click the Edit button, and specify the nickname eth0_work along with other properties such as the DNS server to be used and the IP address (you can make these up for the purposes of the demonstration). Click OK.

  6. Add the newly created logical device to the Work profile by marking the Profile checkbox on the left side for those logical devices that belong to the profile.

  7. To save your changes, click the Apply button. Remember that a logical device can belong to only one profile. The result is shown in Figure 3-20.

    Figure 3-20

  8. You can use the same routine to create profiles for the Home, Road, and Couch accounts (see Figure 3-21).

    Note

    A particular profile can be activated at any time from the Network Configuration Tool by choosing the profile from the drop-down list.

    Figure 3-21

Starting Connections

So how do you actually connect to a network using each of these devices? Some of them, such as the Ethernet device, remain connected (or activated) as long as they are physically connected to the network. Others, such as a modem, need to be activated when you need them.

Therefore, to connect using a configured connection, at any time, you could go to the Main Menu and choose System Settings>Network, highlight the appropriate connection, and click Activate (see Figure 3-22).

Note

To activate a connection as soon as the machine starts up, highlight the connection and click Edit, and enable the radio button that says Activate device when computer starts.

It s also possible to configure Fedora 2 to automatically establish a modem connection when needed, using a daemon called diald . However, using such a process can make your system considerably less secure than it is at the moment (currently, you have to manually OK any modem network connections). We d advise that you read on a little further through the book and familiarize yourself with the command shell and security issues before deciding if diald is right for you. If you decide to proceed, allthe configuration information you need can be found at www.linux.org/docs/ldp/howto/Diald-HOWTO.html .

Figure 3-22

Категории