Practical TCP/IP and Ethernet Networking- P29 pptx

10 241 1
Practical TCP/IP and Ethernet Networking- P29 pptx

Đang tải... (xem toàn văn)

Thông tin tài liệu

262 Practical TCP/IP and Ethernet Networking Note that datagrams (as the IP packets are known) may have to be broken down (or fragmented) into smaller packets as they pass through a router onto a network with a smaller frame size (e.g. from Ethernet with a maximum size of 1500 bytes to Arcnet with a maximum of approximately 800 bytes). The IP protocol does not guarantee delivery of any of the packets. It merely handles the routing of the packets to its destination across the different interconnected networks. Packets could be lost due to routers becoming congested (and thus discarding packets) or due to corruption of the packets on a network due to electrical noise, for example. Hence the TCP protocol is used to guarantee delivery of the packets. 18.5.2 Transmission control protocol (or TCP) Structure of TCP The TCP protocol is used to guarantee delivery of the packet. Each byte of information is given a unique sequence number. The receiver keeps track of these sequence numbers and sends an acknowledgement to indicate to the originator of the packets that it has received the datagram up to a particular defined byte number. The TCP protocol initiates the transfer of information using a three-way handshake in which it exchanges parameters with the node it is transferring this data to. TCP flow control is based on the concept of a window. The window is used to determine how much data can be outstanding (i.e. unacknowledged) from the recipient of the information transfer. The amount of data that can be in transit is referred to as the bandwidth-delay product. The maximum window size is 64 kbytes (but practically it is often limited to 32 kbytes). Sliding windows Obviously there is a need to get some sort of acknowledgment back to ensure that there is a guaranteed delivery service. This technique, called positive acknowledgment with retransmission, requires the receiver to send back an acknowledgment message. Inherent in this is the concept of a timeout where a timer is started by the transmitter so that if no response is received from the destination node; another copy of the message will be transmitted. An example of this situation is given in the figure below. Figure 18.5 Positive acknowledgment philosophy Satellites and TCP/IP 263 The sliding window form of positive acknowledgment is used with most efficient protocols, as it is very time consuming waiting for each individual acknowledgment to be returned for each packet transmitted. Hence the idea is that a number of packets (the window) is transmitted before the source may receive an acknowledgment to the first message (due to time delays, etc). As long as acknowledgments are received, the window slides along and the next packet is transmitted. TCP uses a variable size-sliding window. Each acknowledgment from the receiver contains a window advertisement indicating how many additional bytes of data the destination will accept. The transmitting node then adjusts the size of its sliding window appropriately (either up or down). This can be considered to be a form of flow control. It is very useful for situations where one node is transmitting more data than the receiver can handle. Maximum segment size Both the transmitting and receiving nodes need to agree on the maximum size segments they will transfer. This is specified in the options field. There is an improvement in overall efficiency if the maximum segment size is selected that fills the physical packets that are transmitted across the network. The current specification recommends a maximum segment size of 536 (default size of IP datagram minus IP and TCP headers). If the size is not correctly specified; for example too small, the framing bytes consume most of the packet size resulting in considerable overhead; or too large, the packets have to be fragmented with a higher probability of loss of a packet and the resultant retransmission of the entire packet. Acknowledgments TCP/IP segments traveling through the Internet can be lost or arrive out of their sequence order. Each acknowledgment specifies a sequence number which is one greater than the highest byte received. Essentially acknowledgments always specify the sequence number of the next byte that the receiver expects to receive. Note further that the receiver always acknowledges the lowest contiguous prefix of the stream that has been correctly received. Time out and retransmission The TCP protocol starts a timer every time it transmits a segment. If no appropriate acknowledgment is received, TCP arranges to retransmit this segment. One of the problems with Internet is the rather variable time in receiving a response to a segment transmitted. There are various algorithms to calculate the time out time. A complication arises in calculating the round trip time for retransmitted segments. For example, if the transmitter times out waiting for an acknowledgment and then decides to send another packet and an acknowledgment arises shortly after the second packet is transmitted, the question arises as to which packet the acknowledgment refers to. This can affect the calculation of the round trip time dramatically. Karn’s algorithm, for example, can address this problem. Congestion There are two techniques used to reduce congestion on a network: • Multiplicative decrease This approach is to reduce the size of the window for bytes to transmit by half on loss of a segment and for these segments still in the window, back off the retransmission time exponentially. This reduces the traffic dramatically and allows the gateways to eliminate the congestion. 264 Practical TCP/IP and Ethernet Networking • Slow start recovery When ramping up again in transmission rates, a technique called slow start (additive) recovery is used. This requires the traffic to be increased gradually by using a window of the size of a single segment and then increasing the window by one segment each time an acknowledgment arrives. This is a linear increase as opposed to original exponential increase when the transfer originally started. The range of increase of the window is reduced once the window reaches one half of its original size. TCP, at this point, increases the window by one only if all segments in the window have been acknowledged. Establishing/closing/resetting of a TCP connection A three-way handshake (as indicated in the figure below) is used to establish a connection. Figure 18.6 Three-way handshake The SYN bit is set to one in the code field. As this is a full-duplex-based protocol it is possible for a connection to be established from both nodes at the same time. There are two functions that the three-way handshake accomplishes: • Both sides are ready to commence transfer of data • A commencing sequence number is agreed upon An initial sequence number must be chosen by each node (at random) to identify the bytes in the data stream it is transmitting. It should be realized that the acknowledgments indicate the number of the next byte expected. When an application program has finished with transmission of its data, it advises the TCP software that it has no more data to transmit. The routine indicated in the figure below is then executed. When an abnormal condition arises that forces an application program to terminate a connection, the reset bit is used (RST bit in the CODE). The destination responds immediately by aborting the connection. Another protocol, which can be used to transfer data, is referred to as the user datagram protocol (UDP). This does not guarantee transfer of information but has considerably lower overhead than the TCP protocol. Satellites and TCP/IP 265 User datagram protocol (UDP) It should be noted, of course, that the UDP protocol still provides an unreliable connectionless delivery service as for the Internet protocol. Hence the application program must take account of the need for reliability, possibility of message loss, out of order delivery, etc. The user datagram protocol (UDP) is the mechanism by which application programs send datagrams to other application programs. UDP has multiple protocol ports to identify the different programs executing on a particular node. As discussed in an earlier chapter, an abstract destination’s source point on a computer is called a protocol port. There are two types of ports – destination ports on the remote computer node, which receives the message and source ports on the local computer node. The UDP uses the underlying Internet protocol to transport a message from one node to the other. The UDP provides the facility of being able to distinguish among multiple destinations on a given host computer. 18.6 Weaknesses of TCP/IP in satellite usage There are a number of weaknesses with the TCP/IP protocol (which are exacerbated with the use of high latency satellite links). These are listed below: 18.6.1 Window size too small Figure 18.7 Maximum throughput for a single TCP connection as a function of window size and round trip time (RTT) (courtesy of Loyola University, see References at the end of this chapter) In order to use the bandwidth of a satellite channel more effectively, TCP needs to have a larger window size. If a satellite channel has a round trip delay of say 600 msecs and the bandwidth is 1.54 Mbps, the bandwidth-delay product would be 0.924 Mbits which equates to 113 kbytes – this is considerably larger than the 64 kbyte maximum window size for TCP/IP. 18.6.2 Bandwidth adaptation Due to the significant latency in the satellite links, TCP adapts rather slowly to bandwidth changes in the channel. TCP adjusts the window size upwards when the channel becomes congested and downward when the bandwidth increases. This means that TCP does not utilize the full bandwidth immediately but has a significant inertia in adapting. 266 Practical TCP/IP and Ethernet Networking 18.6.3 Selective acknowledgment When a segment is lost, TCP senders will retransmit all the data from the missing segment regardless of whether subsequent segments from the missing one were received correctly or not. This loss of a segment is considered evidence of congestion and the window size is also reduced to half. A more selective mechanism is required. There is a big difference between loss of segments due to real errors on the communications channel and congestion. TCP cannot distinguish between the two forms of missing segments. 18.6.4 Slow start When a TCP transaction is commenced, an initial window size of one segment (normally about 512 octets) is selected. It then doubles the window size as successful acknowledgements are received from the destination up and until it reaches the network saturation state (where a packet is dropped). Hence again, this is a very slow way of ramping up to full bandwidth utilization. The total time for a TCP slow start period is calculated as: Slow start time = RTT * log (B/MSS) Where RTT = Round trip time B = Bandwidth MSS = TCP segment size 18.6.5 TCP for transactions A TCP/IP transaction involves the use of the client–server interaction. The client sends a request to the server and the server then responds with the appropriate information (i.e. it provides a service to the client). In using the HTTP (hypertext transfer protocol), which is what the World Wide Web is based on, every item has to be commenced with the standard three-way handshake as outlined earlier and then the data transferred. This is particularly inefficient for small data transactions, as the process has to be repeated every time. 18.7 Methods of optimizing TCP/IP over satellite channels There are various ways to optimize the use of TCP/IP over a satellite especially the need to mitigate the effects of latency. Interestingly enough, if these concerns with satellites can be addressed this will assist in the design and operation of future high-speed terrestrial networks because of the similar bandwidth * delay characteristic. The major problems for both satellites and high-speed networks with TCP/IP have been the need for a larger window size, the slow start period and ineffective bandwidth adaptation effects. The various issues are discussed below: Large window extension (TCP-LW) A modification to the existing TCP/IP protocol allows a large window increasing the existing one from 2 16 to 2 32 bytes in size. This will allow more effective use of the communications channel with large bandwidth-delay products. Note that both the receiver and sender have to use a version of TCP that implements TCP-LW Selective acknowledgment (TCP-SACK) A newly defined standard entitled selective acknowledgment allows for the receiving node to advise the sender immediately of the loss of a packet. The sender will then Satellites and TCP/IP 267 immediately send a replacement packet thus avoiding the timeout condition and the consequent lengthy recovery in TCP (which would otherwise then have reduced its window size and then very slowly increased bandwidth utilization) Congestion avoidance There are two congestion avoidance techniques; but neither has been popular as yet. The first approach, which has to be implemented in a router, is called random early detection (RED) where the router sends an explicit notice of congestion (using the ICMP protocol discussed in an earlier chapter) when it believes that congestion will occur shortly if it doesn’t take corrective action. On the other hand an algorithm can be implemented in the sender where it observes the minimum round trip time for the packets it is transmitting to calculate the amount of data queued in the communications channel. If the number of packets being queued is increasing, it can reduce the congestion window. It will then increase the congestion window when it sees the number of queued packets decreasing. TCP for transactions (T/TCP) As discussed earlier, the three-way handshake represents a considerable overhead for small data transactions (often associated with HTTP transfers). An extension called T/TCP bypasses the three-way handshake and the slow-start procedure by using the data stored in a cache from previous transactions. Middleware It is also possible to effect significant improvements to the operation of TCP/IP without actually modifying the TCP/IP protocol itself using what is called middleware where split-TCP and TCP spoofing could be used. Split-TCP The end-to-end TCP connection is broken into two or three segments. This is indicated in the figure below. Each segment is in itself a complete TCP link. This means that the outer two links (which have minimal latency) can be setup as per usual. However the middle TCP satellite link with significant latency would have extensions to TCP such as TCP- LW and T/TCP. This means only minor modifications to the application software at each end of the link. Figure 18.8 Use of Split TCP (courtesy of Loyola University) TCP spoofing An intermediate router (such as at the satellite uplink) immediately acknowledges all TCP packets coming through it to the receiver. All the receiver acknowledgment packets are suppressed so that the originator does not get confused. If the receiver does not receive a specific packet and the router has timed out, it will then retransmit this (missing) segment 268 Practical TCP/IP and Ethernet Networking to the receiver. The resultant effect is that the originator believes that it is dealing with a low latency network. Figure 18.9 TCP spoofing (courtesy of Loyola University) Application protocol approaches There are three approaches possible here: • Persistent TCP connections • Caching • Application specific proxies Persistent TCP connections In some client–server applications with very small amounts of data transfer, there are considerable inefficiencies. The HTTP 1.1 standard minimizes this problem and takes a persistent connection and combines all these transfers into one fetch. Further to this it pipelines the individual transfers so that there is an overlap of transmission delays thus making for an efficient implementation. Caching In this case, the commonly used documents (such as used with HTTP and FTP web protocols) are broadcast to local caches. The web clients then access these local caches rather than having to go through a satellite connection. The web clients thus have a resultant low latency and low network utilization (meaning more bandwidth available for higher speed requirements). Application specific proxies In this case, an application specific proxy can use its domain knowledge to pre-fetch web pages so that web clients subsequently requesting these pages considerably reduce the effects of latency. Satellites and TCP/IP 269 References There are a number of excellent references (many web site-based), which have been used in this document. It should be emphasized that due to the rapid changes in satellite communications with respect to TCP/IP, the Web is often the best source of information on this topic. Montgomery, J. The Orbiting Internet: Fiber in the Sky. John Montgomery. Byte Magazine. November 1997. Yongguang Zhang (ygz@isl.hrl.hac.com) Dante De Lucia (dante@isl.hrl.hac.com) Bo Ryu (ryu@isl.hrl.hac.com) Son K. Dao (son@isl.hrl.hac.com) Satellite Communications in the Global Internet – Issues, Pitfalls, and Potential. Hughes Research Laboratories. Malibu, California 90265, U.S.A Internet: http://www.wins.hrl.com/people/ygz/papers/inet97/index.html Christoph Mahle (editor), Kul Bhasin, Charles Bostian, William Brandon, John Evans, Alfred Mac Rae. WTEC Panel Report on Global Satellite Communications Technology and Systems. Internet: http://itri.loyola.edu/satcom2/04_05.htm Suggested web sites with references: Alcatel Paris, France Phone: +33 1 4058 5858 Internet: http://www.alcatel.com/our_bus/telecom/products/space whatsnew.htm Hughes Communications, Inc. Long Beach, CA Phone: 310-525-5000 Internet: http://www.spaceway.com Lockheed Sunnyvale, CA Phone: 888-278-7565 Phone: 408-543-3103 Internet: http://www.astrolink.com Loral Palo Alto, CA Phone: 650-852-5736 Internet: http://www.cyberstar.com Motorola Chandler, AZ Phone: 602-732-4018 Internet: http://www.mot.com/ Teledesic Kirkland, WA Phone: 425-602-0000 Internet: http://www.teledesic.com Appendix A -RUYYGX_  10Base2 IEEE 802.3 (or Ethernet) implementation on thin coaxial cable (RG58/Au). 10Base5 IEEE 802.3 (or Ethernet) implementation on thick coaxial cable. 10Base-T IEEE 802.3 (or Ethernet) implementation on unshielded 22 AWG twisted pair cable. ' ABM Asynchronous Balanced Mode Access control mechanism The way in which the LAN manages the access to the physical transmission medium. Address A normally unique designator for location of data or the identity of a peripheral device, which allows each device on a single communications line to respond to its own message. Address resolution protocol (ARP) A TCP/IP process used by a router or a source host to translate the IP address into the physical hardware address, for delivery of the message to a destination on the same physical network. Algorithm Normally used as a basis for writing a computer program. This is a set of rules with a finite number of steps for solving a problem. 'VVKTJO^' -RUYYGX_   Alias frequency A false lower frequency component that appears in data reconstructed from original data acquired at an insufficient sampling rate (which is less than two (2) times the maximum frequency of the original data). ALU Arithmetic Logic Unit Amplitude modulation A modulation technique (also referred to as AM or ASK) used to allow data to be transmitted across an analog network, such as a switched telephone network. The amplitude of a single (carrier) frequency is varied or modulated between two levels one for binary 0 and one for binary 1. Analog A continuous real time phenomenon where the information values are represented in a variable and continuous waveform. ANSI American National Standards Institute. The national standards development body in the USA. API Application Programming Interface. Appletalk A proprietary computer networking standard initiated by the Apple Computer for use in connecting the Macintosh range of computers and peripherals. This standard operates at 230 kilobits/second. Application layer The highest layer of the seven-layer ISO/OSI reference model structure, which contains all user or application programs. Application programming interface (API) A specification defining how an application program carries out a defined set of services. Arithmetic logic unit The element(s) in a processing system that perform(s) the mathematical functions such as addition, subtraction, multiplication, division, inversion, AND, OR, NAND and NOR. ARP Address Resolution Protocol. ARPANET The packet switching network, funded by the DARPA, which has evolved into the world- wide Internet. ARP cache A table of recent mappings of IP addresses to the physical addresses, maintained in each host and router. AS Australian Standard . congested and downward when the bandwidth increases. This means that TCP does not utilize the full bandwidth immediately but has a significant inertia in adapting. 266 Practical TCP/IP and Ethernet. receiver does not receive a specific packet and the router has timed out, it will then retransmit this (missing) segment 268 Practical TCP/IP and Ethernet Networking to the receiver. The resultant. 262 Practical TCP/IP and Ethernet Networking Note that datagrams (as the IP packets are known) may have to be

Ngày đăng: 03/07/2014, 20:20

Từ khóa liên quan

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

Tài liệu liên quan