Using Linux:Managing Network Connections
-->
Previous
Table of Contents
Next
Configuring PPP on a Linux machine
1. The first step is to use the modemtool program to create the modem device in the /dev directory. To launch modemtool, type the following (as root) from the command line:
# modemtool
2. This opens the window shown in Figure 27.4. Click the COM port to which the modem is connected and then click the OK button to create the appropriate /dev/modem file.
Figure 27.4 Use the modemtool to configure your modem.
3. Launch netcfg and click the Interfaces button. Youll see the screen shown in Figure 27.5.
Figure 27.5 The Interfaces window in netcfg contains a list of configured interfaces.
4. Click the Add button to open the Choose window (see Figure 27.6).
Figure 27.6 Select the PPP interface in the Chose Interface Type window.
5. Select PPP and click OK. This opens the Create PPP Interface, shown in Figure 27.7.
Figure 27.7 Create a new PPP interface using the Create PPP Interface window.
6. Click the Phone Number field and type the phone number that the modem will dial.
7. Click the PPP logon name field and type the name that PPP should use to log on. This is your user name on the machine that is being called.
8. Click the PPP password field and type the password that PPP should use for the logon you gave. Because the password is entered as clear text, make sure that no one who should not know your password is present when you enter it.
9. Click the Customize button to open the Edit PPP Interface dialog box, shown in Figure 27.8.
Figure 27.8 Configure the PPP interface using the Edit PPP Interface window.
10. Select the Use hardware flow control and modem lines option and use the Abort connection on well-known errors option.
11. Set the value in the Line speed to the maximum speed which the computer can communicate with the modem. For most modems, this will be the default value (115200). If a different value for the line speed is given in your modems manual, use that value for optimal performance.
12. Make sure the default modem port is configured to /dev/modem.
13. Your PPP interface is now configured. If you want a more advanced configuration, click the Networking button. Otherwise, click Done.
14. If you click the Networking button, youll see the Edit PPP Interface dialog box, shown in Figure 27.9. In this window, you can set the following parameters:
Activate interface at boot time. This means that when your computer boots up, it will dial your modem and establish a PPP link. This is useful if your service provider grants you unlimited connection time.
Set default route when making connection. This means that all packets requested by your machine for addresses other than the local host will be sent to the PPP interface. This is useful when PPP is the main network connection for your machine.
Restart PPP when connection fails. This useful option prevents you from having to restart PPP every time the connection fails.
MRU. The maximum receive unit is the maximum size in bytes of a packet that can be sent and received by your machine. The allowable range is 296 bytes to 1,500 bytes. The value you enter depends on the quality of your phone line. Noisy lines require smaller numbers, and clean lines can use larger numbers.
Local IP address and Remote IP address. These options are useful only for machines with static IP addresses. If you have a static IP address, these values will be provided to you by your company or service provider.
Figure 27.9 Set the appropriate PPP options using the Networking options window.
15. After these configuration options are entered, click the Done button. In the dialog box that asks whether you want to save the configuration, click Yes. The Edit PPP Interface dialog box disappears, and a new entry (PPP0) is added to the Interfaces screen (refer to Figure 27.5). Click on the Save button in the Interfaces screen to save the changes.
After your PPP interface is configured, youll want to test it to make sure it works the way you want.
Testing the PPP interface
1. Click the Activate button in the Interfaces screen. You should hear your modem dialing and connecting to your service provider.
2. After the connection is established, ping a well-known host (for example, try pinging 192.31.7.130, which is www.cisco.com):
kanchi 1555$ ping -c 3 192.31.7.130
PING 192.31.7.130 (192.31.7.130): 56 data bytes
64 bytes from 192.31.7.130: icmp_seq=0 ttl=248
time=38.5 ms
64 bytes from 192.31.7.130: icmp_seq=1 ttl=249
time=32.5 ms
64 bytes from 192.31.7.130: icmp_seq=2 ttl=249
time=30.7 ms
--- 192.31.7.130 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet
loss
round-trip min/avg/max = 30.7/33.9/38.5 ms
If your output is similar to this, your connection is working correctly.
To easily activate and deactivate a PPP interface, bash and ksh users can add the following aliases to their profile:
alias activate-ppp=î/etc/sysconfig/network-scripts/ifup-PPPî
alias deactivate-ppp=î/etc/sysconfig/network-scripts/ifdown-
PPPî
Users of csh and tcsh can add the following aliases to their .cshrc, to easily activate and deactivate the PPP interface:
alias activate-ppp î/etc/sysconfig/network-scripts/ifup-PPPî
alias deactivate-ppp î/etc/sysconfig/network-scripts/ifdown-
PPPî
Activating and deactivating an interface
If the netcfg Interfaces window shows an interface as inactive, the window can be made active by clicking on the Activate button. Activating an interface is referred to as bringing up an interface.
Similarly, if the Interfaces window shows an interface as active, the interface can be made inactive by clicking the Deactivate button in the Interfaces screen. Deactivating an interface is referred to as bringing an interface down.
Adding a SLIP Interface
The Serial Line Internet Protocol (SLIP) is another way of connecting two computers using IP. Setting up a SLIP interface is similar to setting up a PPP interface.
Previous
Table of Contents
Next
Wyszukiwarka
Podobne podstrony:
447 450447 449Fahrenheit 451 (1966 Francois Truffaut)(03) 447 09 Reinhard Prigge kom pras01 (447)SP?447451 sprawozdaniewięcej podobnych podstron