📄 451-455.html
字号:
<HTML>
<HEAD>
<TITLE>Using Linux:Managing Network Connections</TITLE>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!--ISBN=0789716232//-->
<!--TITLE=Using Linux//-->
<!--AUTHOR=William Ball//-->
<!--PUBLISHER=Macmillan Computer Publishing//-->
<!--IMPRINT=Que//-->
<!--CHAPTER=27//-->
<!--PAGES=451-455//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="447-451.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="455-460.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<P><FONT SIZE="+1"><B><I>Creating a SLIP interface</I></B></FONT></P>
<DL>
<DD><B>1.</B> Launch <TT>netcfg</TT> and click the <B>Interfaces</B> button to view the Interfaces screen (refer to Figure 27.5).
<DD><B>2.</B> Click the <B>Add</B> button to open the Choose Interfaces dialog box (refer to Figure 27.6).
<DD><B>3.</B> Select <B>SLIP</B> and click the <B>OK</B> button. This opens the Create SLIP Interface screen, shown in Figure 27.10.
<P><A NAME="Fig10"></A><A HREF="javascript:displayWindow('images/27-10.jpg',306,170 )"><IMG SRC="images/27-10t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/27-10.jpg',306,170)"><FONT COLOR="#000077"><B>Figure 27.10</B></FONT></A> Create a new SLIP interface using the Create SLIP Interface window.</P>
<DD><B>4.</B> Click the Phone Number field and type the phone number that the modem will dial.
<DD><B>5.</B> Click the SLIP logon name field type the name SLIP should use to log on. This is your username on the machine that is being called.
<DD><B>6.</B> Click the SLIP password field and type the password that SLIP should use for logon. The password is entered as clear text, so make sure that no one who should not know your password is present when you enter it.
<DD><B>7.</B> Click the <B>Done</B> button. The Edit SLIP Interface dialog box, shown in Figure 27.11, appears.
<P><A NAME="Fig11"></A><A HREF="javascript:displayWindow('images/27-11.jpg',310,180 )"><IMG SRC="images/27-11t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/27-11.jpg',310,180)"><FONT COLOR="#000077"><B>Figure 27.11</B></FONT></A> Configure a new SLIP interface using the Edit SLIP Interface window.</P>
<DD><B>8.</B> Set the line speed option to the maximum speed the computer can use to talk to the modem. This value is usually specified in the modems manual. For most modems, the default value (115200) is sufficient.
<DD><B>9.</B> The Modem Port should be set to <TT>/dev/modem</TT>, your modem device. If you have not configured your modem, see the previous section for directions on using <TT>modemtool</TT> to do this.
<DD><B>10.</B> Your SLIP connection is now configured. If you want to customize the SLIP connection’s network properties, click the <B>Networking</B> button. Otherwise, click <B>Done</B> to view the screen shown in Figure 27.12. You can enable the following options in this window:
<DL>
<DD><B>•</B> <I>Activate interface at boot time</I>. If you select this option, it means that when your computer boots up, it will dial your modem and establish a SLIP connection. This is useful if your service provider grants you unlimited connection time.
<DD><B>•</B> <I>Set default route when making connection</I>. If you set this option, all packets requested by your machine for addresses other than the local host will be sent to the SLIP interface. This is useful when SLIP is the main network connection for your machine.
<DD><B>•</B> <I>Restart SLIP when connection fails</I>. This useful option prevents you from having to restart SLIP every time the connection fails.
<DD><B>•</B> <I>MRU</I>. The maximum receive unit is the maximum size in bytes of a packet that can be sent and received by your machine. Allowable sizes range from 296 bytes to 1,500 bytes. The value you set depends on the quality of your phone line. Noisy lines require smaller numbers, and clean lines can use larger numbers.
<DD><B>•</B> <I>Local IP address and Remote IP address</I>. 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.
<DD><B>•</B> Mode (SLIP/CSLIP). This field enables you to change the mode in which SLIP runs: standard (SLIP) or compressed (CSLIP). CSLIP is sometimes slower than SLIP because each packet must be decompressed as it is received. For this reason, many Internet service providers do not have CSLIP set up. Check with your ISP to determine which mode you should use. If in doubt, use the default mode SLIP.
</DL>
<P><A NAME="Fig12"></A><A HREF="javascript:displayWindow('images/27-12.jpg',310,273 )"><IMG SRC="images/27-12t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/27-12.jpg',310,273)"><FONT COLOR="#000077"><B>Figure 27.12</B></FONT></A> Configure a new SLIP interface using the Edit SLIP Interface Networking options window.</P>
<DD><B>11.</B> After you finish setting the Networking options, click <B>Done</B>. Click <B>Yes</B> in the window that asks whether you want to save the configuration; the Edit SLIP window disappears. A new entry, <TT>sl0</TT>, appears in the Interfaces window.
<DD><B>12.</B> To activate the SLIP interface, click the <B>Activate</B> button. You should hear the modem dialing and connecting.
<DD><B>13.</B> After a connection has been established, ping a well-known host to test the connection.
</DL>
<H3><A NAME="Heading8"></A><FONT COLOR="#000077">Adding a PLIP Interface</FONT></H3>
<P>The Parallel Line Internet Protocol (PLIP) is very similar to SLIP because it provides a point-to-point connection between two machines. The difference between the two is that PLIP uses the parallel ports on the computer to provide higher speeds.
</P>
<P><FONT SIZE="+1"><B><I>Configuring a PLIP interface</I></B></FONT></P>
<DL>
<DD><B>1.</B> Launch <TT>netcfg</TT>.
<DD><B>2.</B> Click the <B>Interfaces</B> button in the Network Configurator main window (refer to Figure 27.1).
<DD><B>3.</B> Click the <B>Add</B> button in the Interfaces screen to open the Choose Interface dialog box (refer to Figure 27.6).
<DD><B>4.</B> Select <B>PLIP</B> and click <B>OK</B>. This opens the Edit PLIP Interface dialog box, shown in Figure 27.13.
<P><A NAME="Fig13"></A><A HREF="javascript:displayWindow('images/27-13.jpg',271,214 )"><IMG SRC="images/27-13t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/27-13.jpg',271,214)"><FONT COLOR="#000077"><B>Figure 27.13</B></FONT></A> Configure a new PLIP interface using the Edit PLIP Interface window.</P>
<DD><B>5.</B> Click the IP field and type the local machine’s IP address.
<DD><B>6.</B> Click the Remote IP field and type the remote machine’s IP address.
<DD><B>7.</B> Click the Netmask field and enter the network mask for the local machine’s IP address.
<DD><B>8.</B> If you want the PLIP interface to be active when your machine boots, select the <B>Activate interface at boot time</B> option.
<DD><B>9.</B> Click <B>Done</B>. In the window that asks whether you want to save the current configuration, click <B>Yes</B>.
<DD><B>10.</B> A new entry, <TT>plip0</TT>, should appear in the Interface screen. To activate it, click the <B>Activate</B> button.
<DD><B>11.</B> Test the PLIP interface by pinging the remote machine. For example, if the remote machines IP address is <TT>10.8.11.5</TT>, ping would produce the following output:
<!-- CODE //-->
<PRE>
kanchi 1572$ ping -c 3 10.8.11.5
PING 10.8.11.5 (10.8.11.5): 56 data bytes
64 bytes from 10.8.11.5: icmp_seq=0 ttl=255 time=1.7 ms
64 bytes from 10.8.11.5: icmp_seq=1 ttl=255 time=1.7 ms
64 bytes from 10.8.11.5: icmp_seq=2 ttl=255 time=1.7 ms
--- 10.8.11.5 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet
loss
round-trip min/avg/max = 1.7/1.7/1.7 ms
</PRE>
<!-- END CODE //-->
<BR>If your output looks similar, your PLIP interface is working properly.
</DL>
<H3><A NAME="Heading9"></A><FONT COLOR="#000077">Adding an Ethernet Interface</FONT></H3>
<P>Ethernet is by far the most used type of hardware for local area networks because it is cheap, fast, and reliable. Configuring an ethernet interface is similar to configuring a PLIP interface.
</P><P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="447-451.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="455-460.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -