# Managing TCP/IP Networks P2

Chia sẻ: Khinh Kha Kha | Ngày: | Loại File: PDF | Số trang:20

0
52
lượt xem
8

## Managing TCP/IP Networks P2

Mô tả tài liệu

Now that we have an appreciation for the evolution of the Internet and the TCP/IP protocol suite, let us turn our attention to the structure of the protocol suite. However, since the TCP/IP protocol suite has a layered structure, we will ®rst examine the ISO Reference Model and the subdivision of its second layer by the Institute of Electrical and Electronic Engineers (IEEE) to provide a standardized frame of reference. 2.3 THE ISO REFERENCE MODEL The International Organization for Standardization is an agency of the United Nations headquartered in Geneva, Switzerland. The ISO is tasked with the development of worldwide standards to...

Chủ đề:

Bình luận(0)

Lưu

## Nội dung Text: Managing TCP/IP Networks P2

1. 18 THE TCP/IP PROTOCOL SUITE Now that we have an appreciation for the evolution of the Internet and the TCP/IP protocol suite, let us turn our attention to the structure of the protocol suite. However, since the TCP/IP protocol suite has a layered structure, we will ®rst examine the ISO Reference Model and the subdivision of its second layer by the Institute of Electrical and Electronic Engineers (IEEE) to provide a standardized frame of reference. 2.3 THE ISO REFERENCE MODEL The International Organization for Standardization is an agency of the United Nations headquartered in Geneva, Switzerland. The ISO is tasked with the development of worldwide standards to facilitate the international exchange of goods and services. The membership of the ISO consists of the national standards organization of most countries, with over 100 countries participat- ing in its work. One of the most notable achievements of the ISO in the ®eld of data communications was its development of the seven-layer Open Systems Interconnection (OSI) Reference Model. This model de®nes the communica- tions process as a set of seven layers, with speci®c functions isolated and associated with each layer. Figure 2.2 illustrates the seven layers of the ISO Reference Model. Each layer covers lower layer processes, effectively isolating them from higher layer functions. In this way, each layer performs a set of functions necessary to provide a set of services to the layer above it. Layer isolation permits the characteristics of a given layer to change without impacting the remainder of the model, provided that the supporting services remain the same. This layering was developed as a mechanism to enable users to mix and match OSI-conforming communications products to tailor their communications systems to satisfy a particular networking requirement. Although OSI- conforming communications products never gained a signi®cant degree of acceptance, the OSI Reference Model provides a framework for comparing Figure 2.2 The International Organization for Standardization (ISO) Open System Interconnection (OSI) Reference Model
3. 20 THE TCP/IP PROTOCOL SUITE Because the development of OSI layers was originally targeted towards wide area networking, its applicability to local area networks required a degree of modi®cation. Under IEEE 802 standards, the data link layer was subdivided into two sublayers: Logical Link Control (LLC) and Media Access Control (MAC). The LLC layer is responsible for generating and interpreting commands that control the ¯ow of data and perform recover operations in the event of errors. In comparison, the MAC layer is responsible for providing access to the local area network, which enables a station on the network to transmit information. Later in this chapter we will discuss the subdivision in additional detail. Layer 3: the network layer The third layer in the ISO Reference Model is the network layer. As its name implies, this layer is responsible for arranging a logical connection through a network to include the selection and management of a route for the ¯ow of information between source and destination based upon the available paths in a network. Services provided by this layer are associated with the movement of data packets through a network, including addressing, routing, switching, sequencing, and ¯ow control procedures. In a complex network, the source and destination may not be directly connected by a single path, but instead require a path to be established that consists of many subpaths. Thus, routing of data through the network onto the correct paths is an important feature of this layer. Several protocols represent commonly used layer 3 protocols. Those protocols include the X.25 packet protocol, which governs the ¯ow of information within a packet network, Novell's Internet Packet Exchange (IPX), and the Internet Protocol (IP). Layer 4: the transport layer The fourth layer in the ISO's Reference Model is the transport layer. This layer is responsible for guaranteeing that the transfer of information occurs correctly after a route has been established by the network layer protocol. Thus, the primary function of this layer is to control the communications session between nodes once a path has been established by the network control layer. Error control, sequence checking, and other end-to-end data reliability factors are the primary concern of this layer. In addition, to support the transfer of different types of data between source and destination, this layer is also responsible for multiplexing and de-multiplexing data streams between upper layer application processes. Although most transport layer protocols provide an end-to-end reliability mechanism, this is an optional feature associated with this layer. Similarly, although most transport layer protocols are connection-oriented, requiring the destination to acknowledge its ability to receive data prior to a transmission session being established, this is also an optional feature.
4. 2.3 THE ISO REFERENCE MODEL 21 Instead of operating as a connection-oriented protocol, a transport layer protocol can operate on what is referred to as a best-effort basis. This means that the protocol will initiate transmission without knowing if the destination is ready to receive data or even if it is powered on and operational. Although this method of operation may appear awkward, the originator will set a timer that decrements in value. If no response is received to the initial packet ¯ow by the time the timer expires, the originator will assume that the destination is not reachable and terminate the session. The use of a connectionless protocol avoids the relatively long handshaking process associated with some connection-oriented transport layer protocols. Examples of transport layer protocols include Novell's Sequenced Packet Exchange (SPX) as well as the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP). TCP is a connection-oriented, error-free delivery protocol. In comparison, UDP is a connectionless, best effort protocol. Layer 5: the session layer The ®fth layer in the OSI Reference Model is the session layer. This layer provides a set of rules for establishing and terminating data streams between nodes in a network. The services that the session layer can provide include establishing and terminating node connections, ¯ow control, dialogue control, and end-to-end data control. Layer 6: the presentation layer The sixth layer in the ISO's OSI Reference Model is the presentation layer. This layer is primarily responsible for formatting, data transformation, and syntax-related operations. One of the primary functions of this layer that is both visible and probably overlooked as we take it for granted is the conversion of transmitted data at the receiver into a display format for a receiving device. Concerning the receiving device, different presentation layers reside on different devices, since the manner in which data is displayed on a PC would more than likely differ from the manner in which data is displayed on a dumb terminal. Other functions that can be performed by the presentation layer include encryption/decryption and compression/ decompression. Layer 7: the application layer The seventh and top layer of the OSI Reference Model is the application layer. This layer can be viewed as functioning as a window through which the application gains access to all of the services provided by the seven-layer model. Examples of functions that can be performed at the application layer include ®le transfer, electronic mail transmission, and remote terminal access.
6. 2.3 THE ISO REFERENCE MODEL Figure 2.3 Data ¯ow within an ISO Reference Model network 23
9. 26 THE TCP/IP PROTOCOL SUITE Figure 2.5 Comparing the TCP/IP Protocol Suite with the ISO Reference Model network. In actuality, the host address is really an interface on the network, since a host can have multiple interfaces, with each having a distinct address. However, over the years the terms host address and interface address have been used synonymously Ð although this is not technically correct. In Chapter 3 we will examine the IP header in detail. ICMP The Internet Control Message Protocol (ICMP) represents a diagnostic testing and error reporting mechanism that enables devices to generate various types of status and error reporting messages. Two of the more popularly employed ICMP messages are the Echo Request and Echo Response packets generated by the Ping application. Although Figure 2.5 indicates that ICMP is a layer 3 protocol, from a technical perspective an ICMP message is formed by the addition of an IP header to an ICMP message with the Type ®eld within the IP header set to indicate it is transporting an ICMP message. When we examine IP in Chapter 3, we will also turn our attention to the Internet Message Protocol. The transport layer The designers of the TCP/IP protocol suite recognized that two different types of data delivery transport protocols would be required. This resulted in two transport protocols supported by the protocol suite. TCP TCP is a reliable, connection-oriented protocol used to transport appli- cations that require reliable delivery and for which actual data should not be
10. 2.4 THE TCP/IP PROTOCOL SUITE 27 exchanged until a session is established. From Figure 2.5 you will note that FTP, Telnet, SMTP, and HT TP are transported by TCP. Because TCP is a connection-oriented protocol, this means that actual data will not be transferred until a connection is established. While this makes sense when you are transmitting a ®le or Web pages, it also delays actual data transfer. UDP A second transport protocol supported by the TCP/IP protocol suite is UDP. UDP represents a connectionless protocol that operates on a best e¡ort basis. This means that instead of waiting for con¢rmation that a destination is available, UDP will commence actual data transfer, leaving it to the application to determine if a response was received. Examples of applications that use UDP include SNMP, NFS, and BOOTP. The use of UDP and TCP results in the pre®x of an appropriate header to application data. When TCP is used as the transport layer protocol, the TCP header and application data are referred to as a TCP segment. When UDP is used as the transport layer protocol, the UDP header and application data transported by UDP is referred to as a UDP datagram. Port numbers BecauseTCP and UDP were designed to transport multiple types of application data between a source and the same or di¡erent destinations, a mechanism was needed to distinguish one type of application from another. This mechanism is obtained by port number ¢elds contained in TCP and UDP headers and explains how a Web server can also support FTP and other appli- cations. In Chapter 4 we will turn our attention to the composition of TCP/IP transport protocol headers and the use of di¡erent port numbers. 2.4.3 Application data delivery In concluding this chapter we will examine the use of TCP/IP and LAN headers to facilitate the delivery of application data from a host on one Figure 2.6 LAN delivery of TCP/IP application data
15. 32 THE INTERNET PROTOCOL Table 3.1 Flag ®eld bit values Bit 0: Reserved (set to 0) Bit 1: 0 = may fragment, 1 = don't fragment Bit 2: 0 = last fragment, 1 = more fragment(s) follow maintained as a value in a host's routing table and are set either by manual con®guration or via a discovery process. When a route has interfaces with different MTUs and a large datagram must be transferred via an interface with a smaller MTU, the routing entity will either fragment the packet or drop it. As we will note in the next section, if the DON'T_FRAGMENT bit is set in the ¯ag ®eld the router will drop the datagram. This will result in the router generating an ICMP Destination Unreachable±Fragmentation Needed' message to the originator, which will cause the MTU discovery algorithm to select a smaller MTU for the path and subsequent transmissions. 3.1.5 Flags ®eld This 3-bit ®eld indicates how fragmentation will occur. Bit 0 is reserved and set to zero, while the values of bits 1 and 2 de®ne whether or not fragmentation can occur and if the present fragment is the last fragment or if one or more fragments follow. Table 3.1 lists the values associated with the three bits in the Flags ®eld. 3.1.6 Fragment Offset ®eld The third ®eld in the IPv4 header that is involved with fragmentation is the Fragment Offset ®eld. This ®eld is 13 bits in length and indicates where the fragment belongs in the complete message. The actual value placed in this ®eld is an integer that corresponds to a unit of 8 octets and provides an offset in 64-bit units. IP fragmentation places the burden of effort upon the receiving station and the routing entity. When a station receives an IP fragment, it must fully reassemble the complete IP datagram prior to being able to extract the TCP segment, resulting in a requirement for additional buffer memory and CPU processing power at the receiver. In doing so it use the values in the Fragment Offset ®eld in each datagram fragment to correctly reassemble the complete datagram. Because the dropping of any fragment in the original datagram requires the original datagram to be present, most vendor TCP/IP protocol stacks set the DON'T_FRAGMENT bit in the Flag ®eld. As mentioned above, setting that bit causes oversized IP datagrams to be dropped and results in an ICMP Destination Unreachable±Fragmentation Needed' message trans- mitted to the originator. This action results in the MTU discovery algorithm selecting a smaller MTU for the path and using that MTU for subsequent transmissions.