⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 399-400.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:
<HTML>

<HEAD>

<TITLE>Linux Configuration and Installation:Linux Networking</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=1558285660//-->

<!--TITLE=Linux Configuration and Installation//-->

<!--AUTHOR=Patrick Volkerding//-->

<!--AUTHOR=Kevin Reichard//-->

<!--AUTHOR=Eric Foster//-->

<!--PUBLISHER=IDG Books Worldwide, Inc.//-->

<!--IMPRINT=M & T Books//-->

<!--CHAPTER=8//-->

<!--PAGES=399-400//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="395-399.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="../ch09/401-404.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

<H4 ALIGN="LEFT"><A NAME="Heading4"></A><FONT COLOR="#000077">Setting up TCP/IP Information</FONT></H4>

<P>The files that control TCP/IP configuration are stored in the <B>/etc</B> directory. When you first set up Linux and are asked about machine names and domain names, this information is sent to the <B>/etc/hosts</B> file. While you don&#146;t need to mess with this file if you&#146;re connected to the Internet (it does many of the same things that a Domain Name Server does), it&#146;s a good thing to place the names of essential servers in this file. And if you&#146;re not connected to the Internet but you are maintaining a small network, this is the place to store the IP addresses for the workstations on your system. (Again, this could be done via a DNS on your local system, but it&#146;s a lot easier to use the <B>/etc/hosts</B> file.)</P>

<P>Another file to check is the <B>/etc/networks</B> file, used to configured different networks in the TCP/IP subsystem. This file is summoned when the system launches, and its functions are handled by DNS servers if you&#146;re working on the Internet. Again, if you&#146;re not connected to the Internet but you want to have subnetworks and such (you really don&#146;t; we&#146;re speaking hypothetically here if you&#146;re working on a small network), you&#146;d use this file instead of a DNS.</P>

<BLOCKQUOTE>

<P><FONT SIZE="-1"><HR><B>NOTE:&nbsp;&nbsp;</B>If you have an ethernet card, you can configure it using the &#147;netconfig&#148; command. You might also need to edit /etc/rc.d/rc.modules to load support for your card.<HR></FONT>

</BLOCKQUOTE>

<P>You&#146;ll also want to run the <B>ifconfig</B> command, which essentially tells the kernel about your Ethernet card and the IP addresses if you&#146;ve not done so already. To see the current state of your system, use the command with no options:</P>

<!-- CODE SNIP //-->

<PRE>

gilbert:/$ ifconfig

lo    Link encap:Local Loopback

      inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0

      UP BROADCAST LOOPBACK RUNNING  MTU:2000  Metric:1

      RX packets:0 errors:0 dropped:0 overrun:0

      TX packets:40 errors:0 dropped:0 overruns:0

</PRE>

<!-- END CODE SNIP //-->

<P>In this case, we&#146;re actually using Linux without a network card or a connection to a network&#151;but Linux thinks it&#146;s on a network using a tool called <I>loopback</I>. Loopback allows applications and daemons that need to communicate via TCP/IP to connect to local resources.</P>

<H3><A NAME="Heading5"></A><FONT COLOR="#000077">Summary</FONT></H3>

<P>Linux networking is an involved subject and one beyond the goals of this book. You&#146;ll want to check out some of the reference works in Appendix A for more information.

</P><P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="395-399.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="../ch09/401-404.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 + -