Tài liệu Learning DebianGNU Linux-Chapter 11. Getting Connected to the Internet docx

32 405 0
Tài liệu Learning DebianGNU Linux-Chapter 11. Getting Connected to the Internet docx

Đ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

11 Getting Connected to the Internet This chapter explains how to use Linux to connect to remote servers First, it explains how to use wvdial, a program that makes it easy to connect to the Internet via a PPP connection provided by an ISP Then, the chapter explains basic TCP/IP network concepts that you must know in order to administer a Linux system connected to the Internet or a local area network So that you can use your knowledge of TCP/IP effectively, the chapter explains how to use pppconfig to configure and administer a system that connects to a local area network and to a remote server via PPP Next, the chapter describes several popular network client applications available under Linux, including a web browser and an FTP client The chapter then describes the use of minicom and seyon, which provide dial-out capabilities like those of Window's hyperterminal Finally, the chapter shows how to make a PPP connection manually, by using minicom 11.1 Connecting to the Internet Most Internet service providers (ISPs) offer two primary types of service: Shell accounts and PPP (point-to-point protocol) accounts Shell accounts were more popular before the advent of the Web A shell account lets you use your computer much as if it were a virtual console associated with a remote computer You can type commands, which are interpreted by the remote computer, and view the resulting output on your computer Although a few web browsers, such as Lynx, can operate via a shell account, they don't generally support the highly graphical, multimedia pages which web surfers have come to expect In contrast, a PPP account connects your computer directly to the Internet While your computer is connected to the Internet, you can use it to surf the Web with your favorite browser If your ISP allows, you can even run a web server, providing pages that can be viewed by others around the world You can compare the two types of Internet accounts - shell and PPP - with two kinds of postal service Imagine that no mail carrier actually comes to your home to pick and deliver mail Instead, every time you want to conduct postal business, you go to the post office This resembles a shell account: The computer that connects you to the Internet is remote, and every time you want to something on the Internet you must open a terminal, or telnet, session to that computer PPP, on the other hand, is like home delivery: The Internet comes right to your doorstep, and your computer is literally placed on the Internet by the machine at your ISP that you connect to Under Microsoft Windows, you use hyperterminal to access a shell account and Dial-Up Networking to access a PPP account Under Linux, you can choose from among several programs that let you access a shell account The most commonly used programs are minicom and seyon To access a PPP account under Linux, you use the PPP daemon, pppd The next section describes how to use wvdial to make the process of establishing a PPP connection simple 11.2 Configuring Your Modem Your modem is a peripheral device to Linux, like a CD-ROM drive, hard drive, or a mouse Your modem will be connected to a serial port, which means that one of the serial devices in the /dev directory actually points to your modem You may notice that there's also a file, /dev/modem, which serves as a placeholder for your modem Initially this file doesn't point to anything To simplify your operations, so that applications like minicomand seyon need only refer to /dev/modem, you can create a symbolic link from the serial device connected to your modem to /dev/modem To so, login as root and issue the command: In X -sf /dev/ttys /dev/modem where X is replaced by the number corresponding to the serial device that points to your modem Table 11.1 shows how the proper command corresponds to the device by which your modem is known user DOS and Linux Table 11.1: Command to Create /dev/modem DOS Modem Device Linux Modem Device Command Table 11.1: Command to Create /dev/modem DOS Modem Linux Modem Device Device COMI ttySO Command 1n -s£ /dev/ttyS0 /dev/modem COM2 ttyS1 1n -s£ /dev/ttyS1 /dev/modem COM3 ttyS2 1n -s£ /dev/ttyS2 /dev/modem COM4 ttyS3 1n -s£ /dev/ttyS3 /dev/modem 11.3 Using wvdial ISPs use a variety of dialogs to make a PPP connection Often the most difficult part of configuring your computer to make a PPP connection is specifying dialog options consistent with those required by your ISP, which may not be especially helpful in explaining the necessary options to you For example, most ISPs use one of three PPP login procedures: PAP (Password Authentication Protocol), CHAP (Challenge-Handshake Authentication Protocol), or ordinary user/password authentication PAP is currently the most popular of the three procedures If you ask the tech Support person at your ISP what login procedure your ISP uses, the tech Support person may have no idea what you're talking about, because most users run Microsoft Windows, and Windows Dial-Up Networking handles the login procedure transparently The wvdial program transparently establishes a PPP connection in much the same way as Windows Dial-Up Networking It understands a variety of possible dialogs used by ISPs In most cases, it will analyze data sent by your ISP and respond with the proper data in the format required by the ISP To use wvdial, be sure that you've established your nameserver configuration, as described in Chapter 10, Setting Up a Linux-Based LAN Then, issue the following commands route wvdial del default & The command generates quite a bit of output, which makes further use of this virtual terminal distracting The simplest solution is to switch to another virtual terminal, by pressing Alt- 7, where n stands for the virtual terminal (1-7) Alternatively, you can direct the output of the command to a file, by typing this command in place of the one given earlier: wvdial 2>/tmp/wvdial.messages & Of course, you'll need to consult the file if something goes wrong with wvdial Do so by using the more command: more /tmp/wvdial.messages Once your connection is up, you can browse the Web and access other Internet services, as described later in this chapter For now, simply verify that your connection is working by issuing the command: ping www.oreilly.com The ping command should report that echo packets were successfully received from the server If not, check your nameserver configuration When you want to log off your ISP, issue the following command: killall wvdial 11.4 PPP Client The Linux PPP client lets your Linux system connect to the Internet via a PPP server, much the same way Dial-Up Networking lets your Microsoft Windows system so Behind the scenes, wvdial calls on the services of the PPP client to connect to a PPP server However, it's possible to use the Linux PPP client directly, without the aid of wvdial Doing so gives you access to the many options provided by PPP, which can prove helpful if your networking needs are too sophisticated to be met by wvdial's simple fireand-forget mechanism Even if you're content with wvdial, you'll benefit from understanding the PPP client For example, you'll find 1t much easier to troubleshoot PPP problems if you understand the functions performed by the PPP client on behalf of wvdial 11.4.1 Specifying PPP Options The Linux PPP client requires several configuration files Rather than build these files manually, you can use pppconfig, a program that leads you through a dialog and then creates the proper configuration files based on your responses Login as root, and issue the command: ppepconfig Figure 11.1 shows pppconfig's main menu, which the program displays whenever you start it Notice that pppconfig lets you create a connection - the term by which it refers to a complete set of configuration parameters - but it does not let you edit an existing connection To change a connection, you must edit the configuration files manually It's usually simpler to forego editing a connection, creating a new connection instead Figure 11.1: The pppconfig main menu This is the PP? | cocfigzatiœn uLiÌitu, [It your ISP: it just configures your system utility such as ‘pon’, You will be asked Phone number that wour ISP gave you, If sll you reed, If you need to use a chat to know know hoe what wou your isp ISP prurets uses, Use the to wove up and doen erroy from the menu to menu to move 0ì tọ the next go morn and for try wour | dose usernees keus to move around (DD to and hit Create Oust sake correction to and pavaAxYd, lÝ wou don't PH Go to Crud not so that wou can connect with for the usernane, pasmord avi your ISP uses PAP or CHAP, that is script to cormmect, you will need es * 1t œ1 b« #4 đưacổ (oder i derdas 790 Wlartals, ex tied ule, voce X‡lxz4v3,< m —— ˆ s9 rty -4Í- p- (601023 %1 k6 ?sdự “été owe / 11.6 gFTP FTP client You can use your web browser to download files from an FTP server, but to upload files you need an FTP client The gFTP client, included on the Linux CD-ROM, is an excellent choice, because its user interface resembles that of popular Microsoft Windows FTP clients, such as WS-FTP Figure 11.18 shows the gFTP client To connect to a remote system, click on Remote +~Connect, identify the system's hostname, specify any necessary userid or password, and click on Connect To upload a file, click on the name of the file in the local list box at the left of the window and then click on + To download a file, click on the name of the file in the list box at the right of the window and then click on When you've transferred all your files, click on Remote +Disconnect Figure 11.18: The gF TP FTP client = gFIP FTP 1.13 (Local Remote Transfers Logging |/outrpm: Local [All Files) freshmeal net [All Files] | | Filename Size > |Fitename | Size 1324 tò _j —) _) PGPKEYS salib see 1,024 1,024 1,024 1,024 _j _J J e-conf enlighteament to 1,324 2.348 1,024 -_-] ginp 1024 ] aterstap _| 00a 1,024 _j a®etrs ~—i apache 1,024 _) gnoma-help- _Ö_j aspe" 1,024 S_| gnoma_0rlvaia _) stare J} gnome-deskiop bro | kde Filename 1,024 1024 1,024 1.024 “| 1/7 | Progress x Help |/home/bmcc erly Tools | sumix | Hostname 1,024 1,024 1.024 |/ + | " f 11.7 Using minicom and seyon Some ISPs provide a choice of a PPP account or a shell account The two most popular Linux programs for accessing a shell account are minicom, a graphical program that runs in a virtual console, and seyon, which runs under X Although seyon has the more modern user interface, most Linux users prefer minicom, which supports more options than does seyon 11.7.1 Using seyon Once you've configured your modem, you're ready to run seyon To so, start X and issue the command: seyon Figure 11.19 shows the main seyon window The top row contains several labels that indicate the status of your modem: DTR Indicates that your computer is ready to send and receive data DSR Indicates that the modem is ready to send and receive data RTS Indicates that your computer has requested to send data CTS Indicates that the modem is ready to receive data RNG Indicates that the modem has detected a ring signal on the telephone line ... on the name of the file in the local list box at the left of the window and then click on + To download a file, click on the name of the file in the list box at the right of the window and then... to install them now? the ac Figure 11.3 shows the screen used to specify the primary nameserver To specify the primary nameserver, type its IP number and press Enter Your ISP should be able to. .. want to conduct postal business, you go to the post office This resembles a shell account: The computer that connects you to the Internet is remote, and every time you want to something on the Internet

Ngày đăng: 14/12/2013, 13:15

Từ khóa liên quan

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

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

Tài liệu liên quan