~ubuntu-branches/ubuntu/feisty/kubuntu-docs/feisty

« back to all changes in this revision

Viewing changes to kubuntu/build/kubuntu/serverguide/C/tcpip.html

  • Committer: Bazaar Package Importer
  • Author(s): Matthew East, Jonathan Riddell, Matthew East
  • Date: 2006-05-21 21:32:00 UTC
  • Revision ID: james.westby@ubuntu.com-20060521213200-1i156mdu9sd9wuxz
Tags: 6.06-10
[ Jonathan Riddell ]
* Add links in each langauge to en/common, makes html files work when 
  viewed without help:/ ioslave

[ Matthew East ]
* Updated translations for everything (last update before the release)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
 
<html xmlns="http://www.w3.org/1999/xhtml">
4
 
  <head>
5
 
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
 
    <title>TCP/IP</title>
7
 
    <link rel="stylesheet" href="../../common/kde-default.css" type="text/css" />
8
 
    <link rel="stylesheet" href="../../common/kubuntu-default.css" type="text/css" />
9
 
    <meta name="generator" content="DocBook XSL Stylesheets V1.68.1" />
10
 
    <link rel="start" href="index.html" title="Ubuntu Server Guide" />
11
 
    <link rel="up" href="networking.html" title="Chapter 4. Networking" />
12
 
    <link rel="prev" href="network-configuration.html" title="Network Configuration" />
13
 
    <link rel="next" href="firewall-configuration.html" title="Firewall Configuration" />
14
 
  </head>
15
 
  <body>
16
 
    <div xmlns="" style="background-image: url(../../common/top-middle.png); width: 100%; height: 131px;">
17
 
      <div style="position: absolute;                      right: 0px;">
18
 
        <img src="../../common/top-right-konqueror.png" style="margin: 0px" alt="" />
19
 
      </div>
20
 
      <div style="position: absolute; left: 0px;">
21
 
        <img src="../../common/top-left.png" style="margin: 0px" alt="" />
22
 
      </div>
23
 
      <div style="position: absolute;                         top: 25px;                          right: 100px;                          text-align: right;                          font-size: xx-large;                          font-weight: bold;                          text-shadow: #fff 0px 0px 5px;                          color: #444">TCP/IP</div>
24
 
    </div>
25
 
    <div xmlns="" style="margin-top: 20px; background-color: #white;                        color: black;                       margin-left: 20px;                        margin-right: 20px;">
26
 
      <div style="position: absolute;                          left: 20px;">
27
 
        <a accesskey="p" href="network-configuration.html">Prev</a>
28
 
      </div>
29
 
      <div style="position: absolute;                          right: 20px;">
30
 
        <a accesskey="n" href="firewall-configuration.html">Next</a>
31
 
      </div>
32
 
      <div class="navCenter">Networking</div>
33
 
    </div>
34
 
    <div class="sect1" lang="C" xml:lang="C">
35
 
      <div class="titlepage">
36
 
        <div>
37
 
          <div>
38
 
            <h2 class="title" style="clear: both"><a id="tcpip"></a>TCP/IP</h2>
39
 
          </div>
40
 
        </div>
41
 
      </div>
42
 
      <p>
43
 
            The Transmission Control Protocol and Internet Protocol (TCP/IP) is a standard 
44
 
                        set of protocols developed in the late 1970s by the Defense Advanced Research 
45
 
                        Projects Agency (DARPA) as a means of communication between different types of 
46
 
                        computers and computer networks. TCP/IP is the driving force of the Internet, 
47
 
                        and thus it is the most popular set of network protocols on Earth. 
48
 
          </p>
49
 
      <div class="sect2" lang="C" xml:lang="C">
50
 
        <div class="titlepage">
51
 
          <div>
52
 
            <div>
53
 
              <h3 class="title"><a id="tcpip-introduction"></a>TCP/IP Introduction</h3>
54
 
            </div>
55
 
          </div>
56
 
        </div>
57
 
        <p>
58
 
            The two protocol components of TCP/IP deal with different aspects of computer networking.
59
 
            <span class="emphasis"><em>Internet Protocol</em></span>, the "IP" of TCP/IP is a 
60
 
                        connectionless protocol which deals only with network packet routing using the <span class="italics">IP datagram</span> as the basic unit of networking information.  The 
61
 
                        IP datagram consists of a header followed by a message.  The <span class="emphasis"><em>
62
 
                        Transmission Control Protocol</em></span> is the "TCP" of TCP/IP and enables network hosts 
63
 
                        to establish connections which may be used to exchange data streams.  TCP also guarantees 
64
 
                        that the data between connections is delivered and that it arrives at one network host in 
65
 
                        the same order as sent from another network host.
66
 
          </p>
67
 
      </div>
68
 
      <div class="sect2" lang="C" xml:lang="C">
69
 
        <div class="titlepage">
70
 
          <div>
71
 
            <div>
72
 
              <h3 class="title"><a id="tcpip-configuration"></a>TCP/IP Configuration</h3>
73
 
            </div>
74
 
          </div>
75
 
        </div>
76
 
        <p>
77
 
            The TCP/IP protocol configuration consists of several elements which must be set by 
78
 
                        editing the appropriate configuration files, or deploying solutions such as the Dynamic 
79
 
                        Host Configuration Protocol (DHCP) server which in turn, can be configured to provide the 
80
 
                        proper TCP/IP configuration settings to network clients automatically. These 
81
 
                        configuration values must be set correctly in order to facilitate the proper network 
82
 
                        operation of your Ubuntu system.
83
 
            </p>
84
 
        <p>
85
 
            The common configuration elements of TCP/IP and their purposes are as follows:
86
 
            </p>
87
 
        <div class="itemizedlist">
88
 
          <ul type="disc">
89
 
            <li>
90
 
              <p>
91
 
                  <span class="bold"><strong>IP address</strong></span> The IP address is a unique
92
 
                  identifying string expressed as four decimal numbers ranging from zero (0)
93
 
                  to two-hundred and fifty-five (255), separated by periods,
94
 
                  with each of the four numbers representing eight (8) bits of the address for a
95
 
                  total length of thirty-two (32) bits for the whole address. This format is called
96
 
                  <span class="emphasis"><em>dotted quad
97
 
                  notation</em></span>.</p>
98
 
            </li>
99
 
            <li>
100
 
              <p>
101
 
                  <span class="bold"><strong>Netmask</strong></span> The Subnet Mask (or simply,
102
 
                  <span class="emphasis"><em>netmask</em></span>) is a local bit mask, or set of flags
103
 
                  which separate the portions of an IP address significant to the network from the
104
 
                  bits significant to the <span class="emphasis"><em>subnetwork</em></span>.  For example,
105
 
                  in a Class C network, the standard netmask is 255.255.255.0 which masks the first
106
 
                  three bytes of the IP address and allows the last byte of the IP address to
107
 
                  remain available for specifying hosts on the subnetwork.
108
 
                  </p>
109
 
            </li>
110
 
            <li>
111
 
              <p>
112
 
                  <span class="bold"><strong>Network Address</strong></span> The Network Address represents the
113
 
                  bytes comprising the network portion of an IP address.  For example, the host 12.128.1.2
114
 
                  in a Class A network would use 12.0.0.0 as the network address, which uses twelve (12)
115
 
                  to represent the first byte of the IP address, (the network part) and zeroes (0) 
116
 
                  in all of the remaining three bytes to represent the potential host values.  Network
117
 
                  hosts using the very common private and non-routable IP addresses such as 192.168.1.100
118
 
                  would in turn use a Network Address of 192.168.1.0, which specifies the first three
119
 
                  bytes of the Class C 192.168.1 network and a zero (0) for all the possible hosts on the
120
 
                  network.
121
 
                  </p>
122
 
            </li>
123
 
            <li>
124
 
              <p>
125
 
                  <span class="bold"><strong>Broadcast Address</strong></span> The Broadcast Address is an IP address
126
 
                  which allows network data to be sent simultaneously to all hosts on a given subnetwork rather
127
 
                  than specifying a particular network host.  The standard general broadcast address for IP networks is
128
 
                  255.255.255.255, but this broadcast address cannot be used to send a broadcast message to
129
 
                  every host on the Internet because routers block it.  A more appropriate broadcast address
130
 
                  is set to match a specific subnetwork.  For example, on the popular private Class C IP network,
131
 
                  192.168.1.0, the broadcast address should be configured as 192.168.1.255. Broadcast messages are
132
 
                  typically produced by network protocols such as the Address Resolution Protocol (ARP) and the 
133
 
                  Routing Information Protocol (RIP).             
134
 
                  </p>
135
 
            </li>
136
 
            <li>
137
 
              <p>
138
 
                  <span class="bold"><strong>Gateway Address</strong></span> A Gateway Address is the IP address through which
139
 
                  a particular network, or host on a network, may be reached.  If one network host wishes to communicate
140
 
                  with another network host, and that host is not located on the same network, then a 
141
 
                  <span class="emphasis"><em>gateway</em></span> must be used. In many cases, the Gateway Address will be that
142
 
                  of a router on the same network, which will in turn pass traffic on to other networks or hosts, such as
143
 
                  Internet hosts.  The value of the Gateway Address setting must be correct, or your system will not be able
144
 
                  to reach any hosts beyond those on the same network.                  
145
 
                  </p>
146
 
            </li>
147
 
            <li>
148
 
              <p>
149
 
                  <span class="bold"><strong>Nameserver Address</strong></span> Nameserver Addresses represent the IP addresses of
150
 
                  Domain Name Service (DNS) systems, which resolve network hostnames into IP addresses.  There are three levels of
151
 
                  Nameserver Addresses, which may be specified in order of precedence: The 
152
 
                  <span class="emphasis"><em>Primary</em></span>
153
 
                  Nameserver, the <span class="emphasis"><em>Secondary</em></span> Nameserver, and the 
154
 
                  <span class="emphasis"><em>Tertiary</em></span>
155
 
                  Nameserver. In order for your system to be able to resolve network hostnames into their
156
 
                  corresponding IP addresses, you must specify valid Nameserver Addresses which you are authorized to use
157
 
                  in your system's TCP/IP configuration.  In many cases these addresses can and will be provided by your
158
 
                  network service provider, but many free and publicly accessible Nameservers are available for use, such as
159
 
                  the Level3 (Verizon) servers with IP addresses from
160
 
                  4.2.2.1 to 4.2.2.6. </p>
161
 
              <div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
162
 
                <h3 class="title">Tip</h3>
163
 
                <p>
164
 
                        The IP address, Netmask, Network Address, Broadcast Address, and Gateway Address
165
 
                        are typically specified via the appropriate directives in the file  <code class="filename">/etc/network/interfaces</code>. The Nameserver Addresses are typically specified via  <span class="emphasis"><em>nameserver</em></span> 
166
 
                        directives in the file <code class="filename">/etc/resolv.conf</code>. For more information, 
167
 
                        view the system manual page for <code class="filename">interfaces</code> or <code class="filename">resolv.conf</code> respectively, with the following commands typed at a terminal prompt:
168
 
                        </p>
169
 
              </div>
170
 
              <p>
171
 
                    Access the system manual page for <code class="filename">interfaces</code> with the following command:
172
 
                    </p>
173
 
              <p>
174
 
</p>
175
 
              <pre class="screen">
176
 
<span xmlns="" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span xmlns="http://www.w3.org/1999/xhtml"><strong class="command">man interfaces</strong></span></span>
177
 
</pre>
178
 
              <p>
179
 
                    </p>
180
 
              <p>
181
 
                    Access the system manual page for <code class="filename">resolv.conf</code> with the following command:
182
 
                    </p>
183
 
              <p>
184
 
</p>
185
 
              <pre class="screen">
186
 
                <span xmlns="" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command">
187
 
                  <span xmlns="http://www.w3.org/1999/xhtml">
188
 
                    <strong class="command">man resolv.conf</strong>
189
 
                  </span>
190
 
                </span>
191
 
              </pre>
192
 
              <p>
193
 
                    </p>
194
 
            </li>
195
 
          </ul>
196
 
        </div>
197
 
        <p>
198
 
            </p>
199
 
      </div>
200
 
      <div class="sect2" lang="C" xml:lang="C">
201
 
        <div class="titlepage">
202
 
          <div>
203
 
            <div>
204
 
              <h3 class="title"><a id="ip-routing"></a>IP Routing</h3>
205
 
            </div>
206
 
          </div>
207
 
        </div>
208
 
        <p>
209
 
              IP routing is a means of specifying and discovering paths in a TCP/IP network along which
210
 
              network data may be sent.  Routing uses a set of <span class="emphasis"><em>routing tables</em></span>
211
 
              to direct the forwarding of network data packets from their source to the destination, often
212
 
              via many intermediary network nodes known as <span class="emphasis"><em>routers</em></span>.
213
 
              IP Routing is the principal mode of path discovery on the Internet.  There are two primary forms of
214
 
              IP Routing: <span class="emphasis"><em>Static Routing</em></span> and 
215
 
              <span class="emphasis"><em>Dynamic Routing.</em></span>
216
 
            </p>
217
 
        <p>
218
 
            Static routing involves manually adding IP routes to the system's routing table, and this is usually
219
 
            done by manipulating the routing table with the <span><strong class="application">route</strong></span> command. Static routing enjoys
220
 
            many advantages over dynamic routing, such as simplicity of implementation on smaller networks, 
221
 
            predictability (the routing table is always computed in advance, and thus the route is precisely the 
222
 
            same each time it used), and low overhead on other routers and network links due to the lack of a
223
 
            dynamic routing protocol.  However, static routing does present some disadvantages as well.  For example,
224
 
            static routing is limited to small networks and does not scale well.  Static routing also fails completely
225
 
            to adapt to network outages and failures along the route due to the fixed nature of the route. 
226
 
            </p>
227
 
        <p>
228
 
            Dynamic Routing depends on large networks with multiple possible IP routes from a source to a destination
229
 
            and makes use of special routing protocols, such as the Router Information Protocol (RIP), which handle
230
 
            the automatic adjustments in routing tables that make dynamic routing possible.  Dynamic routing
231
 
            has several advantages over static routing, such as superior scalability and the ability to adapt
232
 
            to failures and outages along network routes. Additionally, there is less manual configuration of the
233
 
            routing tables, since routers learn from one another about their existence and available routes. This trait
234
 
            also eliminates the possibility of introducing mistakes in the routing tables via human error.
235
 
            Dynamic routing is not perfect, however, and presents disadvantages such as heightened complexity and
236
 
            additional network overhead from router communications, which does not immediately benefit the end users,
237
 
            but still consumes network bandwidth.
238
 
            </p>
239
 
      </div>
240
 
      <div class="sect2" lang="C" xml:lang="C">
241
 
        <div class="titlepage">
242
 
          <div>
243
 
            <div>
244
 
              <h3 class="title"><a id="tcp-and-udp"></a>TCP and UDP</h3>
245
 
            </div>
246
 
          </div>
247
 
        </div>
248
 
        <p>
249
 
              TCP is a connection-based protocol, offering error correction and guaranteed delivery of
250
 
              data via what is known as <span class="emphasis"><em>flow control</em></span>. Flow control
251
 
              determines when the flow of a data stream needs to be stopped, and previously sent data
252
 
              packets should to be re-sent due to problems such as <span class="emphasis"><em>collisions</em></span>,
253
 
              for example, thus ensuring complete and accurate delivery of the data.  TCP is typically
254
 
              used in the exchange of important information such as database transactions. 
255
 
            </p>
256
 
        <p>
257
 
              The User Datagram Protocol (UDP), on the other hand, is a <span class="emphasis"><em>connectionless</em></span>
258
 
              protocol which seldom deals with the transmission of important data because it lacks flow
259
 
              control or any other method to ensure reliable delivery of the data.  UDP is commonly used
260
 
              in such applications as audio and video streaming, where it is considerably faster than
261
 
              TCP due to the lack of error correction and flow control, and where the loss of a few packets
262
 
                          is not generally catastrophic.
263
 
            </p>
264
 
      </div>
265
 
      <div class="sect2" lang="C" xml:lang="C">
266
 
        <div class="titlepage">
267
 
          <div>
268
 
            <div>
269
 
              <h3 class="title"><a id="icmp"></a>ICMP</h3>
270
 
            </div>
271
 
          </div>
272
 
        </div>
273
 
        <p>
274
 
              The Internet Control Messaging Protocol (ICMP) is an extension to the Internet Protocol (IP) as defined
275
 
              in the Request For Comments (RFC) #792 and supports network packets containing control, error, and
276
 
              informational messages.  ICMP is used by such network applications as the <span><strong class="application">ping</strong></span>
277
 
              utility, which can determine the availability of a network host or device.  Examples of some error messages
278
 
              returned by ICMP which are useful to both network hosts and devices such as routers, include 
279
 
              <span class="emphasis"><em>Destination Unreachable</em></span> and <span class="emphasis"><em>Time Exceeded</em></span>.
280
 
            </p>
281
 
      </div>
282
 
      <div class="sect2" lang="C" xml:lang="C">
283
 
        <div class="titlepage">
284
 
          <div>
285
 
            <div>
286
 
              <h3 class="title"><a id="daemons"></a>Daemons</h3>
287
 
            </div>
288
 
          </div>
289
 
        </div>
290
 
        <p>
291
 
              Daemons are special system applications which typically execute continuously in the background and
292
 
              await requests for the functions they provide from other applications.  Many daemons are network-centric; that is,
293
 
              a large number of daemons executing in the background on an Ubuntu system may provide network-related functionality.
294
 
              Some examples of such network daemons include the <span class="emphasis"><em>Hyper Text Transport Protocol Daemon</em></span> 
295
 
              (httpd), which provides web server functionality; the <span class="emphasis"><em>Secure SHell Daemon</em></span> (sshd), which
296
 
              provides secure remote login shell and file transfer capabilities; and the <span class="emphasis"><em>Internet Message Access 
297
 
              Protocol Daemon</em></span> (imapd), which provides E-Mail services.
298
 
            </p>
299
 
      </div>
300
 
    </div>
301
 
    <div xmlns="" style="background-color: #white; color: black;                  margin-top: 20px; margin-left: 20px;                  margin-right: 20px;">
302
 
      <div style="position: absolute; left: 20px;">
303
 
        <a accesskey="p" href="network-configuration.html">Prev</a>
304
 
      </div>
305
 
      <div style="position: absolute; right: 20px;">
306
 
        <a accesskey="n" href="firewall-configuration.html">Next</a>
307
 
      </div>
308
 
      <div align="center">
309
 
        <a accesskey="h" href="index.html">Home</a>
310
 
      </div>
311
 
    </div>
312
 
    <div xmlns="" style="background-color: #white;   color: black;         margin-left: 20px;   margin-right: 20px;">
313
 
      <div class="navLeft">Network Configuration </div>
314
 
      <div class="navRight"> Firewall Configuration</div>
315
 
      <div class="navCenter">
316
 
        <a accesskey="u" href="networking.html">Up</a>
317
 
      </div>
318
 
    </div>
319
 
    <br xmlns="" />
320
 
    <br xmlns="" />
321
 
    <div xmlns="" class="bannerBottom" style="background-image: url(../../common/bottom-middle.png);                                        background-repeat: x-repeat;                                         width: 100%;                                         height: 100px;                                         bottom:0px;">
322
 
      <div class="BannerBottomRight">
323
 
        <img src="../../common/bottom-right.png" style="margin: 0px" alt="" />
324
 
      </div>
325
 
      <div class="bannerBottomLeft">
326
 
        <img src="../../common/bottom-left.png" style="margin: 0px;" alt="" />
327
 
      </div>
328
 
    </div>
329
 
  </body>
330
 
</html>